LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-10-2010, 03:33 AM   #1
wjs1990
Member
 
Registered: Nov 2009
Posts: 30

Rep: Reputation: 15
Generic script compiler


Hi,
I have created a binary executable of a script, compiled using shc on Red Hat. However, when i tried to run the executable on Solaris, it does not work. Are there any other compiler that i can use, so that the binary executable created can be run on both red hat and solaris?

Thanks.
 
Old 02-10-2010, 03:45 AM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
shc is not a compiler, but rather an obfuscater - it makes the code not easily readable. It's not worth using, as there are easily available tools to decompile.
 
Old 02-10-2010, 03:52 AM   #3
wjs1990
Member
 
Registered: Nov 2009
Posts: 30

Original Poster
Rep: Reputation: 15
Are there any compiler that u may recommend?
 
Old 02-10-2010, 04:03 AM   #4
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
No, I'm not aware of any shell script compilers that actually compile. The value is questionable in any case. Shell scripts tend to glue existing (highly optimized) utilities together, with the bulk of processing performed by those utilities.

If you need to perform a processor intensive operation, just write that portion in C and call it from your script.
 
Old 02-10-2010, 05:10 AM   #5
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721
Why are you trying to compile a script?

Seems like if your code MUST be compiled, you should use something like C or C++.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
what are initrd.img-2.6.28-11-generic and vmlinuz-2.6.28-11-generic? karuna-bdc Linux - Newbie 11 07-17-2009 05:00 AM
Generic Slackbuild script C-Sniper Slackware 4 06-16-2008 05:05 PM
GART TLB error generic level generic Clydesdale Linux - Software 1 08-13-2007 06:47 PM
GART TLB error generic level generic Clydesdale Linux - Hardware 0 08-13-2007 06:18 PM
making my script generic bluecadet Programming 2 01-16-2002 12:31 PM


All times are GMT -5. The time now is 01:05 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration