Skip to content

Commit

Permalink
tool: add webpage text replacer
Browse files Browse the repository at this point in the history
  • Loading branch information
111116 committed Feb 11, 2020
1 parent a196fcd commit 54501d2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions replacehtml.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
[ $# -eq 0 ] && echo "$0" "<old> <new>" && exit 0
[ $# -eq 1 ] && echo "$0" "<old> <new>" && exit 0
a=$1
b=$2
list=$(ls *.html)
for f in *.html
do
cat "$f" | sed "s/""$a""/""$b""/" > .tmp
mv .tmp "$f"
done

0 comments on commit 54501d2

Please sign in to comment.