Artificial intelligent assistant

Looping over dirs using `find . -depth 1 -type d` I've been given a script to run, but it produces an error when calling `find . -depth 1 -type d`. It produces the following error, find: paths must precede expression: `1' This is the line in which it fails, for dir in `find . -depth 1 -type d` do .... I have tried quite a few things without success. And I don't really see why it gives the error since it seems to me at least, that the paths does indeed precede the "1".

The `-depth` switch does not take an argument, but `-maxdepth does`, so:


for dir in `find . -depth -maxdepth 1 -type d`
do
....


should work.

The `-depth` argument as per the man page means process directory contents first.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy a535f5c2b4fa942e56b99720d0aace52