Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!sdd.hp.com!news.cs.indiana.edu!maytag!xenitec!edhew From: edhew@xenitec.on.ca (Ed Hew) Newsgroups: comp.unix.xenix.sco Subject: Re: whoami? Summary: logname? Keywords: whoami, id, logname Message-ID: <1990Dec30.080938.21103@xenitec.on.ca> Date: 30 Dec 90 08:09:38 GMT References: <6537@crash.cts.com> <18865@rpp386.cactus.org> Followup-To: comp.unix.xenix.sco Organization: Xenitec Consulting Services, Kitchener, ON, CANADA Lines: 19 In article <18865@rpp386.cactus.org> jfh@rpp386.cactus.org (John F Haugh II) writes: > >if ( `id | sed -e 's/^[^(]*(\([^)]*\)).*$/\1/'` == "root" ) then > set prompt = "#" >else > set prompt = "%" >endif >-- >John F. Haugh II UUCP: ...!cs.utexas.edu!rpp386!jfh >Ma Bell: (512) 832-8832 Domain: jfh@rpp386.cactus.org Unless I'm missing something, why not simply if ( `logname` == "root" ) then ....and so on? -- Ed. A. Hew , XeniTec Consulting Services or if you're really stuck: ..!{watmath|lsuc}!xenitec!eah