Hello all,
I am trying to read a series of 50 text files, called
filename01A.txt
filename02A.txt
filename03A.txt
.. etc, up to
filename57A.txt
These files are long, but there is one occurance of the phrase "[distance]" and I want to grab the 12 characters (..not the 13th..etc) that follow to the right of the phrase "[distance]" and put that data into a file called "output.txt" as a new line of text.
However, right now, I can at least get a new file called "output.txt" to be made, but the data is crap... here is what I have:
ben@ben-VB: ~/Desktop/TEST$ for filename in *; do awk '$0 ~ "[steps]" {print $0}' "$filename" > "output.txt"; done
Any suggestions?
I am trying to read a series of 50 text files, called
filename01A.txt
filename02A.txt
filename03A.txt
.. etc, up to
filename57A.txt
These files are long, but there is one occurance of the phrase "[distance]" and I want to grab the 12 characters (..not the 13th..etc) that follow to the right of the phrase "[distance]" and put that data into a file called "output.txt" as a new line of text.
However, right now, I can at least get a new file called "output.txt" to be made, but the data is crap... here is what I have:
ben@ben-VB: ~/Desktop/TEST$ for filename in *; do awk '$0 ~ "[steps]" {print $0}' "$filename" > "output.txt"; done
Any suggestions?