UNIX prompts (-ksh)
Bruce T. Harvey
bruce at idsssd.UUCP
Wed Mar 29 03:30:48 AEST 1989
In article <4549 at vpk4.UUCP>, hjespers at vpk4.UUCP (Hans Jespersen) writes:
> In article <2391 at buengc.BU.EDU> bph at buengc.bu.edu (Blair P. Houghton) writes:
> >In article <11080 at well.UUCP> tneff at 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
More information about the Comp.unix.questions
mailing list