Pattern matching in ksh script -
i have url parameters in variable
a=44&search=my world
here want pattern matching like
if [ $a =~ "search" ] ; value=1 else value=0 fi but not working in ksh script.
you need [[ ksh regular expressions, not bourne shell [. although in case hardly seems worth using re.
so:
if [[ $a =~ "search" ]] value=1 else value=0 fi ksh
No comments:
Post a Comment