Last active
May 7, 2020 08:49
-
-
Save geunho/375feffebc39a91c03455c019f2c5685 to your computer and use it in GitHub Desktop.
grep tips π«
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
# grep string with unicodes | |
grep -aP "abc\001\002" | |
# grep only matched word and sort unique value | |
cat $FILE | grep -o "\w*15864\w*" | sort -u | |
# grep nfs mountpoints | |
cat /proc/mounts | grep nfs | |
# count numbers in line | |
grep $SOMETHING | paste -sd+ | bc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment