The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 07-16-2008
Ikon's Avatar
Ikon Ikon is offline Forum Advisor  
Registered User
  
 

Join Date: Jul 2008
Location: Phoenix, Arizona
Posts: 669
I assume $ssh contains the command your trying to run..

I have had problems with putting the var right in the system command.

I usually do this:

$mycommand = "somecommand";
#next line lets you verify the command is correct
print "Running Command: $cmd \n";
$cmd = "$mycommand $othervars < $whatever";

system($cmd);

or

$rtn = `$cmd`;