Last active
November 8, 2019 04:59
-
-
Save potato2003/a74108113b63e047a6a884f5bf396c10 to your computer and use it in GitHub Desktop.
Adding server hostname to each line of output
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
$ echo HOST1 HOST2 | xargs -d ' ' -P2 -I{} ssh {} 'tail -F LOG_PATH | xargs -L 1 echo $(hostname): $1' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment