Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!uflorida!reef.cis.ufl.edu!ruck From: ruck@reef.cis.ufl.edu (John Ruckstuhl) Newsgroups: comp.unix.shell Subject: How does one learn arg0 in csh Message-ID: <25611@uflorida.cis.ufl.EDU> Date: 28 Nov 90 04:44:29 GMT Sender: news@uflorida.cis.ufl.EDU Organization: UF CIS Dept. Lines: 21 I'd like to test if a csh is a login shell in ~/.cshrc. In a Bourne shell, I can look at $0 and see "-sh" , but in csh, $0 substitutes "the name of the file from which command input is being read" which is an error in an interactive csh. "login" documentation says: Argument 0 of the command interpreter is the name of the command interpreter with a leading dash ('-') prepended. I am aware that if the csh !is! the login shell, then ~/.login will be sourced. I am using the csh shipped with SunOS 4.1 on SPARCStation1+'s. "what `which csh`" shows a lot of revision info -- perhaps this line identifies the version sufficiently: sh.c 1.22 89/05/22 SMI; from UCB 5.3 3/29/86 Thank you for your comments, ruck -- John R Ruckstuhl, Jr University of Florida ruck@cis.ufl.edu, uflorida!ruck