#!/usr/bin/env Rscript x <- paste(rep("", 30), c("", "", "Fizz"), c("", "", "", "", "Buzz"), sep="") cat(ifelse(x == "", 1:30, x), "\n")