delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/05/29/06:41:47

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
From: Sam Edge <sam DOT edgeZZZ AT connectfree DOT co DOT uk>
To: cygwin AT cygwin DOT com
Subject: Re: behaviour of "for (( exp1; exp2; exp3 )); do COMMANDS; done"
Date: Thu, 29 May 2003 11:41:24 +0100
Organization: .
Reply-To: cygwin AT cygwin DOT com
Message-ID: <fbobdv047sugu5nqegrlv9ctqfe56afff1@4ax.com>
References: <002901c32427$2e1553e0$78d96f83 AT pomello> <PHENJGDFMJPEBOBLGEMOKENMCBAA DOT peter DOT oosterlynck AT oracle DOT com> <ocj6dvc16hc7e702hhe1dktohpm1306oi6 AT 4ax DOT com> <20030527120718 DOT GA22030 AT convex DOT org DOT uk> <eq29dvgfdunpptfj4ak084g2lfa22as6m1 AT 4ax DOT com> <m3brxn1f9w DOT fsf AT ate DOT maierh> <77h9dvo3rjbopg45hi1ec65igvfv6i2lkg AT 4ax DOT com> <m3fzmyayjc DOT fsf AT ate DOT maierh>
In-Reply-To: <m3fzmyayjc.fsf@ate.maierh>
MIME-Version: 1.0
X-Posting-Agent: Hamster/2.0.0.1
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id h4TAfkn27400

Harald Maier <maierh AT myself DOT com> wrote in <m3fzmyayjc DOT fsf AT ate DOT maierh>
in gmane.os.cygwin on Thu, 29 May 2003 11:32:23 +0200:

> >> Some people are using the env program to use the PATH environment:
> >> #! /usr/bin/env perl
> >> BEGIN { $^W = 1 }
> > Erm ... doesn't this just duplicate the problem? How can you guarantee
> > that "env" is always in /usr/bin?
> > It's also pretty inefficient, isn't it?
> It gives you the freedom to start different interpreters with the same
> script. E.g. perl-5.6 or perl-5.8. This might be interesting for
> testing purposes. What are you looking for?

I was looking for portability of scripts where the script interpreter
may not be in the same location e.g. bash is /bin/bash on Linux and
Cygwin but may be /usr/bin/bash or /usr/local/bin/bash or even
$HOME/bin/bash on another system.

The obvious idea would be for the code that handles "#!/bin/xxxx" to
look in the $PATH if xxxx doesn't exist in /bin - but there are
security concerns with this approach, of course.

Anyway, the whole discussion is not Cygwin specific. If anyone wants
to discuss it further then e-mail me direct. (You'll have to make my
e-mail address less sleepy to do so.)

Regards,
-- 
Sam Edge

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019