Hi,
I have a shell script, which reads a *.txt file - line by line. In this text file, I have some lines beginning with "#" that I want to ignore :
MY_FILE
#blah blah blah 1
blah blah blah 2
blah blah blah 3
#blah blah blah 4
I want my script to read only the following lines and process them:
blah blah blah 2
blah blah blah 3
Is there a way to incorporate this in my shell script?
#!/bin/bash
MY_FILE=$1
[ $# -eq 0 ] && { echo "Usage: $0 <filename>"; exit 1; }
while read line
do
.......
.......
......
.....
....
done < "$MY_FILE"