I have this simple script which tests a string:
#! /bin/sh OR APPROPRIATE
s_str=xx
if [[ $s_str = $pattern ]]; then
echo $s_str
fi
This works (i.e., I see the echo) in the GNU bash shell 1.14.7 for
Windows, and in the MKS Korn shell. In the pdksh of FreeBSD, it works
"if [ $s_str = +(xx|yy|zz) ]; then"
On the Apache server of my ISP, which runs GNU bash 1.14.7 under
i386-linux, I tried various combinations of:
"if [ $s_str = +(xx|yy|zz) ]; then",
but I never saw an echo.
How does it work generally in the bash shell?
And, is there a possibility to match substrings, i.e.,
match "xx" out of "123xx456"??
Thanks,
Andre
Andre van Straaten
Bradford, UK
http://www.vanstraatensoft.com