Re:Actually using Ed
by 1vuio0pswjnm7 on Wednesday January 11, 2023 @04:50PM
(#34345450)
Instead of sed -i, one can use ired.
od -tx1 -An|sed 's/^/w /'|ired -n $1 /dev/stdin
Unless I am mistaken, ired does not use a temp file, unlike sed -i.
Here is a sed solution
However this still has a limitation. The target file must be more than one line.Using a named pipe for large files