LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 10-27-2007, 06:09 AM   #1
FaeDine
LQ Newbie
 
Registered: Jul 2004
Location: Moncton, NB, Canada
Distribution: Redhat 9.0
Posts: 6

Rep: Reputation: 0
Question How to run a BASH script in a Batch file (with Cygwin)


What I'm trying to do is setup a Bash script to run in Windows, but do it with just a single command.

I have Cygwin installed, and I know it's possible to just make a copy of the cygwin.bat start file and edit it to run a script and close down cygwin. I remember doing it a few months back, but after a format cannot for the life of me figure out how to do it again.

The end result is just being able to run the script by just calling the .bat file so I don't have to load up Cygwin every time I run it. Any ideas on how to do this?
 
Old 10-27-2007, 12:29 PM   #2
vadiml
Member
 
Registered: Oct 2003
Posts: 42

Rep: Reputation: 19
How to run a BASH script in a Batch file (with Cygwin)

how about:
Code:
c:\cygwin\bin\bash  myscript
 
Old 10-27-2007, 04:47 PM   #3
FaeDine
LQ Newbie
 
Registered: Jul 2004
Location: Moncton, NB, Canada
Distribution: Redhat 9.0
Posts: 6

Original Poster
Rep: Reputation: 0
Thumbs up

Yup, that did it alright...

I had tried that initially before posting, but after seeing it posted here, gave it a closer look. It ends up I had taken Cygwin out of the windows PATH environmental variable (had a conflict with something else). Once I added it back in, it worked just fine...

Thanks for the bump in the right direction.. It's all it takes, sometimes
 
  


Reply

Tags
cygwin


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
need a bash script to batch convert .wav to .mp3 nass Slackware 15 06-23-2007 01:00 AM
need help updating imagemagick on cygwin to run script babag Programming 1 01-25-2007 12:04 PM
Bash - Batch File Rename Help... emailarron Linux - Newbie 4 01-26-2006 07:35 AM
bash scripting/batch file type thing antken Linux - General 2 01-22-2001 07:56 AM


All times are GMT -5. The time now is 04:13 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration