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
find . -type f | xargs sed -i -e 's/{before}/{after}/g' |
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
#ifdef DEBUG | |
# ifndef DLog | |
# define DLog(__FORMAT__,...) NSLog((@"%s [Line %d] " __FORMAT__), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__) | |
# endif | |
#else | |
# ifndef DLog | |
# define DLog(...) /* */ | |
# endif | |
#endif /* if DEBUG */ |
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
grep -lr {before} * | egrep -v "{exclude_file_1}|{exclude_file_2}|{exclude_file_3}" | xargs sed -i '' -e 's/{before}/{file}/g' |
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 | |
while getopts d OPT | |
do | |
case $OPT in | |
"d" ) DRY="y"; echo "[DRY RUN MODE]" ;; | |
esac | |
done | |
function execute() { |
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
for i in `seq -w 0 23`; do dir=12/01/$i; for f in `ls $dir`; do cat "$dir/$f" | `do something`; done; done |