From 9252c7622bfbe3ccd4dcd71566dff85b7a7b0954 Mon Sep 17 00:00:00 2001 From: z3rOR0ne Date: Thu, 24 Aug 2023 16:46:33 -0700 Subject: [PATCH] :sparkles: Added search/replace script --- scripts/repl | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 scripts/repl diff --git a/scripts/repl b/scripts/repl new file mode 100755 index 00000000..54f8ce57 --- /dev/null +++ b/scripts/repl @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# Search and replace instances of first arg within current directory +# Ignores node_modules and dot directories + +tobereplaced=$1 +replacestring=$2 + +# Ignore dot directories +find . \( ! -regex '.*/\..*' \) -type f -not -path "./node_modules/*" -print0 | xargs -0 sed -i "s/${tobereplaced}/${replacestring}/gI" \ No newline at end of file