On Mon Sep 5, 2022 at 10:08 PM CEST, Songbo Wang wrote:
> On 9/5/22 20:57, alice wrote
> > s6-test -v '\!'
> > seems to work for me, tested with
> > env !=1 s6-test -v'\!'
> > and without the env. maybe i'm misreading it?
> >
> Your example works for me on bash, but I just tested by the following
> execline script
>
> #!/usr/bin/execlineb -P
> exec -c s6-test -v !
>
> which gives a parse error to me. Double quoting the ! gives the same
> error. Single quoting eliminates the error, but doesn't seem to work
> correctly:
>
> #!/usr/bin/execlineb -P
> export ! 0
> s6-test -v '!'
>
> exits 1. Backslashing ! doesn't work, double quoted or not. Single quote
> works, but same
>
>
> #!/usr/bin/execlineb -P
> export ! 0
> s6-test -v '\!'
changing this to
s6-test -v \\\!
works as expected. quoting is different in execline, i think there was
more written in some documentation for the specifics, but i think it
needs to both escape the ! and the \ , so it's three levels of \
as a bonus, that also works in normal shell (no quoting in both places)
>
> exits 1.
>
> I wonder if I am stuck in some intricate no-go land of execline or
> s6-test...
> --
> Songbo Wang (汪嵩博)
Received on Mon Sep 05 2022 - 22:15:10 CEST