Created
June 17, 2018 17:17
-
-
Save nmicic/96cc49cd1e61800fca3040740b3c542f to your computer and use it in GitHub Desktop.
fizzbuzz in awk
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(i=1;i<=100;i++){a=i;if(i%3==0){a="Fizz"}if(i%5==0){a=gensub(/[0-9]+/,"","g",a);a=a"Buzz"}print a;}}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment