Created
September 5, 2014 21:51
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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