Created
April 14, 2011 15:17
-
-
Save finsterthecat/919688 to your computer and use it in GitHub Desktop.
Remove all comment lines. Shows how to invoke ruby as line filter using regex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Remove all line comments. Backup may be important... | |
ruby -pi.bak -e '$_.sub!(/^#.*/, "")' /work/test.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment