Skip to content

Instantly share code, notes, and snippets.

@crackcomm
Created March 26, 2013 11:20
Show Gist options
  • Save crackcomm/5244694 to your computer and use it in GitHub Desktop.
Save crackcomm/5244694 to your computer and use it in GitHub Desktop.
fs = require 'fs'
f = fs.readFileSync process.argv[2], 'utf8'
reSplit = /\((.+?)\)/g
lista = f.match reSplit
fs.writeFileSync process.argv[3], lista.join(' ')
if process.argv.length < 3
console.log "Usage: coffee split.coffee source.txt destination.txt"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment