public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: B.20.1 bash question - paths sent to #!
@ 2000-02-02  7:07 Earnie Boyd
  0 siblings, 0 replies; 7+ messages in thread
From: Earnie Boyd @ 2000-02-02  7:07 UTC (permalink / raw)
  To: Ian Miller, Cygwin Mailing List

--- Ian Miller <ian@gingerspice.demon.co.uk> wrote:
-8<-
> 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 ---

--- file: c:\bin\stupid.script

#! c:/winnt/system32/cmd /c
#
# This is probably a worse example.
#

perl c:\src\perl\myscript.pl $@

#                            ^^  to be replaced with what DOS would expect
#                                which I haven't the slightest clue.

--- end of file ---


Note, I have a noop program named #.exe that is on the PATH that CMD uses.

--- File: noop.c

int main ( void ) { return 0; }

--- end of file ---

gcc -o #.exe noop.c


Regards,

=====
Earnie Boyd < mailto:earnie_boyd@yahoo.com >
Cygwin Newbies, please visit
< http://www.freeyellow.com/members5/gw32/index.html >
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: B.20.1 bash question - paths sent to #!
@ 2000-02-02  5:44 Earnie Boyd
  2000-02-02  6:17 ` Ian Miller
  0 siblings, 1 reply; 7+ messages in thread
From: Earnie Boyd @ 2000-02-02  5:44 UTC (permalink / raw)
  To: Al and Patricia, cygwin

--- Al and Patricia <carat@earthlink.net> wrote:
> Hello -
> 
> 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.

Regards, 

=====
Earnie Boyd < mailto:earnie_boyd@yahoo.com >
Cygwin Newbies, please visit
< http://www.freeyellow.com/members5/gw32/index.html >
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 7+ messages in thread
* B.20.1 bash question - paths sent to #!
@ 2000-02-01 13:11 Al and Patricia
  2000-02-01 21:52 ` Doug Wyatt
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Al and Patricia @ 2000-02-01 13:11 UTC (permalink / raw)
  To: cygwin

Hello -

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.

Here is the situation.  First, my perl script is called "pop3", and it
resides in /e/perl/bin.  If I put /e/perl/bin in my path, then I believe
that bash calls /usr/bin/perl with the file name as /e/perl/bin/pop3.
However, AS Perl can't interpret this file name and gives a "file not found"
error.

I tried putting /perl/bin/ in my path, and this works, as long as I am "on"
the e drive.  When I go to another drive, /perl/bin does not exist, and
calling pop3 fails again.

So what I'd like is to have bash convert the Posix path of the called script
to win32 when using the #! syntax, so that AS Perl (and other interpreters)
will have a path it can work with.  Is there a workaround?

I hope this makes sense.  Let me know if can clarify.
-----------------
Al and Patricia





--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2000-02-02 14:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-02-02  7:07 B.20.1 bash question - paths sent to #! Earnie Boyd
  -- strict thread matches above, loose matches on Subject: below --
2000-02-02  5:44 Earnie Boyd
2000-02-02  6:17 ` Ian Miller
2000-02-01 13:11 Al and Patricia
2000-02-01 21:52 ` Doug Wyatt
2000-02-02 13:22 ` Michael Hirmke
2000-02-02 14:14 ` Soren Andersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).