Created
November 21, 2016 04:42
-
-
Save elhoyos/e49ee9b3184759436f7af01dc21c46c3 to your computer and use it in GitHub Desktop.
cat a remote file and print first column only if matches
This file contains hidden or 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
ssh host "cat file.log" | awk -v re="*" '$0 ~ re {print $1}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment