From: Omar Polo Subject: Re: regress: Replace sed -i with ed for portability To: Christian Weisgerber Cc: gameoftrees@openbsd.org Date: Sun, 05 Mar 2023 18:57:23 +0100 On 2023/03/05 18:15:05 +0100, Christian Weisgerber wrote: > Omar Polo: > > > @@ -1589,10 +1589,8 @@ test_commit_prepared_logmsg() { > > > > echo 'test commit_prepared_logmsg' > $testroot/logmsg > > > > - cat > $testroot/editor.sh < > -#!/bin/sh > > -sed -i 's/foo/bar/' "\$1" > > -EOF > > + # a no-op editor script > > + > $testroot/editor.sh > > chmod +x $testroot/editor.sh > > Yes, please. committed, thanks :) > > There are a few places in your diff where we run ed multiple times on > > the same file, [...] > > these could be folded in a single ed invocation; however this is not > > an issue. > > Revised script attached that takes care of the folding. > > $ cd got/regress/cmdline > $ perl -i ~/sed2ed *.sh quickly skimmed thru the diff and re-run a couple of times the affected tests, everything looks fine; ok for me. Thanks!