I am running this script in AIX (tried SH, KSH). I would like to pass in a comma deliminted list and have the script parse the list. I ran this same script in an HPUX environment and it works perfectly. I thought if I used the same shell it wouldnt matter what flavor of Unix it was on (obviously I was incorrect).
send_page() {
for DBA in ${1}; do
echo in
echo $DBA
case $DBA in
jesse) echo "jesse";;
mika) echo "mika";;
esac
done
}
send_page "$1"
At the command I type "t.sh jesse"
output is:
in
jesse
jesse
This is correct
When I run "t.sh "{jesse,mika}"
output is:
in
{jesse,mika}
This is not correct I expected the following results
in
jesse
jesse
mika
mika
I have tried different variation with the syntax and nothing seems to work. As I said this scripts works perfectly on HP so how do I port this functionality over to AIX.
Thanks
JS
send_page() {
for DBA in ${1}; do
echo in
echo $DBA
case $DBA in
jesse) echo "jesse";;
mika) echo "mika";;
esac
done
}
send_page "$1"
At the command I type "t.sh jesse"
output is:
in
jesse
jesse
This is correct
When I run "t.sh "{jesse,mika}"
output is:
in
{jesse,mika}
This is not correct I expected the following results
in
jesse
jesse
mika
mika
I have tried different variation with the syntax and nothing seems to work. As I said this scripts works perfectly on HP so how do I port this functionality over to AIX.
Thanks
JS