Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!decwrl!purdue!gatech!udel!burdvax!psuvax1!vu-vlsi!dsinc!syd From: syd@dsinc.UUCP (Syd Weinstein) Newsgroups: comp.sources.d Subject: Re: Perl: Hacking The !# Simulation Message-ID: <394@dsinc.UUCP> Date: 30 Apr 88 21:22:13 GMT References: <67@uvaarpa.virginia.edu> Reply-To: syd@dsinc.UUCP (Syd Weinstein) Organization: Datacomp Systems, Inc., Huntingdon Valley, PA 19006 Lines: 24 In article <67@uvaarpa.virginia.edu> mer6g@uvaarpa.Virginia.EDU (Marc E. Rouleau) writes: >With this in mind I'd like to propose that something like the following be :done instead: : :eval "exec /bin/perl `/usr/local/ksh -c \"whence $0\"` $*" : if $running_via_sh; : :If ksh(1) isn't available on your system, I think csh(1) has a built-in :called "which" which functions like ksh's "whence". : :The only folks still left in the cold are those who have only the Bourne :shell (sh(1)). : -- Marc Rouleau Even those are not left out in the cold, they can use the type internal command which finds the executable. Now we need a way to have it automatically determine the shell type and use the appropriate command if needed. Any authors out there that will figure out ksh, csh or sh and use whence, which, or type? -- ===================================================================== Sydney S. Weinstein, CDP, CCP Datacomp Systems, Inc. Voice: (215) 947-9900 {allegra,bellcore,bpa,vu-vlsi}!dsinc!syd FAX: (215) 938-0235