Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^3: Call perl script and capture values in bash.

by choroba (Chancellor)
on Sep 18, 2012 at 08:13 UTC ( #994233=note: print w/replies, xml ) Need Help??


in reply to Re^2: Call perl script and capture values in bash.
in thread Call perl script and capture values in bash.

You can save the output to a bash array to easily access the values:
out=($(script.pl)) date=${out[2]} counter=${out[3]}
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Replies are listed 'Best First'.
Re^4: Call perl script and capture values in bash.
by MacScissor (Acolyte) on Sep 18, 2012 at 09:02 UTC
    Thank you both, finally it works! :)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://994233]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2016-09-26 16:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (484 votes). Check out past polls.