-
-
Save mkol5222/bcff84c8314c0fd019666948d42b0985 to your computer and use it in GitHub Desktop.
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
# for string | |
awk '$3 ~ /snow/ { print }' dummy_file | |
# for numeric | |
cpwd_admin list | awk '{if ($4==1) {print $1}}' | |
# check if column contains a string and print it, will print just the columns containing the lines | |
mpstat -P ALL 1 1 | awk '$12 ~ /idle/ {print $12}' | |
# check if column contains a string and print it, if matched string, print all the values in this column | |
mpstat -P ALL 1 1 | awk '$3 ~ idle {print $12}' | |
# print specific columns with conditions | |
awk '$7 > 100 || $8 > 100' filename |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment