Test for login shell

Charles Lambert chas at ihuxe.UUCP
Wed Jan 23 09:11:00 AEST 1985


Can anyone suggest a reliable test to determine whether
a shell script is executing in the highest-level instance
of the shell (by "." invocation) or in a child shell
(by normal invocation).

I need to write a script which will "exec" a program if
it is NOT executing at the log-in level (because the session
would disappear on termination of the command).

Mail answers to me, I'll post the best solutions later.



More information about the Comp.unix mailing list