1
I need help or I will do this is python instead (by reading one line at a time) which I know I should not need to.
I have large number of text files that I get using find.
FILES=$(find ... -iname "*.txt")
num=0
for doc in $FILES; do
echo "start string" > cat $doc > echo "end string" > "outfile$num.txt"
let num=num+1
done
I dont know to many unix commands, but what I want to do is something like this:
output "start string" then cat $doc then "end string" to stdout and store in the outfile.
Thank you for your help!!
Thank you, regrettably I have too much work to do (and too little time) to read up on Unix and different utility programs.
Even though my question was probably a dumb question, stress really makes you not think clearly. You have made my day much better, thanks again! :) – Erik – 2012-09-12T05:22:47.540
The first example needs a little tweaking:
{ echo ...; cat $doc; echo ...; }. Spaces to separate the braces from the contents, and a required semicolon after the last echo. – chepner – 2012-09-12T15:54:43.723