in reply to How to tail file on remote host
You simply execute the tail program remotely:
my $remote_filename = '/somewhere/over.txt'; my $remote_host = 'rainbow'; my $cmd = "ssh $remote_host tail -f $remote_filename |"; open my $remote_tail, $cmd or die "COuldn't spawn [$cmd]: $!/$?"; while (<$remote_tail>) { print "Remote: $_"; };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to tail file on remote host
by Anonymous Monk on Sep 30, 2008 at 21:22 UTC | |
by Corion (Patriarch) on Sep 30, 2008 at 21:26 UTC | |
by Anonymous Monk on Sep 30, 2008 at 21:45 UTC | |
by Corion (Patriarch) on Oct 01, 2008 at 06:20 UTC | |
by chrism01 (Friar) on Oct 01, 2008 at 06:47 UTC |