Created
January 1, 2014 14:32
-
-
Save zyan0/8208458 to your computer and use it in GitHub Desktop.
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 | |
SCRIPT=substitute.sh | |
for f in * | |
do | |
if [ $f = $SCRIPT ] | |
then | |
echo "skip $f" | |
continue | |
fi | |
echo -n "substitute ext2 to myext2 in $f..." | |
cat $f | sed 's/ext2/myext2/g' > ${f}_tmp | |
mv ${f}_tmp $f | |
echo "done" | |
echo -n "substitute EXT2 to MYEXT2 in $f..." | |
cat $f | sed 's/EXT2/MYEXT2/g' > ${f}_tmp | |
mv ${f}_tmp $f | |
echo "done" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment