I'm looping over lines in a file. I just need to skip lines that start with "#". How do I do that?
#!/bin/sh
while read line; do
if ["$line doesn't start with #"];then
echo "line";
fi
done < /tmp/myfile
Thanks for any help!
I'm looping over lines in a file. I just need to skip lines that start with "#". How do I do that?
#!/bin/sh
while read line; do
if ["$line doesn't start with #"];then
echo "line";
fi
done < /tmp/myfile
Thanks for any help!
Frankly, however, it is often clearer to turn to
grep
: