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.
Serious question - I actually would like to see how you'd do it.