t23
02-03-2005, 12:02
Hallo, ich benötige bitte eine Erklärung für folgendes:
SETX=1
options="x"
while getopts $options opt 2>/dev/null ; do
case $opt in
(x) SETX=0 ;;
(*) exit 1 ;;
esac
done
shift $(($OPTIND-1))
#===
if [[ $SETX -eq 0 ]] ; then
set -x
fi
SETX=1
options="x"
while getopts $options opt 2>/dev/null ; do
case $opt in
(x) SETX=0 ;;
(*) exit 1 ;;
esac
done
shift $(($OPTIND-1))
#===
if [[ $SETX -eq 0 ]] ; then
set -x
fi