shell variable security

Jacques B. jjrboucher at gmail.com
Wed Oct 3 17:10:23 UTC 2007


Forgot my closing square bracket in that last posting. Re-posting for
archive purposes in case someone with less bash experience stumbles
across this later and tries it (and for those of us who copy/paste to
save typing...).

if [ "$name" !> "${name%%+(;|:)*}" ]
then
    echo "Invalid character!"
fi

Jacques B.




More information about the fedora-list mailing list