Re: cygwin and the rest of the Windows

2003-06-24 Thread Ling F. Zhang
well, i still got the same error from the win32 apache... forget it, i am switch to apache on cygwin...write some script using perl and shell...maybe later, i will just rewrite them in c and put them in nice executables for the windows server... --- Igor Pechtchanski <[EMAIL PROTECTED]> wrote: > M

Re: cygwin and the rest of the Windows

2003-06-23 Thread Igor Pechtchanski
Matthew, FYI, I've been able to associate the following with the .pl extension (in Explorer) and have it work: c:\cygwin\bin\bash.exe -c '"`/bin/cygpath -u "%1"`"' There was no need for extra batch files or anything else. The above also worked when the path contained spaces, but I haven't teste

Re: cygwin and the rest of the Windows

2003-06-23 Thread Ling F. Zhang
Just based on what I have learned so far...I figure out a more geniune way of how this works: in cygwin, I made a shell script quo that goes like: #!/usr/bin/bash # this program takes user input (STDIN) and put a quote around it... # why do I have to do this? well, I can't figure out a way in dos b

Re: cygwin and the rest of the Windows

2003-06-22 Thread Ling F. Zhang
Hi: > In your case 1, it looks like you ran that command > from bash. No, I ran it from WINXP command prompt >It's pretty > obvious why it didn't work - bash needs POSIX paths. > You had unquoted > spaces, which bash interpreted as argument > separators, and it also > interpreted backslashes as e

Re: cygwin and the rest of the Windows

2003-06-22 Thread Igor Pechtchanski
Matthew (Ling?), In your case 1, it looks like you ran that command from bash. It's pretty obvious why it didn't work - bash needs POSIX paths. You had unquoted spaces, which bash interpreted as argument separators, and it also interpreted backslashes as escapes. You should have run that comman

Re: cygwin and the rest of the Windows

2003-06-22 Thread Ling F. Zhang
okay, a summary of what I am doing: case 1: c:\cygwin\bin\perl.bat reads: @echo off c:\cygwin\bin\bash --login -c "/usr/bin/perl %1 %2 %3 %4 %5 %6 %7 %8 %9" associating the .pl file with c:\cygwin\bin\perl.bat %1 and the perl file begins with: #!/usr/bin/perl one command line, I ran: c:\program

Re: cygwin and the rest of the Windows

2003-06-22 Thread Igor Pechtchanski
Ling, Ok, the first is my fault, as indicated in another message. I forgot the "-c" flag to bash. "man bash" for more details. As for the second, two hints: 1) "bash --login" changes to your home directory, and 2) "." is not in the PATH by default. Igor On Sun, 22 Jun 2003, Ling F. Zha

Re: cygwin and the rest of the Windows

2003-06-22 Thread Igor Pechtchanski
On Sun, 22 Jun 2003, Ling F. Zhang wrote: > > Alternatively, if you want to use the #! line, you > > could associate .pl files with "c:\cygwin\bin\bash -c"... > what is -c? if I use this option, should it be: > #!/usr/bin/perl? > or > #!c:\cygwin\usr\bin\perl? > my guess is the former, since we ar

Re: cygwin and the rest of the Windows

2003-06-22 Thread Igor Pechtchanski
Ling, I'm sorry, we all make mistakes. The one I made was omitting the "-c" flag to bash. Another was missing the quotes. So, your perl.bat should contain c:\cygwin\bin\bash --login -c "/usr/bin/perl %1 %2 %3 %4 %5 %6 %7 %8 %9" This was enough to run scripts from the command line for me (make

Re: cygwin and the rest of the Windows

2003-06-22 Thread Igor Pechtchanski
On Sun, 22 Jun 2003, Ling F. Zhang wrote: > Hi again: > > > you might be missing the login environment, so you > > might wish to create a > > perl.bat file that does a "c:\cygwin\bin\bash > > --login /usr/bin/perl %1 %2 > > %3 %4 %5 %6 %7 %8 %9" and use that instead (beware > > of directory change

Re: cygwin and the rest of the Windows

2003-06-22 Thread Ling F. Zhang
Hi again: > you might be missing the login environment, so you > might wish to create a > perl.bat file that does a "c:\cygwin\bin\bash > --login /usr/bin/perl %1 %2 > %3 %4 %5 %6 %7 %8 %9" and use that instead (beware > of directory changes). when I run this in cygwin: bash --login perl, I get th

Re: cygwin and the rest of the Windows

2003-06-22 Thread Ling F. Zhang
> Alternatively, if you want to use the #! line, you > could associate .pl > files with "c:\cygwin\bin\bash -c"... what is -c? if I use this option, should it be: #!/usr/bin/perl? or #!c:\cygwin\usr\bin\perl? my guess is the former, since we are already interpreting the file with bash... > In th

Re: cygwin and the rest of the Windows

2003-06-22 Thread Ling F. Zhang
Let me re-cap what you just said: create a perl.bat with line: "c:\cygwin\bin\bash --login /usr/bin/perl %1 %2 %3 %4 %5 %6 %7 %8 %9" which will work as my perl interpreter... and associate my .pl files with this perl.bat if I want to use shell script as well, then I suppose I would need to associ

Re: cygwin and the rest of the Windows

2003-06-21 Thread Igor Pechtchanski
Ling, Well, technically, you'll have to do a bit more than that. First off, the #![1] line will not be recognized by Windows. Thus, you'll need to associate the .pl extension *in Windows Explorer* with whatever perl interpreter you have (I'd guess "C:\cygwin\bin\perl.exe"[2]). Secondly, you mig

Re: cygwin and the rest of the Windows

2003-06-21 Thread Ling F. Zhang
okay! the question is this then: say I write a perl script... should the first line be #/usr/bin/perl or #C:\cygwin\usr\bin\perl ? thank you --- Igor Pechtchanski <[EMAIL PROTECTED]> wrote: > On Sat, 21 Jun 2003, Ling F. Zhang wrote: > > > I successfully ran both the cygwin apache (1.3x) > and >

Re: cygwin and the rest of the Windows

2003-06-21 Thread Igor Pechtchanski
On Sat, 21 Jun 2003, Ling F. Zhang wrote: > I successfully ran both the cygwin apache (1.3x) and > windows native one (2.x). So I need to chose one to > run (as they wouldn't share port 80)...sine I usually > do my cgi in perl and shell-script, cygwin is the > clear choice...but I do miss such fe

cygwin and the rest of the Windows

2003-06-21 Thread Ling F. Zhang
I successfully ran both the cygwin apache (1.3x) and windows native one (2.x). So I need to chose one to run (as they wouldn't share port 80)...sine I usually do my cgi in perl and shell-script, cygwin is the clear choice...but I do miss such feature as WebDAV in the version 2 (I didn't feel like