Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove spaces at begining of line

Status
Not open for further replies.

kunder

Programmer
May 28, 2000
1
US
I want to be able to read in a text file and remove all spaces at the beginning of each line.<br><br>kunder
 
<br>This will do what you want, but you have to re-direct to an output file or pipe into another nawk script if other changes are required.<br><br>nawk '{gsub(/^\ +/,&quot;&quot;)}{print}' infile &gt; outfile<br><br>Hope this helps you! <p>flogrr<br><a href=mailto:flogr@yahoo.com>flogr@yahoo.com</a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top