ImJustAFriend has asked for the wisdom of the Perl Monks concerning the following question:
Hi, I think I'm trying to do something that's not possible... I am using Control::CLI to interact with remote servers. I have need in my script to watch a log file until certain lines are seen and react to them accordingly. I am trying to open the command with a pipe so I can read the output into my script, but it doesn't work. I've tried the only 2 things I can think of/find online, and both fail.
open(LOG, $NE_obj->cmd("tail -f /path/to/log |")); open(LOG, '$NE_obj->cmd("tail -f /path/to/log")|');
Any thoughts on how this could work? Is it even possible? Thanks in advance!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Open Control::CLI Command With Pipe
by crusty_collins (Friar) on Jun 02, 2017 at 15:10 UTC | |
|
Re: Open Control::CLI Command With Pipe
by ImJustAFriend (Scribe) on Jun 02, 2017 at 16:12 UTC |