I am looking for a case statement pattern matching on a unix comment line.
For eg. given input in a file,
#aa=1
b=2
c=3
#ddd=4
so, the comment lines needs to be skipped while reading.
case "$line" in
aa) do_something;;
b) do_something;;
c) do_something;;
ddd) do_something;;
#) ;; /*NOT WORKING!! */
*) invalid input;;
esac
I tried couple of patterns but not working.
Thanks.