Last active
June 15, 2023 21:01
-
-
Save derricw/f0638d4205b77806ca5013a85cf6108a to your computer and use it in GitHub Desktop.
awk_fizzbuzz.sh
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
seq 50 | awk 'NR%3!=0 && NR%5!=0 { print } NR%3==0 && NR%5!=0 { print "FIZZ" } NR%5==0 && NR%3!=0 { print "BUZZ" } NR%15==0 { print "FIZZBUZZ" }' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment