From dbcb42e5380183a6922d6df5d60c2e0e42083325 Mon Sep 17 00:00:00 2001 From: tradam Date: Sat, 21 Aug 2021 02:37:58 -0400 Subject: . --- README.mdown | 13 +++++++++++++ move.sh | 3 +++ rename.sh | 3 +++ 3 files changed, 19 insertions(+) create mode 100644 README.mdown create mode 100755 move.sh create mode 100755 rename.sh diff --git a/README.mdown b/README.mdown new file mode 100644 index 0000000..a526fc3 --- /dev/null +++ b/README.mdown @@ -0,0 +1,13 @@ +# Scripts for MDBooks + +These scripts are for helping with creating and editing MDBooks + +--- + +### move.sh +`params: Name NewUrl` +This is for when you want to move a file. It will rename all the Urls to the new one you give, it matches to the name you give. + +### rename.sh +`params: NewName Url` +This is for when you want to rename something to a new one. It will rename all instances with the new one you give, it matches to the url you give. diff --git a/move.sh b/move.sh new file mode 100755 index 0000000..568535d --- /dev/null +++ b/move.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +find ./src -type f -exec sed -i 's/\['"$1"'](.*)/['"$1"']('"$2"')/g' {} \; diff --git a/rename.sh b/rename.sh new file mode 100755 index 0000000..4b2efc0 --- /dev/null +++ b/rename.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +find ./src -type f -exec sed -i 's/\[.*]('"$2"')/['"$1"']('"$2"')/g' {} \; -- cgit v1.2.3