Hi,
I have a data file that looks like the following:
1|2|3|4|5|
1|2|3|||
1|2|3|||6
Can I somehow use sed or awk, or other command to add extra pipe character to the end of each line?
I tried sed -f script.sed test1.dat > test2.dat with the following lines in script.sed:
a|||
But the resulting test2.dat had the "|||" appended to a separate line, possibly after the new line character after earch line:
1|2|3|4|5|
|||
1|2|3|||
|||
1|2|3|||6
|||
What I really wanted was:
1|2|3|4|5||||
1|2|3||||||
1|2|3|||6|||
Thanks,
Mike
I have a data file that looks like the following:
1|2|3|4|5|
1|2|3|||
1|2|3|||6
Can I somehow use sed or awk, or other command to add extra pipe character to the end of each line?
I tried sed -f script.sed test1.dat > test2.dat with the following lines in script.sed:
a|||
But the resulting test2.dat had the "|||" appended to a separate line, possibly after the new line character after earch line:
1|2|3|4|5|
|||
1|2|3|||
|||
1|2|3|||6
|||
What I really wanted was:
1|2|3|4|5||||
1|2|3||||||
1|2|3|||6|||
Thanks,
Mike