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