The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 06-18-2003
oombera's Avatar
oombera oombera is offline Forum Advisor  
Registered User
  
 

Join Date: Aug 2002
Location: Cleveland, OH
Posts: 804
re: removing trailing space from lines

Quote:
Originally posted by sameerbo
Hi,

How can we remove the all trailing spaces of a line from a file.


TiA
Sameer.
Not sure why this thread was closed without any explanation, but you can do what you're asking with sed 's/[[:blank:]]*$//g' < sourceFile > destFile