Skip to content

Instantly share code, notes, and snippets.

@fakechris
Created December 7, 2011 03:24
Show Gist options
  • Save fakechris/1441293 to your computer and use it in GitHub Desktop.
Save fakechris/1441293 to your computer and use it in GitHub Desktop.
one line join script
#!/bin/sh
ruby -e 'puts ARGF.read().split("\n").join(" ")' $@
# or use see instead
# sed -e :a -e '/$/N; s/\n/ /; ta'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment