Created
June 8, 2015 10:48
-
-
Save anaray/1b938ff150d4cbd987c2 to your computer and use it in GitHub Desktop.
remove new line from files inside a directory
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
#here file is renamed to <file>_edited, change as per requirement | |
for file in <file_base_location>/* | |
do | |
echo $file | |
sed '/^$/d' $file > ${file}_edited | |
#rm -f $file | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment