Created
June 8, 2015 02:00
-
-
Save williamrowell/9f549e474036376c3c9a to your computer and use it in GitHub Desktop.
remove all newlines from all files in folder
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
#!/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