This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: B.20.1 bash question - paths sent to #!


--- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]