[clug] sh scripts and =~ in csh

Jeremy Kerr jk at ozlabs.org
Wed Sep 12 02:06:56 GMT 2007



> if [ "$answer" == "y*" ] ; then

Almost! :)

if [[ "$answer" == y* ]]

(the single-square-bracket syntax doesn't support regex matching, and 
the quoting you have around "y*" makes it a plain-string match)


Jeremy



More information about the linux mailing list