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

Variable $- value:
# echo $-
himBH

character 'i' meens is interactive, ok.

I have script a.sh:

#!/bin/bash
echo $-

Execution:

# ./a.sh
hB

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: 
http://old.nabble.com/test-if-shell-is-interactive-tp33183345p33184499.html
Sent from the Gnu - Bash mailing list archive at Nabble.com.


Reply via email to