LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 09-17-2004, 06:40 AM   #1
rosbur
LQ Newbie
 
Registered: Aug 2003
Location: China
Posts: 2

Rep: Reputation: 0
any shell script 2 batch file tools?


I wonder if there is any software or tools that can convert syntax of bash shell script to windows batch files. I have a shell script and I need to "translate" it into batch file to be able to run under windows nt. Does anyone know any software that can perform such task? I found some that can convert batch file to shell script but not vice versa. Thanks in advance.
 
Old 09-17-2004, 07:04 AM   #2
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 61
This kind of transformation can only go one way, because unix shell scripts are way more powerfull than dos batch files.

The best answer to your need IMO, is to install Cygwin on the windows PC.

Yves.
 
Old 01-03-2007, 03:24 AM   #3
anandtak07
LQ Newbie
 
Registered: Jan 2007
Posts: 1

Rep: Reputation: 0
need your help

you have written that you have software that can convert a batch file to shell script i need that its very urgent can u forward it to me. i shall be thankful to u for this


Quote:
Originally Posted by rosbur
I wonder if there is any software or tools that can convert syntax of bash shell script to windows batch files. I have a shell script and I need to "translate" it into batch file to be able to run under windows nt. Does anyone know any software that can perform such task? I found some that can convert batch file to shell script but not vice versa. Thanks in advance.
 
Old 01-03-2007, 07:29 AM   #4
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
No, theYinYeti didn't mean that. Cygwin is a software that allows you to run some (or most) Linux commands on Windows.
So, it cannot convert bash script to Dos scripts, but Cygwin should allow you to run your bash scripts on your Windows machine directly (without conversion).

You can find Cygwin at http://www.cygwin.com, where you can download it for free.
 
Old 01-03-2007, 09:09 AM   #5
Linux_Kidd
Member
 
Registered: Jan 2006
Location: USA
Posts: 539

Rep: Reputation: 51
Cygwin does indeed convert shell to batch, problem is it doesn't output a bat file, it executes the shell script.
 
Old 01-03-2007, 10:24 AM   #6
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
@Linux_Kidd: in my book, "conversion" means that you go from one format (Shell/Bash) to the other (DOS/batch).
That's why I said that Cygwin only "runs" shell/bash scripts, rather than converting them to DOS .bat's.
 
Old 01-15-2008, 08:53 AM   #7
Hb_Kai
Member
 
Registered: Jan 2008
Posts: 75

Rep: Reputation: 31
In reply :

You could always use the following sites as a guidelines for the UNIX / DOS commands equivalents.

It`s more or less a tutorial site for creating Shell Scripts from DOS Batch Files, but on the
site`s Table Of Contents page it has a link to the page showing the conversions on


Table of Contents :
http://tldp.org/LDP/abs/html/

Conversions Page :
http://tldp.org/LDP/abs/html/dosbatch.html
 
Old 11-30-2009, 04:23 AM   #8
Lavanya
LQ Newbie
 
Registered: Nov 2009
Location: India
Posts: 1

Rep: Reputation: 0
Conversion of batch files to shell scripts

Hi ,
Can anyone please tell me the software used to convert the bat files to shell scripts.


u can mail the details at lavanya.chanamgari@gmail.com



thanks
 
Old 12-01-2009, 12:40 PM   #9
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,040

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
Quote:
Originally Posted by Lavanya View Post
Hi ,
Can anyone please tell me the software used to convert the bat files to shell scripts.


u can mail the details at lavanya.chanamgari@gmail.com



thanks
No, if you read the thread you'll note there's no such thing that we know of.

Secondly, we don't do private consulting. If there's a solution we will post it here so everyone can benefit from it.

Third, you are inviting the smapbots to effectively spam your mail account by showing your mail address here, so good luck with that.
 
Old 07-24-2012, 06:57 AM   #10
eschuch
LQ Newbie
 
Registered: Dec 2010
Posts: 4

Rep: Reputation: 0
SHC under Cygwin compile bash to exe

I just modified a version of SHC to Cygwin. Can compile bash to exe and run under Cygwin.
Please folow http://goo.gl/M1NSY to sources, binary, and questions. Tkz
 
Old 08-04-2012, 09:48 AM   #11
ivanvodisek
LQ Newbie
 
Registered: Aug 2012
Location: croatia
Distribution: xubuntu
Posts: 22

Rep: Reputation: 0
Talking

what? bash2bat? perverts...
 
  


Reply


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change batch script to shell script alan.belizario Programming 5 03-31-2005 12:41 AM
Change batch script to shell script alan.belizario Linux - Software 1 03-30-2005 01:49 AM
Help w/ batch/shell script mikehlinuxquest Linux - General 5 09-13-2004 04:41 PM
Need help writing a batch/script file cbjhawks Linux - General 1 01-28-2004 05:54 PM
File Parsing using a Shell Script yasir15 Programming 5 08-22-2003 12:17 PM


All times are GMT -5. The time now is 02:33 PM.

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