On Thu, Mar 22, 2012 at 2:06 PM, Tim Dickson <t...@tree-of-life.co.uk> wrote: .... > eg a script called test2 as follows > #!/bin/bash > echo "type in your name" > read USERNAME > echo "hello $USERNAME" > > called via the shell by typing > ./test2 > is interactive, but $- special variable doe not indicate it is.
It's not interactive, the kernel calls the script like: /bin/bash test2 that is, it is called with an argument and the manual says: "An interactive shell is one started without non-option arguments "