Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!unhd.unh.edu!msel.unh.edu!rg From: rg@msel.unh.edu (Roger Gonzalez) Newsgroups: comp.unix.questions Subject: Re: csh levels Message-ID: <1991Feb7.153513.15618@unhd.unh.edu> Date: 7 Feb 91 15:35:13 GMT References: <1991Feb5.000455.9976@massey.ac.nz> <5948@idunno.Princeton.EDU> <2011@necisa.ho.necisa.oz.au> Sender: news@unhd.unh.edu (USENET News System) Organization: UNH Marine Systems Engineering Laboratory Lines: 32 I don't have anything that just prints your arbitrary csh level, but this handles a couple important cases: From the default .cshrc I set up new users to source in /: ---- if ($?prompt == 0) exit set user = `who am i | cut -d" " -f1 | cut -d\! -f2` set host = `hostname` set prefix = $host':'$user set user2 = `whoami` if ($user2 == 'root') then set suffix = '#' else set suffix = '%' endif if ($user == $user2) then set prompt = $prefix$suffix' ' else set prompt = $prefix' ('$user2')'$suffix' ' endif ---- I realize that this is isn't quite what you want, but I've been asked for this a couple times before. -Roger -- "The question of whether a computer can think is no more interesting than the question of whether a submarine can swim" - Edsgar W. Dijkstra rg@[msel|unhd].unh.edu | UNH Marine Systems Engineering Laboratory r_gonzalez@unhh.bitnet | Durham, NH 03824-3525