Hi.. I have several line contains number like:
XXXXXX.XXX (this number ended by whitespace.)
How can I delete whitespace at the end of number format using sed? Thank for the help.
Hi.. I have several line contains number like:
XXXXXX.XXX (this number ended by whitespace.)
How can I delete whitespace at the end of number format using sed? Thank for the help.
sed -e 's/\s*$//' in > out
removes any trailing spaces
sed -re 's/^([0-9\.]+)\s*$/\1/' in > out
removes trailing spaces only on line beginning with a combination of digits and dot