J
jrpfinch
I would like to tail -f a file on a remote machine over SSH and
process output line-by-line as it comes in. I'm pretty sure this can
be done using Expect and open (FH, "ssh root@remote_machine ... tail -
f |") if you have exchanged keys. ssh will not take a supplied
username and password on the command line, however.
This leaves Net::SSH:erl, which does accept user/pass login, but
AFAIK only lets you issue discrete commands via the '->cmd("ls -ltr")'
method.
Any hints appreciated. Otherwise I'm just going to examine the file
size at discrete intervals and use tail -[some number] to get the
output if the file size has changed. This does not seem to be an
efficient solution.
Many thanks
Jon
process output line-by-line as it comes in. I'm pretty sure this can
be done using Expect and open (FH, "ssh root@remote_machine ... tail -
f |") if you have exchanged keys. ssh will not take a supplied
username and password on the command line, however.
This leaves Net::SSH:erl, which does accept user/pass login, but
AFAIK only lets you issue discrete commands via the '->cmd("ls -ltr")'
method.
Any hints appreciated. Otherwise I'm just going to examine the file
size at discrete intervals and use tail -[some number] to get the
output if the file size has changed. This does not seem to be an
efficient solution.
Many thanks
Jon