Created
April 25, 2014 14:00
-
-
Save michiel/11290561 to your computer and use it in GitHub Desktop.
bash for loop replace with sed in filenames with spaces
This file contains hidden or 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 | |
# bash for loop replace with sed in filenames with spaces | |
STORED_IFS=$IFS | |
IFS=$(echo -en "\n\b") | |
for file in `find . | grep "md$"`; do | |
sed -i 's/X/Y"/g' "$file" | |
done | |
IFS=$STORED_IFS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment