This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Example input and output (from the bash prompt): | |
# ./multitail.sh -H use@server -f /var/log/somelog.log | |
# ./multitail.sh -h "use@server use@server2 use@server3" -f "/var/log/somelogA.log /var/log/somelogB.log" | |
# ./multitail.sh --host "usu@server usu@server" --file "/var/log/logA.log" | |
# Based on https://gist.github.com/stantonk/5052027 and /usr/share/doc/util-linux/examples/getopt-parse.bash | |
# Note that we use `"$@"' to let each command-line parameter expand to a | |
# separate word. The quotes around `$@' are essential! |