Reputation: 1
I have a .dat file similar to example below:
1|sam |test|
2|eric |test|
3|james|test|
any idea how I can remove the pipe '|' at the end of the line and save it?
I have tried sed 's/.$//' file > file.nolast
Upvotes: 0
Views: 826
Reputation: 1838
sed 's/.$//g' file > file.nolast
g
in the end of sed
command forgotten.
Upvotes: 1