Christina has kindly alerted me that Jobbie is a bad word, especially vulgar in Scotland. But the word was littered everywhere in the language files.
So, I wrote a Bash script (blatantly ripped / modified from where credit is due), if anyone’s interested -
Code:
#!/bin/bash | |
OLDSTRING="Jobbie" | |
NEWSTRING="Jobster" | |
DPATH="/home/username/directory/*.txt" | |
TFILE="/tmp/out.tmp.$$" | |
for f in $DPATH | |
do | |
if [ -f $f -a -r $f ]; then | |
sed "s/$OLDSTRING/$NEWSTRING/g" "$f" > $TFILE && mv $TFILE "$f" | |
fi | |
done | |
/bin/rm $TFILE |
Edit -
rhican’s code:
sed -i "s/orig/new/g" *
http://altblog.searix.net/comtrack/trackback.php/72
This post has 1 feedback awaiting moderation...
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
| << < | > >> | |||||
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |