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 -} - #╶──────────────────────────────────────╴ # ╭──────╮