Re: Bash: Save the "leading 0" in loops
Dennis Stosberg <[email protected]>
| Newsgroups | gmane.linux.suse.programming |
|---|---|
| Message-ID | <[email protected]> |
Am 17.11.2004 um 09:04 schrieb Oliver Leue:
> May someone please tell me how it is possible to save the leading 0 in a
> construct like this:
>
> for (i=001,i<701,i++); do echo name.$i.doc >> doc_index.txt
As always, there is more than one way:
for i in `seq -w 0 701`; do echo $i; done
Regards,
Dennis
--
Um die Liste abzubestellen, schicken Sie eine Mail an:
[email protected]
Um eine Liste aller verfügbaren Kommandos zu bekommen, schicken
Sie eine Mail an: [email protected]