jprice wrote:
> I need to run a cygwin script directly via windows, probably via dos
> prompt or some other comparable method.
> I was hoping there would be some way to ... feed it a string of
> commands to execute upon opening

I wrote a Bash/ Perl backup/ archive/ shutdown solution for my Windows/
Cygwin and GNU/ Linux SOHO network.  I light it off from my primary
Windows desktop via a Windows shortcut that points to a Windows batch
file that runs a Bash script that runs Perl scripts which do the work.
The batch file runs on Windows and will pass along up to nine command
line arguments.  The Bash script runs on Cygwin and GNU/Linux and passes
along an unlimited number of command-line arguments.  Here are the
Windows batch file and Bash script:

    2009-08-28 21:11:01 dpchr...@dc86yxb1 ~/Dpchrist-Shutdown/example
    $ cat shutdown-soho.bat
    C:\cygwin\bin\bash U:\Dpchrist-Shutdown\example\shutdown-soho %1 %2
%3 %4 %5 %6 %7 %8 %9

    2009-08-28 21:15:48 dpchr...@dc86yxb1 ~/Dpchrist-Shutdown/example
    $ cat shutdown-soho | egrep '^(#\!|/)'
    #! /usr/bin/bash
    /usr/bin/dcshutdown --use_at --use_sudo $* dpchr...@p3450
dpchr...@p3600
    /usr/bin/dcshutdown $* administra...@a64x23800p administra...@p31000
administra...@p3800 administra...@dc86yxb1
    /usr/bin/dcshutdown --shutdown_delay=0 --ssh_opts='-p 222' $*
r...@ipcop
    /usr/bin/dcshutdown $* localhost


HTH,

David


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

Reply via email to