Re: cgi using shell script : unexpected behavior
On Mar 14, 7:51 pm, Bill Marcum <marcumb...@bellsouth.net> wrote:
> On 2008-03-15, newbiegalore <banerjee.anir...@gmail.com> wrote:
>
>
>
> > #check for ; and |
> > flag=(`echo $input | awk 'BEGIN{flag=0} /;|%3B/{flag=1} /\||%7C/
> > {flag=2} END{print flag}'`)
>
> > if [ $flag -e 0 ];
>
> I think you men if [ $flag -eq 0 ];
> Actually it should be if [ "$flag" -eq 0 ]; Shell variables should be
> quoted unless you want them to undergo word splitting and filename
> expansion.
Hey thanks man! :-)
|