#! /usr/bin/awk -f BEGIN { fizz = "Fizz"; buzz = "Buzz"; fizzbuzz = "FizzBuzz" for (i = 1; i <= 30; i++) { f = i % 3 b = i % 5 print f ? b ? i : buzz : b ? fizz : fizzbuzz } }