Path: utzoo!utgpu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!sample.eng.ohio-state.edu!icarus!kaul From: kaul@icarus.eng.ohio-state.edu (Rich Kaul) Newsgroups: alt.sources.d Subject: Re: Multiple executables in path (Was: NON-SOURCE POSTINGS CONSIDERED HARMFUL!) Message-ID: Date: 22 Jan 91 16:58:03 GMT References: <1991Jan21.171227.12138@convex.com> <1991Jan22.053747.14144@convex.com> <5570@idunno.Princeton.EDU> Sender: kaul@ee.eng.ohio-state.edu (Rich Kaul) Organization: Ohio State University Electrical Engineering Lines: 49 In-Reply-To: pfalstad@phoenix.Princeton.EDU's message of 22 Jan 91 08:19:11 GMT 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): >:with bash, where you can have a PATH with unexpanded ~ references in >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. Hmmm, I beg to disagree. Also, $HOME is not appropriate when searching another user's directory, cf: Script started on Tue Jan 22 08:45:16 1991 bash$ echo $PATH /usr/1/kaul/bin:/usr/1/kaul/bin/sun3:/usr/bin/X11:/usr/local/gnu/bin:/usr/local/bin:~octtools/bin:~cad/bin:/usr/ucb:/usr/bin:/usr/etc:. bash$ which magic /usr/1/cad/bin/magic bash$ magic Magic - Version 6.3 - Last updated Thu Sep 13 13:21:25 PDT 1990 Using technology "scmos". > :quit bash$ exit exit script done on Tue Jan 22 08:46:09 1991 (saying ~cad/bin/magic gives the same result). Bash does the expansion of the ~ before running the program. It is possible to force the expansions manually, but that's usually more work than desired. Besides, the ~ in bash has more functions than the equivalent ~ in csh (see Chet Ramey's bash man page for more information). Obligatory plug for bash: it's worth it. It's a very nice shell, with full emacs editing and very good vi editing if that's your dialect. It's certainly more fun than tcsh, which I used before, and has a more POSIX-ified behavior. There are still some bugs, although Chet's version is nearly bug free, and version 1.06 is long overdue. I liked it so much, I use the shell (or something to that effect). -- Rich Kaul | Every man is given the key to the door kaul@icarus.eng.ohio-state.edu | of heaven; unfortunately, the same key or ...!osu-cis!kaul | opens the door to hell.