Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 09-17-2011, 10:17 AM   #1
LQ Newbie
Registered: Jul 2009
Location: Poland
Distribution: openSUSE, Debian
Posts: 15

Rep: Reputation: 0
Exec binary code from script

Hi all,
Is there anyway to run ELF executable binary from script? For exec I have to pass binary filename as argument.
sth_for_exec_binary `tail -n +5 $0`

Old 09-17-2011, 10:35 AM   #2
Senior Member
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: AntiX & Vuu-Do.
Posts: 1,905

Rep: Reputation: Disabled
exec binary from script

I believe you may want to use a sub shell to run your binary.
If it's run from a top level shell, I'm of the understanding, that you pass control over to the binary from the script, therefore ending your script.
If you are needing information from the binary, I think you will need to redirect it to a file, & then open that file in your top level script.


binary, exec, script

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
Exec format error. Binary file not executable. Fetch Bug? Dimitriy *BSD 2 04-21-2010 04:34 PM
fs, binfmt, exec.c... how/where binary are loaded into ram before execution? kralizec Linux - Kernel 2 03-07-2010 12:31 PM
Exec format error. binary file not executable. kaz2100 Linux - General 2 08-19-2006 05:26 PM
FC5-test1-binary-i386-exec of anaconda failed: no such file or directory, any ideas? frankj Fedora 1 01-02-2006 12:30 AM
c code: how to exec a external program in c feetyouwell Programming 3 04-04-2005 10:44 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:05 PM.

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