Re: cgi using shell script : unexpected behavior
On 2008-03-15, newbiegalore <banerjee.anirban@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.
|