Path: utzoo!mnetor!uunet!husc6!cmcl2!rutgers!ucla-cs!zen!ucbvax!cbosgd!ihnp4!ttrdc!levy From: levy@ttrdc.UUCP (Daniel R. Levy) Newsgroups: comp.unix.wizards Subject: Re: PS1 and PWD in david korn's shell Message-ID: <2042@ttrdc.UUCP> Date: 18 Dec 87 03:47:08 GMT References: <13716@think.UUCP> <3268@tut.cis.ohio-state.edu> Distribution: na Organization: AT&T, Skokie, IL Lines: 17 In article <3268@tut.cis.ohio-state.edu>, lvc@tut.cis.ohio-state.edu (Lawrence V. Cipriani) writes: #> function chdir #> { #> "cd" "${@}" && PWD=$(/bin/pwd) #> } #>The chdir function uses the real cd (note the "cd") and #>then sets PWD to the value returned by /bin/pwd. I tried it, it works #>(on Version 06/03/86) (but is noticeably slower). This won't work with older k shells (the syntax VARIABLE=$(command) that is). Was there any particular reason to use (/bin/pwd) instead of `/bin/pwd`? -- |------------Dan Levy------------| Path: ..!{akgua,homxb,ihnp4,ltuxa,mvuxa, | an Engihacker @ | }!ttrdc!ttrda!levy | AT&T Computer Systems Division | Disclaimer? Huh? What disclaimer??? |--------Skokie, Illinois--------|