# invoked as ". ./test.sh", the shell is interactive
# invoked as "bash ./test.sh", the shell is not interactive
case "$-" in
*i*)	echo This shell is interactive: $- ;;
*)	echo This shell is not interactive: $- ;;
esac

