Is it safe to write scripts like following since OPTIND and OPTARG are global(?) vars?
function func1
{
while getopts "ab:" opt; do
...
done
}
function func2
{
while getopts "ab:" opt; do
...
done
}
while getopts "ab:" opt; do
case $opt in
a) func1 ... ;;
b) func2 ... ;;
esac
done
_______________________________________________ ast-users mailing list [email protected] https://mailman.research.att.com/mailman/listinfo/ast-users
