delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/02/02/09:12:57

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-ID: <38983C64.411E68FF@gingerspice.demon.co.uk>
Date: Wed, 02 Feb 2000 14:17:08 +0000
From: Ian Miller <ian AT gingerspice DOT demon DOT co DOT uk>
X-Mailer: Mozilla 4.6 [en] (Win98; I)
X-Accept-Language: en
MIME-Version: 1.0
To: Cygwin Mailing List <cygwin AT sourceware DOT cygnus DOT com>
Subject: Re: B.20.1 bash question - paths sent to #!
References: <20000202134412 DOT 5437 DOT qmail AT web108 DOT yahoomail DOT com>

Earnie Boyd wrote:
> 
> --- Al and Patricia <carat AT earthlink DOT net> wrote:
> > I looked in the archives and did not see a solution to this issue:
> >
> > I have 3 drives on my NT 4.0 system: C: D: E:.
> > I have a perl script that has "#!/usr/bin/perl" in it.
> > I am trying to put the perl script in my path, so that I can run it from
> > any drive.
> > I am using ActiveState Perl.
> 
> Note: You ain't gonna get it working.  Non-Cygwin programs do _not_ understand
> the Cygwin paths.  You'll need to get the Cygwin port of perl to have any luck
> with what you're trying to do.  See the http://sourceware.cygnus.com/cygwin/
> page for URL pointers.

I use Cygwin and Active State Perl but I never noticed this before, because
I always run my scripts from the directory that they are in! However, one
possible work around that I've just tried is to simply set up a shell script
in your bin directory, which then calls Active State Perl with the correct
DOS-style paths, e.g.

--- file: /c/bin/myscript ---

#!/usr/local/bin/tcsh -f
#
# I know this is a bad shell to use, but it's just an example! :)
#

perl c:\\src\\perl\\myscript.pl "$argv"

--- end of file ---

cheers,
ian

-- 
+------------------------------+----------------------------------------------+
| ian miller                   | My other MUA is a GNU.                       |
| ian AT gingerspice DOT demon DOT co DOT uk  | http://www.gingerspice.demon.co.uk           |
+------------------------------+----------------------------------------------+

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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