Re:Show HN: Tail out log files from multiple remote hosts wi...
by Plugawy on Sunday February 22, 2015 @03:52PM
(#9091023)
So it's basically:
+ I need to install nodejs?
[ Parent
| on HN ]
Re:Show HN: Tail out log files from multiple remote hosts wi...
by voltagex_ on Sunday February 22, 2015 @04:28PM
(#9091193)
I have no problem with people writing cool little tools like this in whatever language, but there seems to be a chronic lack of understanding of what existing tools can do.
Re:Show HN: Tail out log files from multiple remote hosts wi...
by SixSigma on Sunday February 22, 2015 @05:03PM
(#9091355)
Henry Spencer 11/15/87
Those who do not understand Unix are condemned to reinvent it, poorly.
Re:Show HN: Tail out log files from multiple remote hosts wi...
by robbles on Sunday February 22, 2015 @06:53PM
(#9091798)
The interface to this tool is far nicer to work with. Can you replicate that interface with your command?
Serious question - I actually would like to see how you'd do it.
Re:Show HN: Tail out log files from multiple remote hosts wi...
by vlad003 on Sunday February 22, 2015 @08:09PM
(#9092018)
You can have something like this in your .bashrc:
multitail() {
com="tail -f "
for arg; do
IFS=':' read -a array <<< "$arg"
host="${array[0]}"
file="${array[1]}"
com="$com <(ssh -t $host 'tail -f $file')"
done
eval ${com}
}
This will take the host:file syntax of remtail and turn it into Plugawy's example. I haven't tested it, but if you echo "$com" it'll spit out Plugawy's code.