[Interest] [OT] Re: Defining a string in qmake command line
Till Oliver Knoll
till.oliver.knoll at gmail.com
Thu Jan 23 19:42:31 CET 2014
Am 23.01.2014 um 18:31 schrieb Thiago Macieira <thiago.macieira at intel.com>:
> The number of backslashes is wrong. You
> need 7, not 6:
>
> $ ls \\\\\\\"a\\\\\\\"
Well, that was totally obvious ;) However a few more pointy brackets in combination with [] and $ in the mix would have been nice, too! Feels almost like the STL API! ;)
> Exercise left to the reader: why didn't I check with echo?
That's a trick question! Because an echo repeats everything you say it would be sufficient to escape with half the number of backslashes as needed. But since we need 7 of them which cannot be divided by 2 without fractional part the use of echo here is impossible and might even format your harddrive (twice!).
Every Unix crack knows that ;)
Cheers,
Oliver
More information about the Interest
mailing list