Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
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?
[james28909]: yeah but it would rename those subs xD
[Lady_Aleena]: I'd say, go back to my scratchpad, and really look at what the 3 subs are doing, then play. Meanwhile, I am going afk for about an hour +/- a few minutes.

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2017-05-24 05:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?