[wellylug] BASH scripting help required

andrej at paradise.net.nz andrej at paradise.net.nz
Fri May 7 14:58:58 NZST 2004


Quoting David Antliff <dave.antliff at paradise.net.nz>:

> > for i=1 to 7 (?)
> > do
> > find --max-depth=$i -iname "* *" -exec strip_blk.sh {} \;
> > done
> It would be easier to write, with the trade off of consuming more
> resources at run-time. It's essentially a depth first search at
> directory
> level.
What about this variant? :)
for i=1 to `find . -printf "%d\n" | sort | tail -n 1`
do
 find --max-depth=$i -iname "* *" -exec strip_blk.sh {} \;
done




More information about the wellylug mailing list