starting an executable..


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting starting an executable..
# 1  
Old 07-16-2008
Error starting an executable..

I need a perl script that needs to start an executable in a different shell so that I can use this to run more commands from my script. This is what I have:

my $USER = "my_user_name";
mu $HOST = "hostname";
my $ssh = 'ssh $USER@'."$HOST";
my $cmd = "cd $EXE_DIR && sudo $EXE $EXE_PARAMETERS";
# To start the executable...
system ("$ssh '$cmd' < temp_pipe 2>&1 &");

# To run commands on this ...
if (some condition)
$cmd = "Enable module 1";
system("$rsh '$cmd'" );
else
$cmd = "Enable module 2";
system("$rsh '$cmd'" )

When I do an rsh, it complains saying the executable hasnt been started. Any suggestions?

Thanks!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to grep a line not starting with # from a file (there are two lines starting with # and normal)?

e.g. File name: File.txt cat File.txt Result: #INBOUND_QUEUE=FAQ1 INBOUND_QUEUE=FAQ2 I want to get the value for one which is not commented out. Thanks, (3 Replies)
Discussion started by: Tanu
3 Replies

2. Shell Programming and Scripting

who renamed my executable

Hi All, I connected via rlogin in testing environment (ksh ) and placed an executable with -rwxr-xr-x permission. eg: from my own unix box used : rlogin host -l user But the exe was renamed by somebody. since it's only renaming none of the access time , modification time etc is altered.... (2 Replies)
Discussion started by: blackcat
2 Replies

3. Shell Programming and Scripting

Not executable

I want to check whether a file is not executable or not? means instead of knowing whether a file is executable or not: if ........... I want to check: if file is not executable (1 Reply)
Discussion started by: proactiveaditya
1 Replies

4. UNIX and Linux Applications

Tar executable

Hi, I need to download tar.exe to archive the files before doing gzip...... I downloaded the executables from Browse GnuWin Files on SourceForge.net but my concern is whether this particular exe is safe to use? is it a licensed version? Have anybody downloaded from this site? Need ur advice. (2 Replies)
Discussion started by: Codesearcher
2 Replies

5. Programming

Executable file in C

Hi all, I have modified a C file and executed it. While executing the executable file for that C file, it shows à is cannot be printed. I have given isprint(à) to test it. When I copy the old executable file and execute it it shows it can be printed. Then I retain the C code back and executed it... (1 Reply)
Discussion started by: sivakumar.rj
1 Replies

6. UNIX for Dummies Questions & Answers

executable files

hello. My question, basically is: what is the definition of unix/linux exec files, or what makes a file executable? More specifically, must a unix source file that was compiled using gcc have exec permissions in order to be considered executable? Is it right to say that a unix/linux exec file... (1 Reply)
Discussion started by: nadavkri
1 Replies

7. Shell Programming and Scripting

executable file

Hi, I want to know that how can i read the content of a .exe file?? Thanks (1 Reply)
Discussion started by: ss_ss
1 Replies

8. Shell Programming and Scripting

Executable file

Hi everybody: I have strange problem. I have compiled a source code and created an executable file. This file I can use it into my PC, but when I copy this executable to my laptop this one doesn't work and the system tell me: bash: ./sbdart_unix: cannot execute binary file Somebody can... (3 Replies)
Discussion started by: tonet
3 Replies

9. UNIX for Dummies Questions & Answers

Executable files

This question always confuses me :- Suppose I write a program and compile it on a machine with operating system A and processor B will the exe file run on a machine with operating system A2 but processor B operating system A but processor B2 operating system A2 and processor B2........ ... (9 Replies)
Discussion started by: nervous
9 Replies

10. UNIX for Dummies Questions & Answers

TK executable?

hi All, Can any one help me to find out a solution for creating an Executable file for a TK widget script. Is there any command line option for it. I am working in HP Unix workstation. Regards, Anent (3 Replies)
Discussion started by: anent
3 Replies
Login or Register to Ask a Question
GZEXE(1)						      General Commands Manual							  GZEXE(1)

NAME
gzexe - compress executable files in place SYNOPSIS
gzexe name ... DESCRIPTION
The gzexe utility allows you to compress executables in place and have them automatically uncompress and execute when you run them (at a penalty in performance). For example if you execute ``gzexe /usr/bin/gdb'' it will create the following two files: -rwxr-xr-x 1 root root 1026675 Jun 7 13:53 /usr/bin/gdb -rwxr-xr-x 1 root root 2304524 May 30 13:02 /usr/bin/gdb~ /usr/bin/gdb~ is the original file and /usr/bin/gdb is the self-uncompressing executable file. You can remove /usr/bin/gdb~ once you are sure that /usr/bin/gdb works properly. This utility is most useful on systems with very small disks. OPTIONS
-d Decompress the given executables instead of compressing them. SEE ALSO
gzip(1), znew(1), zmore(1), zcmp(1), zforce(1) CAVEATS
The compressed executable is a shell script. This may create some security holes. In particular, the compressed executable relies on the PATH environment variable to find gzip and some standard utilities (basename, chmod, ln, mkdir, mktemp, rm, sleep, and tail). BUGS
gzexe attempts to retain the original file attributes on the compressed executable, but you may have to fix them manually in some cases, using chmod or chown. GZEXE(1)