Login shell?

Ron Natalie ron at ron.rutgers.edu
Sun Oct 23 23:32:40 AEST 1988


> Just take the output from ps -x (or -f if on system V) grep for pid $$
> and check if the command name begins with a '-'. If that is the case the
> shell is the login shell.

How about just comparing $0.



More information about the Comp.unix.questions mailing list