parent
2e913e4d31
commit
f3f19abad0
1 changed files with 12 additions and 12 deletions
24
spcd/main.sh
24
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
|
||||
}
|
||||
|
||||
#╶──────────────────────────────────────╴
|
||||
|
||||
# ╭──────╮
|
||||
|
|
Loading…
Reference in a new issue