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: Automating a Cygwin Script From Windows

Mike Marchywka-2 wrote:
> ----------------------------------------
>> Date: Fri, 28 Aug 2009 13:04:44 -0700
>> From:
>> To:
>> Subject: Automating a Cygwin Script From Windows
>> I need to run a cygwin script directly via windows, probably via dos
>> prompt
>> or some other comparable method. This method needs to be automated and
>> kicked off in Windows at certain times, so executing Cygwin, then
>> manually
>> typing in the script to run in the Cygwin prompt is out of the question.
>> I was hoping there would be some way to execute Cygwin and concurrently
>> feed
>> it a string of commands to execute upon opening, but unfortunately I have
>> not had success with this. There seems to be lots of command line options
>> for setting display options but nothing that would allow me to feed in a
>> command.
>> Is there any method to do this? Thanks for your time.
> If you have an icon on your desktop, type the target it should
> be something like cygwin.bat. You should IIRC just be able
> to invoke bash with whatever params you need.
> I just tried it from dos prompt seems to work.

Can I invoke bash with scripts I want it to run as parameters? For instance,
if I'd like a bat file that would execute bash, and then proceed to
automatically run a cygwin script at at c:\foo, I'd want something like

@echo off
chdir C:\cygwin\bin
bash --login -i -execute c:\foo

Bash obviously doesn't contain an "-execute" option, but is there some
method to achieve this?

View this message in context:
Sent from the Cygwin list mailing list archive at

Problem reports:
Unsubscribe info:

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