On Wed, Jul 20, 2022 at 06:32:22PM +0100, Peter Maydell wrote:
> > > +# backslash escape any '\' and '"' characters
> > > +printf "%s" "$e" | sed -e 's/\([\"]\)/\\\1/g'
> >
> > You've fixed the bashism, but at the expense of a non-POSIX use of
> > sed. POSIX says the input to sed must be a
On Wed, 20 Jul 2022 at 17:30, Eric Blake wrote:
>
> On Wed, Jul 20, 2022 at 04:26:29PM +0100, Peter Maydell wrote:
> > The variable string-replacement syntax ${var/old/new} is a bashism
> > (though it is also supported by some other shells), and for instance
> > does not work with the NetBSD /bin/
On Wed, Jul 20, 2022 at 04:26:29PM +0100, Peter Maydell wrote:
> The variable string-replacement syntax ${var/old/new} is a bashism
> (though it is also supported by some other shells), and for instance
> does not work with the NetBSD /bin/sh, which complains:
> ../src/configure: 687: Syntax error
On 20/07/2022 17.26, Peter Maydell wrote:
The variable string-replacement syntax ${var/old/new} is a bashism
(though it is also supported by some other shells), and for instance
does not work with the NetBSD /bin/sh, which complains:
../src/configure: 687: Syntax error: Bad substitution
Replac
The variable string-replacement syntax ${var/old/new} is a bashism
(though it is also supported by some other shells), and for instance
does not work with the NetBSD /bin/sh, which complains:
../src/configure: 687: Syntax error: Bad substitution
Replace it with a more portable sed-based approach,