Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using sytem command output

Status
Not open for further replies.

jerehart

Programmer
Jun 10, 1999
61
0
0
US
In a srcipt I use rcp and rsh. When the rsh fails I want to be able to branch accordingly. How do I capture the output from a rsh command? [sig][/sig]
 
try this

[tt]
$var = `rsh`;
[/tt]

those are backticks by the way -- the output from rsh will be in $var [sig]<p>Mike<br><a href=mailto:michael.j.lacey@ntlworld.com>michael.j.lacey@ntlworld.com</a><br><a href= Cargill's Corporate Web Site</a><br>Making mistakes, so you don't have to. &lt;grin&gt;[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top