Hi,
For the text file let us say t.txt having the statements as below.
filename : t.txt.
Contents :
This is first string1
This is first string2
This is first string3
The output of the file should have newline. How to introduce the new line so that the output be as follows
This is first string1
This is first string2
This is first string3
Pls advise.
panyam
2
something like this:
awk '{ print }' ORS="\n\n" inputfile > opfile
kindly note that after the "\" use "Enter" key literally in below
sed -e 's/$/\
/g' t.txt
o/p
This is first string1
This is first string2
This is first string3
---------- Post updated at 12:20 ---------- Previous update was at 12:18 ----------
or you can use nawk as below
nawk '1' ORS="\n\n" t.txt
;);)
awk '{print $0"\n"}' t.txt
Scott
6
sed G file
Or, if you don't want a blank last line:
sed '$!G' file