[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: interactive test faulty
From: |
Pierre Gaston |
Subject: |
Re: interactive test faulty |
Date: |
Thu, 22 Mar 2012 19:40:40 +0200 |
On Thu, Mar 22, 2012 at 2:06 PM, Tim Dickson <tim@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 "