This is the mail archive of the cygwin 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]
Other format: [Raw text]

Re: native console apps from #!/bin/sh scripts


On 3/11/2011 10:34 AM, Andrew DeFaria wrote:
> On 03/11/11 02:59, Rafael Kitover wrote:
>> I can run native console apps from a console in a cygwin shell fine,
>> however, for some reason they don't work correctly from a #!/bin/sh
>> script.
>>
>> E.g., for activestate perl:
>>
>> TERM=dumb /c/Perl/bin/perl -MCPAN -e shell
>>
>> run from zsh prompt works correctly with readline support.
>>
>> Now if I put that in a script:
>>
>> #!/bin/sh
>>
>> TERM=dumb /c/Perl/bin/perl -MCPAN -e shell
>>
>> then when I run the script the readline support is disabled for some
>> reason.
>>
>> What are differences in environment in a script as opposed to the
>> regular prompt that would cause this? And is there a workaround?
>>
>> Does it have something to do with STDIN redirection away from the
>> console?
> Have you tried using Cygwin's Perl instead of ActiveState?

I actually use cygwin, activestate and strawberry perl on this machine.
I have zsh functions to switch between them (set up PATH, aliases, etc..)

There are different issues with all three of them, for example DBD::ADO
does not work on Cygwin perl, which I needed for a recent project. I'd
like to get it to work on Cygwin, but I'm not sure where to start. I
asked about this issue on the list:

http://sourceware.org/ml/cygwin/2011-02/msg00240.html

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


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