Results 1 to 2 of 2
I am trying to complete a script that reads a text file and only includes lines that do not start with a "#" symbol. How would you go about it? ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 10-24-2012 #1
- Join Date
- Jun 2010
How do I test for the presents of a character in a string?
Thanks in advance
- 10-24-2012 #2
use grep with the -v option and escape the #. For example, if you are catting "test.txt"
cat test.txt | grep -v \#