Created
July 25, 2022 10:30
-
-
Save coderofsalvation/75e7d6af9e5c674e80b97f7a876d512f to your computer and use it in GitHub Desktop.
highlight color part in string awk bash
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 "0 astroids are hitting your house" | awk '( $1 > 0 ) { $1 = "\033[31m" $1 "\033[0m" } 1' | |
echo "10 astroids are hitting your house" | awk '( $1 > 0 ) { $1 = "\033[31m" $1 "\033[0m" } 1' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment