Delete leading whitespace (spaces/tabs/etc) from beginning of each line
ruby -pe 'gsub(/^\s+/, "")' < file.txt
This entry was posted
on Monday, May 11th, 2009 at 11:21 pm and is filed under Command Line, Linux, Ruby.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.
[…] « Delete Leading Whitespace […]
Mail (will not be published) (required)
I am Binny V A, a freelance Web Developer on the LAMP Platform. Open Source Geek.
Follow me(@binnyva) on Twitter