Created
January 7, 2011 20:05
-
-
Save rhowardiv/770022 to your computer and use it in GitHub Desktop.
Tail a file across multiple servers
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 | |
F=$1 | |
shift | |
echo $@ | xargs -n1 -P4 ptail $F |
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 | |
ssh $2 tail -f $1 | sed "s/^/$2: /" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment