by keernan on 3/20/25, 12:52 AM with 1 comments
I figured this would be quite simple, but since I was already working with a AI chat, I gave it a prompt with the rules and objective. After 30 mins of so, I switched to DeepSeek, thinking it would output a solution on the first try. Nope. Not even after more than 90 minutes of back and forth with debugging.
I was very surprised. As an aside, I solved it on my own in a simple two step process:
Step 1: Use find $dir -type d with the sorted output input into an array.
Step 2: Set parent to 'start'; Iterate the sorted array and continue the loop if the array_ele was a child of parent - otherwise echo $dir and set parent=$dir
Easy Peasy. But quite surprised both AI chats struggled to find a solution in bash (I limited the AI to bash).
by nullpoint420 on 3/20/25, 12:53 AM