Reputation: 319
Unix command to remove dot at end of each line in file.
Sample rec in file
11234567 0.
23456789 5569.
34567810 1.
10162056 0.
Upvotes: 9
Views: 13735
Reputation: 2943
sed -i 's/\.$//' /path/to/file
This will match a literal period that is anchored to the end of the line, and replace it with nothing. The -i tells sed to make the change inline.
Upvotes: 0
Reputation: 393134
sed -e 's/\.$//'
done. (padding to make answer long enough. grumble)
Upvotes: 2
Reputation: 77105
Just use sed
:
sed 's/\.$//' yourfile
.
using \
. $
to only remove it from the end. -i
option of sed
. Upvotes: 10