Skip to content

Instantly share code, notes, and snippets.

@rhowardiv
Created January 7, 2011 20:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rhowardiv/770022 to your computer and use it in GitHub Desktop.
Save rhowardiv/770022 to your computer and use it in GitHub Desktop.
Tail a file across multiple servers
#!/bin/bash
F=$1
shift
echo $@ | xargs -n1 -P4 ptail $F
#!/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