i don't know anything about bash scripting but i do know perl you could do this and then issue system() calls: for (my $x = 1; $x <= 100; $x++) { # loop from 1 to 100 if ($x < 10) { # if $x is less than 10 unless ($x =~ m/0/g) { # if $x doesn't have a "0" in it $x = "0".$x; } } print $x; # print $x }
From: Linux - User
Date: Wed, 19 Sep 2001 16:49:33 -0600 To: suse-linux-e@suse.com Subject: [SLE] A shell programing question Hi guys...
is there any way to make with the Shell a for or any other loop statement to make a loop like this:
01 02 03 ... 10 11 12..
That's because I need the zero before the number when the number is below 10.
thanks
bye
--ed
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq and the archives at http://lists.suse.com