3 ms·
Here is another variation that does not used "sed -i". It uses a favourite hex editor called ired. test ! -h $1||exec echo $0: error: symlink case
by 1vuio0pswjnm7 4y ago
Here is another variation that does not used "sed -i". It uses a favourite hex editor called ired.
test ! -h $1||exec echo $0: error: symlink
case $# in :)
;;1) x=$(sed -n '$=' $1)
test $x -gt 1||exec echo usage: $0 dst src
od -tx1 -An|sed 's/^/w /'|ired -n $1 /dev/stdin
;;2) printf '0r '$2'\nwq\n'|ed -s $1
esac