core: 兼容原版 ed

This commit is contained in:
bin456789 2023-12-13 22:29:17 +08:00
parent f8e58ab876
commit 2091854185
No known key found for this signature in database
GPG Key ID: EE301B386DE6C11B

View File

@ -462,7 +462,7 @@ insert_into_file() {
apk add ed
in=$(mktemp)
cat /dev/stdin >$in
echo -e "0r $in \n w \n q" | ed $file >/dev/null
echo -e "0r $in\n w \n q" | ed $file >/dev/null
else
line_num=$(grep -E -n "$regex_to_find" "$file" | cut -d: -f1)