peter360 wrote: > In an interative shell, what is the easiest way to tell whether it is a login > shell or not? Thanks.
In sufficiently modern versions of bash (basically anything newer than bash-2.05), you can test the setting of the `login_shell' shopt variable. The shell sets it automatically for login shells. The most portable way to do it, in the sense that it works across multiple versions of multiple shells, is to set a variable in ~/.bash_profile and test it later. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer Live Strong. No day but today. Chet Ramey, ITS, CWRU [EMAIL PROTECTED] http://cnswww.cns.cwru.edu/~chet/ _______________________________________________ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash