i am writing a bourne shell script to append to each line in a text file a return character (new line) then followed by 'go'
using:
#!/bin/sh
cat ${format_file_name}.out | /bin/sed -e 's/$/^Mgo/g' > junk.lst
example of row in file ${format_file_name}.out:
table1
table2
table3
using <ctrl v><ctrl M> for the return character.
whats happening to output file junk.lst is
table1^Mgo
table2^Mgo
table3^Mgo
wanting to achieve:
table1
go
table2
go
table3
go
not inserting a new row. any help would be appreciated.
thanks.
using:
#!/bin/sh
cat ${format_file_name}.out | /bin/sed -e 's/$/^Mgo/g' > junk.lst
example of row in file ${format_file_name}.out:
table1
table2
table3
using <ctrl v><ctrl M> for the return character.
whats happening to output file junk.lst is
table1^Mgo
table2^Mgo
table3^Mgo
wanting to achieve:
table1
go
table2
go
table3
go
not inserting a new row. any help would be appreciated.
thanks.