Results 1 to 1 of 1
Hi,
I have the following statment which is getting the values from two text files and merging them into another file:
for i in `seq -w 1 1300`;do for a ...
- 05-12-2008 #1Just Joined!
- Join Date
- May 2008
- Posts
- 18
Spacing between for do loop
Hi,
I have the following statment which is getting the values from two text files and merging them into another file:
for i in `seq -w 1 1300`;do for a in Final.txt query.txt;do cat $a | sed -n "$i p" >> Result.txt;done;done
The output into the file Result.txt is as follows:
Value in final.txt
Value in query.txt
Value in final.txt
Value in query.txt
Value in final.txt
Value in query.txt
Value in final.txt
Value in query.txt
Value in final.txt
Value in query.txt
I would like to leave a line Spacing between the Value in query.txt and final.txt to have the following output:
Value in final.txt
Value in query.txt
Value in final.txt
Value in query.txt
Value in final.txt
Value in query.txt
I have tried using the following statement, however i do not receive the desired output:
for i in `seq -w 1 1300`;do for a in Final.txt query.txt;do cat $a ;echo /n | sed -n "$i p" >> Result.txt;done;done
Any advice?? Thanks!


Reply With Quote