Thanks all for the generous feedback.
But the very simple solution that Jonas Olson posted quite early solved
the issue.
"for dir in [0-9]*/;" was is exactly what I needed.
Best
Urs
Am 09.05.2012 16:31, schrieb Christopher Webster:
------------------------------------------------------------------------
*From*: David Kastrup
*Subject*: Re: (somewhat OT:) lilypond calling bash script questions
*Date*: Wed, 09 May 2012 16:01:54 +0200
*User-agent*: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)
------------------------------------------------------------------------
Christopher Webster<address@hidden> writes:
>/ A variant of Alex's suggestion (below):/
>
>/ find . -type d -name "[0-9]*" -print | while read dir/
>/ do/
>/ (/
>/ cd $dir;/
>/ for f in *.ly/
>/ do/
>/ lilypond $f/
>/ done/
>/ )/
>/ done/
find is looking _recursively_, arbitrarily deep. It is the wrong tool
for the job.
--
David Kastrup
Apologies. My misunderstanding. I thought that recursion was the
desired behaviour. If not, then something more like this should do it:
for d in [0-9]*
do
if test -d $d
then
(
cd $d
for f in *.ly
do
lilypond $f
done
)
fi
done
Once again, I've typed this straight into the mail client without
testing, so the obvious risks are present.
All the best
Christopher W.
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user