sorry about that and thanks for your response Franklin52.
i have a script that has this syntax: script <group_id> <user_name> <regex>
rules:
* the user can enter single or multiple group_ids and/or user_names
* the regex is optional
* group_ids are 5-digit integers
* user_names are can be a combo of chars and integers
because the regex parameter is optional, i want to check if it was added at the command line. further, if the regex was actually added, then i want to use that regex value against a different script that i created:
Code:
if any parameter begins with a special character; then
run a different script with the regex parameter
else
do something else
fi
here's as far as i got.. and i admit, it's not far....
Code:
if [ "$*" begins with any of these '[][\\.*$^]/\\&' ]
./script2 regex
else
do something else
fi
thanks