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 arguments:

$ printf '%s\n' a\\bc\ d\\ef
a\bc d\ef

$ var='a\\bc\ d\\ef'
$ printf '%s\n' $var
a\\bc\
d\\ef

Good luck understanding this!

Word splitting and quote removal aren't that bad.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to