LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 03-06-2006, 05:06 AM   #1
massoo
LQ Newbie
 
Registered: Mar 2004
Posts: 12

Rep: Reputation: 0
convert .bat / .csh file to .sh files


hi,

is there any good tool which will convert .bat / .csh file to .sh files automatically.

i tried first converting the batch file to csh file using batcsh12 and using csh2sh from http://www.linux-kheops.com/doc/perl/perl-aubert/ .

the batch to csh is alright. the problem is to convert a csh to sh
while i try the original script of csh2sh the error output is
Quote:
./csh2sh.pl 1.csh 2.sh
Converting 1.csh
1.csh -- Unable to convert the line: set -a="i = ${i} + 1"
1.csh -- Unable to convert the line: goto skipme
1.csh -- Unable to convert the line: goto back2
1.csh -- Unable to convert the line: goto back1
1.csh -- Unable to convert the line: set -a="i = 0"
5 errors.
the the modified csh2sh gives error
Quote:
./csh2sh-rca.pl
csh2sh-rca.pl: Unable to create -: No such file or directory
how to solve this or is there any auto converter for this available

thanks & regards
shann
 
Old 03-06-2006, 06:10 PM   #2
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
I personally wouldn't trust anything to convert a script for me; each shell (ESPECIALLY *sh vs. DOS) has its differences, and therefore many things are not directly convertible. I think you're better off learning sh scripting and converting by hand; shell scripting is quite a bit more versatile than batch scripting.
ta0kira
 
  


Reply



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
i want to convert .wav file into mp3 files in batch mode sparsh Linux - Software 6 11-20-2007 10:53 AM
Linux equivalent of bat files anjanesh Linux - Newbie 19 12-30-2005 12:15 PM
echo bat files HELP jollyjoice Programming 5 11-02-2005 02:53 PM
.bat files on Linux? dave1.1 Linux - Newbie 5 10-21-2004 07:15 PM
BASH vs CSH: * cant see very large files pat57 Linux - Software 6 08-04-2003 02:32 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:41 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration