On 4/21/2009 at 12:12, "Dr. Werner Fink" <werner@suse.de> wrote:
shopt -s globstar OIFS="$IFS" IFS=$'\n' for a in /mnt/Data/Todo/** ; do test -f "$a" || continue a="${a##*/}" /usr/bin/stcommand "$a" /usr/bin/2ndcommand "$a" done IFS="$OIFS"
... OK the `**' trick for listing subdirectories works only for bash 4.0 ... for a plain directory simply use `*' ... on the other hand the GNU find also shows an option -printf:
Werner, This actually looks like a nice alternative solution. for gnu find I tried playing with it; setting IFS might have been enough in my script too. I keep on forgetting this. Anyhow, thank you very much. It's always a pleasure to see the different approaches that are possible. Dominique -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org