Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@tmtk75
Created February 22, 2013 01:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmtk75/5010128 to your computer and use it in GitHub Desktop.
Save tmtk75/5010128 to your computer and use it in GitHub Desktop.
#!/usr/bin/env coffee
path = require "path"
sayHello = (name)->
console.log "Hello,", name, "!"
module.exports =
say: sayHello
if process.argv[1] == __filename
argv = process.argv.slice 2
if argv.length < 1
console.log """usage: #{path.basename process.argv[1]} name\n"""
process.exit 1
sayHello argv[0]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment