From 281bb2bf37508f36d72cb5e6194460d89400739e Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 25 Aug 2024 23:12:52 +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 0ec836b..418a11d 100644 --- a/spcd/main.sh +++ b/spcd/main.sh @@ -298,6 +298,18 @@ spcd_os_rm() { fi } +spcd_os_write() { + spcd_os_write__file="${1}" + spcd_os_write__text="${2}" + if [ -n "${spcd_os_write__file}" ]; then + [ -f "${spcd_os_write__file}" ] && + spcd_os_cat "${spcd_os_write__file}" + echo "→ ${spcd_os_write__file}" + printf "%s" "${spcd_os_write__text}" >"${spcd_os_write__file}" + spcd_os_cat "${spcd_os_write__file}" + fi +} + # ╭───────────┬────────╮ # │ functions │ python │ # ╰───────────┴────────╯ @@ -1230,18 +1242,6 @@ spcd_sed() { fi } -spcd_os_write() { - spcd_os_write__file="${1}" - spcd_os_write__text="${2}" - if [ -n "${spcd_os_write__file}" ]; then - [ -f "${spcd_os_write__file}" ] && - spcd_os_cat "${spcd_os_write__file}" - echo "→ ${spcd_os_write__file}" - printf "%s" "${spcd_os_write__text}" >"${spcd_os_write__file}" - spcd_os_cat "${spcd_os_write__file}" - fi -} - #╶──────────────────────────────────────╴ # ╭──────╮