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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I assigne a variable for output value from my command. 1

Status
Not open for further replies.

vptl

Technical User
Jan 22, 2004
120
US
I know ..I am asking to many questions but hopefully I am not bothering you...and again I value all your help.
What I want to do here is to assigne a variable to my output form the command.

Thanks
 
$cmd = `ls -la`;

So, $cmd will have the output of the command ls -la.

dmazzini
GSM System and Telecomm Consultant

 
LOL
Use backticks instead of "system".

Code:
my @result_lines = `ls -ltr`;


Trojan

 
Thank you very very much......
That is for the day.!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top