mirror of
https://github.com/bin456789/reinstall.git
synced 2025-02-28 08:54:13 +08:00
core: 兼容原版 ed
This commit is contained in:
parent
f8e58ab876
commit
2091854185
2
trans.sh
2
trans.sh
@ -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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user