Hi Chet,
> > I wrote:
> >> Stackoverflow [1] says that word-expansion must be
> >> avoided, because it does not support the spaces in arguments
> >
> > These two examples show how non-intuitive shell scripts behave,
> > regarding spaces and backslashes in arguments:
> >
> > $ printf '%s\n' a\\bc
On 10/11/24 4:54 AM, Bruno Haible via Gnulib discussion list wrote:
I wrote:
Stackoverflow [1] says that word-expansion must be
avoided, because it does not support the spaces in arguments
These two examples show how non-intuitive shell scripts behave,
regarding spaces and backslashes in argum
> 2024-09-25 Bruno Haible
>
> build-to-host.m4: Add some convenience macros.
More of the same kind:
2024-10-11 Bruno Haible
bison-i18n: Add support for mingw builds on Cygwin hosts.
* m4/bison-i18n.m4 (BISON_I18N): Define also BISON_LOCALEDIR_c and
BISON_L
Il giorno ven 11 ott 2024 alle ore 11:00 Michele Locati
ha scritto:
>
> > $ var='a\\bc\ d\\ef'
> > $ printf '%s\n' $var
> > a\\bc\
> > d\\ef
>
> And also:
>
> $ printf '%s\n' $var
> a\\bc\ d\\ef
Sorry, I meant
printf '%s\n' "$var"
a\\bc\ d\\ef
> $ var='a\\bc\ d\\ef'
> $ printf '%s\n' $var
> a\\bc\
> d\\ef
And also:
$ printf '%s\n' $var
a\\bc\ d\\ef
> Good luck understanding this!
:D
I wrote:
> Stackoverflow [1] says that word-expansion must be
> avoided, because it does not support the spaces in arguments
These two examples show how non-intuitive shell scripts behave,
regarding spaces and backslashes in arguments:
$ printf '%s\n' a\\bc\ d\\ef
a\bc d\ef
$ var='a\\bc\ d\\ef'