[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 $-
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.