Last active
March 13, 2025 11:35
-
-
Save yanivk1984/9df694da25d1ed6b2acfa957c5eda988 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