Skip to content

Instantly share code, notes, and snippets.

@tobym
Created September 5, 2014 21:51
Show Gist options
  • Save tobym/511fe5f6a0c6d05b8055 to your computer and use it in GitHub Desktop.
Save tobym/511fe5f6a0c6d05b8055 to your computer and use it in GitHub Desktop.
Join lines with a given separator by piping a file to this script.
#!/usr/bin/env bash
#
# Usage: cat somefile.txt | mkString [sep]
#
paste -s -d$1 -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment