Quote:
Originally Posted by bkelly
this does not work
Code:
if [[ "$line" == "#"* ]];
then
# echo "found"
else
echo "not found"
fi
If seems the IF cannot take a null set of commands. That's not very nice.
|
i think that would be perfectly normal, although i agree with scasey: bash should be able to just skip over that.
even if not, you can always use
or negate the if test:
Code:
if ! [[ "$line" == "#"* ]];
then
echo "not found"
fi