Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!haven!aplcen!wb3ffv!idsssd!bruce From: bruce@idsssd.UUCP (Bruce T. Harvey) Newsgroups: comp.unix.questions Subject: Re: UNIX prompts (-ksh) Summary: y Message-ID: <540@idsssd.UUCP> Date: 28 Mar 89 17:30:48 GMT References: <18805@adm.BRL.MIL> <11080@well.UUCP> <2391@buengc.BU.EDU> <4549@vpk4.UUCP> Organization: In*sight Distribution Systems, Hunt Valley, MD Lines: 28 In article <4549@vpk4.UUCP>, hjespers@vpk4.UUCP (Hans Jespersen) writes: > In article <2391@buengc.BU.EDU> bph@buengc.bu.edu (Blair P. Houghton) writes: > >In article <11080@well.UUCP> tneff@well.UUCP (Tom Neff) writes: > >> export PS1='$PWD> ' > Absolutely correct. I think Tom ment > export PS1=`$PWD> ` Nope. Tom meant '$PWD' when he said it. The reason for the single quotes is so that the shell where the definition is being made does not interpret $PWD. If it did, the current working directory of _that_shell_ would _always_ display. By quoting it, four characters ($, P, W, and D) are exported and not interpreted by ksh _until_displayed_. I don't think sh- does any interpretation of displayed variables in this manner, which is why it doesn't work this way using sh-. If you use back-quotes, as in above, you end up trying to execute a directory. (" ... Hmm. I wonder if that's why directories must be x-ecutable to be used ...") -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Bruce T. Harvey (B-}> | ... cp1!sarin!wb3ffv!idsssd!idssup!bruce (Title depends on day) | ... ctnews!idsssd!idssup!bruce (301) 584-1960 | Convergent Route Distribution Sys. - Hunt Valley, MD