Skip to content

Instantly share code, notes, and snippets.

@ryuichiueda
Created January 25, 2015 10:31
Show Gist options
  • Save ryuichiueda/193909dceedce30541a2 to your computer and use it in GitHub Desktop.
Save ryuichiueda/193909dceedce30541a2 to your computer and use it in GitHub Desktop.
import PATH
#############################
# fizzbuzz.glue (for Mac) #
#############################
# make a file "nums"
file nums = seq 1 100
#gsed can be installed after "brew install coreutils"
file buzz = gsed '5~5s/.*/Buzz/' nums
#output
/usr/local/bin/gsed '3~3s/[0-9]*/Fizz/' buzz
# Files (nums and buzz) are automatically erased.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment