Table of Contents

About

An interactive shell is when bash is:

Management

Argument

When invoking an interactive shell, you can set the positional parameters with the -s option of bash. See Bash - Bash cli

Testing for Interactive mode

  • Testing for Interactive mode
if [[ $- == *i* ]]
then
    echo "Interactive"
fi

where