Path: utzoo!utgpu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!rpi!bu.edu!shelby!rutgers!njin!princeton!phoenix.Princeton.EDU!pfalstad From: pfalstad@phoenix.Princeton.EDU (Paul Falstad) Newsgroups: alt.sources.d Subject: Re: Multiple executables in path (Was: NON-SOURCE POSTINGS CONSIDERED HARMFUL!) Message-ID: <5612@idunno.Princeton.EDU> Date: 23 Jan 91 00:53:50 GMT References: <1991Jan22.053747.14144@convex.com> <5570@idunno.Princeton.EDU> <1991Jan22.220246.9920@usenet.ins.cwru.edu> Sender: news@idunno.Princeton.EDU Organization: The E. Henry Thripshaw Fan Club Lines: 53 chet@po.CWRU.Edu wrote: >In article <5570@idunno.Princeton.EDU> pfalstad@phoenix.Princeton.EDU (Paul Falstad) writes: >>tchrist@convex.COM (Tom Christiansen) wrote: >>>From the keyboard of kaul@icarus.eng.ohio-state.edu (Rich Kaul): >>>That's odd -- if you have unexpanded tildes in your environment, >>>I wonder how you get system, popen, and execlp to work without >>>changing the C library. >>You don't, it seems. At least it didn't work for me. This is probably >>a bug in bash. You should use $HOME instead of ~ when you define >>your PATH. >You have to go through special pains to get an unexpanded tilde in >your PATH, since tilde expansion is performed on the rhs of assignment >statements. The only way you can get a tilde into your path is to >surround it with quotes. It might be a bug that double quotes can >inhibit the expansion. Well, you might have fixed it in the CWRU version, but my version (1.05.1) has the bug. Perhaps I need an update. But I would hardly call the following script "going through special pains." Script started on Tue Jan 22 19:48:33 1991 warning: could not update utmp entry Z 1 phoenix:~/src/zsh echo $PATH /n/uffda/b/pfalstad/scr:/u/pfalstad/bin/sun4:/usr/princeton/bin:/usr/ucb:/usr/bi n:/bin:/u/maruchck/scr:/u/cs320/bin:/u/subbarao/bin:/u/maruchck/bin:/usr/hosts:/ usr/princeton/bin/X11:/usr/etc:/etc Z 2 phoenix:~/src/zsh bash bash$ echo $PATH /n/uffda/b/pfalstad/scr:/u/pfalstad/bin/sun4:/usr/princeton/bin:/usr/ucb:/usr/bi n:/bin:/u/maruchck/scr:/u/cs320/bin:/u/subbarao/bin:/u/maruchck/bin:/usr/hosts:/ usr/princeton/bin/X11:/usr/etc:/etc bash$ PATH=~/scr:~/bin/sun4:/usr/princeton/bin:/usr/ucb:/usr/bin:/bin:~maruchck /scr:~cs320/bin:~subbarao/bin:~maruchck/bin:/usr/hosts:/usr/princeton/bin/X11:/ usr/etc:/etc bash$ echo $PATH /n/uffda/b/pfalstad/scr:~/bin/sun4:/usr/princeton/bin:/usr/ucb:/usr/bin:/bin:~ma ruchck/scr:~cs320/bin:~subbarao/bin:~maruchck/bin:/usr/hosts:/usr/princeton/bin/ X11:/usr/etc:/etc bash$ Z 3 phoenix:~/src/zsh exit script done on Tue Jan 22 19:49:30 1991 The ~ is expanded only for the first component in the PATH, not for the remaining components. Bash handles this fine, of course, but execlp does not. -- Paul Falstad, pfalstad@phoenix.princeton.edu PLink:HYPNOS GEnie:P.FALSTAD In the heat of composition I find that I have inadvertently allowed myself to assume the form of a large centipede. I am accordingly dictating the rest to my secretary.