Skip to content

Instantly share code, notes, and snippets.

@williamrowell
Created June 8, 2015 02:00
Show Gist options
  • Save williamrowell/9f549e474036376c3c9a to your computer and use it in GitHub Desktop.
Save williamrowell/9f549e474036376c3c9a to your computer and use it in GitHub Desktop.
remove all newlines from all files in folder
#!/bin/bash
# for all files in folder, remove newlines
for FILE in `ls`
do
tr -d '\n' < $FILE > ${FILE}.tmp
mv ${FILE}.tmp $FILE
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment