Here's what I did: lhall@lhall->cat foo #!c:/winnt/system32/cmd.exe lhall@lhall->foo Microsoft Windows 2000 [Version 5.00.2195] (C) Copyright 1985-2000 Microsoft Corp.
C:\tmp>exit lhall@lhall->ls -l bar lrwxrwxrwx 1 lhall Domain U 14 Feb 21 15:57 bar -> foo lhall@lhall->bar Microsoft Windows 2000 [Version 5.00.2195] (C) Copyright 1985-2000 Microsoft Corp. C:\tmp>exit lhall@lhall->uname -a CYGWIN_NT-5.0 lhall 1.3.20(0.73/3/2) 2003-02-08 12:10 i686 unknown unknown Cygwin I tried with making the symlink as a Windows shortcut (the default) and the (older) magic options (nowinsymlinks). Worked for me either way whether I used /bin/sh or /bin/bash as my initial shell. The problem is definitely with the native Perl's (or CQPerl's) interpretation of what it gets. Larry Original Message: ----------------- From: Bob McGowan [EMAIL PROTECTED] Date: Fri, 21 Feb 2003 12:23:15 -0800 To: [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: Symlink to script fails I've been playing around with this, too. I have a Windows 'native' version of Perl 5.8.0 available to play with and when I used it, I got the same error as Andrew did. I'm not sure how you did your cmd.exe test? I tried it, in the form of a shebang file. It 'worked' but it did complain about the shebank line not being recognized. But that's a side issue, just curious;-) What I think is going on here has to do with how the "exec" for shebang does its thing. The interpreter named in the shebang line is exec'd, with the path name of the script file as an argument. I'd suggest that the Windows/DOS commands in question (my perl 5.8.0 and CQPerl) are unable to find the file, in the failing case, because they are reading a symlink, which they don't know how to deal with. So they are reading the content of the symlink, not what it points to. I'm not sure why cmd.exe isn't having the same problem. Perhaps there's something in Windows/DOS program linking that needs to be done to get them to work with .lnk files? Like the business of linking into a program the ability to do wild card expansion. [EMAIL PROTECTED] wrote: > I tried the same thing with c:/winnt/system32/cmd.exe (I don't have > CQPerl ;-) ) and it worked fine. Perhaps you can try that and see > if it points to a CQPerl problem or some local configuration issue. > > > Larry > > Original Message: > ----------------- > From: Andrew DeFaria [EMAIL PROTECTED] > Date: Fri, 21 Feb 2003 10:41:45 -0800 > To: [EMAIL PROTECTED] > Subject: Symlink to script fails > > > I have need to use Rational's "CQPerl" which appears to be a derivative > of Active State Perl that allows me to use Perl to access Clearquest. I > have a perl script that does what I want however if I symlink that > script the symlinked invocation does not work! I've drastically reduced > the Perl script to simply demonstrate the problem: > > $ cat foo > #!c:/Progra~1/Rational/ClearQuest/CQPerl > print "Hello world\n"; > $ foo > Hello world > $ ls -l bar > lrwxrwxrwx 1 adefaria Domain U 86 Feb 21 10:38 bar -> foo* > $ bar > Can't open perl script "./bar": No such file or directory > > Now if I change the shebang line to #!/bin/perl then everything works > but as I said I need to use CQPerl. > > Ideas? > > > > -- > Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple > Bug reporting: http://cygwin.com/bugs.html > Documentation: http://cygwin.com/docs.html > FAQ: http://cygwin.com/faq/ > > > -------------------------------------------------------------------- > mail2web - Check your email from the web at > http://mail2web.com/ . > > > > -- > Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple > Bug reporting: http://cygwin.com/bugs.html > Documentation: http://cygwin.com/docs.html > FAQ: http://cygwin.com/faq/ -- Bob McGowan Staff Development Engineer VERITAS Software [EMAIL PROTECTED] -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ -------------------------------------------------------------------- mail2web - Check your email from the web at http://mail2web.com/ . -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/