1

Writing a for loop to manipulate multiple files

view story
linux-howto

http://www.unix.com – Hi, I have 1000 text files in a folder that are labeled data1.txt all the way to data1000.txt. I want to write a small script that manipulates the text files in this way: (1) cut the 2nd and 9th columns of the text files (2) sort by the numerical value in the 9th column (3) then save the rows where the value in the 9th column is greater than 0.001 in a file that is called newdata*txt. (newdata1.txt to newdata1000.txt) I was wondering if you could help me write a for loop script to achieve that. Thank you! (HowTos)