This is the mail archive of the cygwin@cygwin.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: command line args to cygwin from DOS shell?


On Thu, 13 Sep 2001 19:55:24 -0400, Klaus Steden <klaus@compt.com> wrote:
> 
> The cygwin dir isn't part of the default NT path, so all scripts are run
> through bash based on the .sh extension association.
> 
> However, that scenario doesn't seem to be passing command line arguments
> correctly. i.e.
> 
> Z:\> TBrender.sh -s 50 -e 51 scenes/dynamics/a_test.mb
> 
> $0 gets set ... but $@, $*, $1, etc. are empty.

Check your association. I use the same technique (on W98) and this my
.sh association: bourne shell script file
     (C:\CYGWIN\BIN\BASH.EXE -ex %1 %2 %3 %4 %5 %6 %7 %8 %9)

The exact Registry values are:

[HKEY_LOCAL_MACHINE\Software\CLASSES\.sh]
@="sh_file"

[HKEY_LOCAL_MACHINE\Software\CLASSES\sh_file]
@="bourne shell script file"

[HKEY_LOCAL_MACHINE\Software\CLASSES\sh_file\shell]
@="open"

[HKEY_LOCAL_MACHINE\Software\CLASSES\sh_file\shell\open]

[HKEY_LOCAL_MACHINE\Software\CLASSES\sh_file\shell\open\command]
@="C:\\CYGWIN\\BIN\\BASH.EXE -ex %1 %2 %3 %4 %5 %6 %7 %8 %9"


I hope it helps you,

Ehud.


-- 
 Ehud Karni     Mivtach - Simon  Insurance   /"\
 Tel: +972-3-7966-561 Fax: +972-3-7966-667   \ /  ASCII Ribbon Campaign
 (USA) Fax and  voice  mail: 1-815-5509341    X   Against  HTML  Mail
     Better     Safe     Than     Sorry      / \
     mailto:ehud@unix.simonwiesel.co.il    http://www.simonwiesel.co.il

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


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