From f3f19abad038751621faa60ebb136d35a7b58ddb Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 25 Aug 2024 23:17:10 +0200 Subject: [PATCH] mv --- spcd/main.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/spcd/main.sh b/spcd/main.sh index bb550c6..6481aa0 100644 --- a/spcd/main.sh +++ b/spcd/main.sh @@ -298,6 +298,18 @@ spcd_os_rm() { fi } +spcd_os_sed() { + spcd_os_sed__file="${1}" + shift + if [ -f "${spcd_os_sed__file}" ]; then + spcd_os_cat "${spcd_os_sed__file}" + for spcd_os_sed__regex in "${@}"; do + sed --in-place "s${spcd_os_sed__regex}g" "${spcd_os_sed__file}" && + spcd_os_cat "${spcd_os_sed__file}" + done + fi +} + spcd_os_write() { spcd_os_write__file="${1}" spcd_os_write__text="${2}" @@ -1230,18 +1242,6 @@ spcd_openssl() { fi } -spcd_os_sed() { - spcd_os_sed__file="${1}" - shift - if [ -f "${spcd_os_sed__file}" ]; then - spcd_os_cat "${spcd_os_sed__file}" - for spcd_os_sed__regex in "${@}"; do - sed --in-place "s${spcd_os_sed__regex}g" "${spcd_os_sed__file}" && - spcd_os_cat "${spcd_os_sed__file}" - done - fi -} - #╶──────────────────────────────────────╴ # ╭──────╮