in reply to Re: XML input through STDIN
in thread XML input through STDIN

> echo is what is stripping the quotes

Well, in fact, it's the shell that strips the quotes. Both single and double quotes are special for the shell and are removed during "Quote Removal" as the last step after all the expansions (see bash).

($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

Replies are listed 'Best First'.
Re^3: XML input through STDIN
by morgon (Priest) on Jun 04, 2017 at 01:04 UTC
    Yes it's the shell that strips the quote but it's probably not bash (entering pedantic mode now).

    I don't really know about other systems, but on unixy-systems the shell used is /bin/sh which on my Debian is a link to dash.

      Our [man://] doesn't contaion dash, but its documentation on my box mentions "Quote Removal" as well. See also dash(1).

      ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
        Dash is AFAIK just a lighter and faster version of bash, but less interactive and lacking features extending the POSIX standard.

        So interactive terminals run bash, while startup scripts will use dash (via sh)

        Hence basics like "quote removal" must be the same.

        It's like nitpicking the IE can't do JavaScript because it does JScript ...

        Cheers Rolf
        (addicted to the Perl Programming Language and ☆☆☆☆ :)
        Je suis Charlie!