Reputation: 261
I have a file like this:
z E l f
A l t E^ t
d Y s
m u s t
z E l f s
x @ w e s t
s t e t s
h E p
w i
t E n
o G @
o G @ n
m I s x i n
s t O n t
and I need to remove a space at the end of each line.
How can I do it? Thank you in advance.
Upvotes: 1
Views: 446
Reputation: 13220
I assume you want to delete trailing spaces and tabs from the end of each line.
awk '{ sub(/[ \t]+$/, ""); print }' file
Upvotes: 2