[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: test if shell is interactive

From: tapczan
Subject: Re: test if shell is interactive
Date: Sun, 22 Jan 2012 11:30:29 -0800 (PST)

DJ Mills wrote:
> This is the correct way to test. What makes you say it's not working for
> you?

Variable $- value:
# echo $-

character 'i' meens is interactive, ok.

I have script a.sh:

echo $-


# ./a.sh

There is no 'i' so the session is non-interactive?
It was invoked from interactive.
Am I missing something?

I tested on vanilla debian 6.0, ubuntu 11.10 - effect is the same.
View this message in context: 
Sent from the Gnu - Bash mailing list archive at Nabble.com.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]