This commit is contained in:
Marc Beninca 2024-05-23 15:47:50 +02:00
parent 1f8d5b0a86
commit ae496a66af
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

13
cd.sh
View file

@ -620,14 +620,15 @@ cd_rm () {
cd_sed () { cd_sed () {
local expression local expression
local file local file="${1}"
if [ -f "${1}" ] ; then
file="${1}"
shift shift
for expression in "${@}" ; do if [ -f "${file}" ] ; then
sed --in-place "s${expression}g" "${file}" || exit
done
cd_cat "${file}" cd_cat "${file}"
for expression in "${@}" ; do
sed --in-place "s${expression}g" "${file}" \
&& cd_cat "${file}" \
|| exit
done
fi fi
} }