Bash -Test in interaktiver Schale

if [[ $- == *i* ]]
then
    do_interactive_stuff
fi
Gifted Gull