[Techtalk] Looping with numbers in filenames
David Sumbler
david at aeolia.co.uk
Wed Feb 16 01:21:53 UTC 2011
On Tue, 2011-02-15 at 11:01 -0600, Kathryn Hogg wrote:
> Small typo in my previous post, I had an errant $ in the echo command
>
> num=1;
> while expr $num '<' 25 >/dev/null
> do
> echo file${num}.txt;
> num=$(expr $num + 1);
> done
That works brilliantly. Thanks for this, and thanks too to Benjamin and
Michelle for their suggestions.
David
--
David Sumbler <david at aeolia.co.uk>
More information about the Techtalk
mailing list