aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Wittamore <philip@wittamore.com>2025-05-08 09:21:00 +0200
committerPhilip Wittamore <philip@wittamore.com>2025-05-08 09:21:00 +0200
commit13139f06ec935b881dca5c97f26f93223ead53d6 (patch)
treea1fe8e662bae59535b6a055898ba1e7434a5d05c
parentd421a29a74f509e44cc3532b2553361ff75bedec (diff)
downloadscripts-13139f06ec935b881dca5c97f26f93223ead53d6.tar.gz
scripts-13139f06ec935b881dca5c97f26f93223ead53d6.tar.bz2
scripts-13139f06ec935b881dca5c97f26f93223ead53d6.zip
update
-rwxr-xr-xrecursive-replace-string8
-rwxr-xr-xreplace-spaces-with-minus6
2 files changed, 14 insertions, 0 deletions
diff --git a/recursive-replace-string b/recursive-replace-string
new file mode 100755
index 0000000..8d6d888
--- /dev/null
+++ b/recursive-replace-string
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+FIND="<hr\/>"
+REPL="<hr>"
+
+find . -name "*.html" -exec \
+ sed -i 's/$FIND/$REPL/g' {} +
+
diff --git a/replace-spaces-with-minus b/replace-spaces-with-minus
new file mode 100755
index 0000000..13a74e6
--- /dev/null
+++ b/replace-spaces-with-minus
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+# replace spaces in filenames with -
+for f in *\ *; do
+ mv "$f" "${f// /-}";
+done