On Sat, Feb 12, 2005 at 02:56:51PM +0100, Marco d'Itri wrote: > Checking if $PS1 is defined is a popular way to determine if a shell is > an interactive shell, or a program has been started from an interactive > shell. But dash always sets the variable.
I cannot read from the standards that $PS1 must not be set in a non-interactive shell; I found posh and ksh behave the same as dash. A reliable way to check whether a shell is interactive or not is to look for the options flag character i in $-. Regards, Gerrit. http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_05_03 -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

