This commit is contained in:
Marc Beninca 2024-08-31 01:12:11 +02:00
parent e0552167bf
commit 6f3c5a8143
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -260,13 +260,14 @@ spcd_os_rm() {
}
spcd_os_sed() {
spcd_os_sed__file="${1}"
local 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}"
if [ -f "${file}" ]; then
local regex
_spcd_os_cat "${file}"
for regex in "${@}"; do
sed --in-place "s${regex}g" "${file}" &&
_spcd_os_cat "${file}"
done
fi
}