Suppose I have a pipe delimited file called jam.dat which has
aaa|bbb|ccc|ddd|
eee|fff|ggg|hhh|
iii||kkk|lll|
mmm||||
qqq|rrr|sss|ttt|
I just needed to write a script that will erase the ending '|' symbol from each of the lines. How do I do this ?
The end output should look like:
aaa|bbb|ccc|ddd
eee|fff|ggg|hhh
iii||kkk|lll
mmm|||
qqq|rrr|sss|ttt
Thanks