Re: Bash: for…in-loop fails, what am I doing wrong?

Steve Flynn anothermindbomb at gmail.com
Thu Jan 10 20:52:13 UTC 2013


On 10 January 2013 20:07, Paul Smith <paul at mad-scientist.net> wrote:

> There is only one really foolproof method that I can think of, if you
> want to work entirely in the shell: you need to create a script that
> takes the files to manage on the command line, then invoke find with the
> -exec option passing it your script.

This.

I write a lot of scripts at work (ksh93 on AIX - how I'd like zsh or
even a modern bash!) and after much arsing around trying to make them
idiot-proof, firing them from a "find ... -exec" command has proven to
be the most robust and easiest method of dealing the multitudes of
filenames I come across.


-- 
Steve

When one person suffers from a delusion it is insanity. When many
people suffer from a delusion it is called religion.




More information about the ubuntu-users mailing list