[Techtalk] Looping with numbers in filenames

David Sumbler david at aeolia.co.uk
Tue Feb 15 16:49:08 UTC 2011


I have some sets of files which have names such as file1.txt,
file2.txt ... file25.txt.

I want to perform an operation on all the files:in other words, I need
to be able to do something like

for integer = str(1 to 25)
     do something to file$integer.txt
next

How can I do this at the bash input?

David
-- 
David Sumbler <david at aeolia.co.uk>



More information about the Techtalk mailing list