C shell scripts (was: Re: which(1), rewritten in C?)

2000-03-03 Thread Patrick M. Hausen

Hi all!

 On Thu, Mar 02, 2000 at 08:47:19PM -0500, Dan Papasian wrote:
  While this may sound crazy, I was tired of 'which' taking a long
  time to complete on my 486 dx4/100 when it was under extereme
  pressure, so I rewrote it in C :)
  
  I don't think that it is worthwhile replacing this perl script
  with one written in C, but if anyone is interested...
 
 Why in the world isn't ``which'' written as a csh shell script??

Most probably because C shell scripts should be avoided at any
cost.

See: http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/

Regards,
Patrick
-- 
WEB Internet Services Systemhaus GmbH   Scheffelstr. 17a76135 Karlsruhe
 phone +49 721 9109 0   fax +49 721 9109 100   http://www.punkt.de/
   Patrick M. Hausen   Technical Director   email [EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: C shell scripts (was: Re: which(1), rewritten in C?)

2000-03-03 Thread Peter Edwards

Assar Westerlund wrote:

 There's a real reason for not writing this in csh.  Because the
 built-in function will return results for csh, which might not be the
 right ones for other shells.
 
I got bitten by this by HP-UX 10's csh-based "which". My solaris-hosted
NFS home directory had the default Solaris .cshrc that changes $path.
Needless to say, "which" was somewhat misleading :-)
Ugh.
--
Peter.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message