Tuesday, July 12, 2005

Remove trailing spaces from a file in UNIX

To remove trailing spaces from a file,
sed -e 's! *$!!' /path/to/input >output
sed -e 's! *$!!' chaganlal.txt.bak > chaganlal.txt.nospace

0 Comments:

Post a Comment

<< Home