[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Paste with null delimiter
From: |
Eric Blake |
Subject: |
Re: Paste with null delimiter |
Date: |
Tue, 3 Nov 2015 13:52:07 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
[adding the list back in, with permission]
On 11/03/2015 11:43 AM, Julio C. Neves wrote:
> I'm sorry to disturb you.
I have no problem replying to messages, so no need to apologize for
disturbing me. My only problem is when messages are sent to just me
instead of the public list, because then it is a waste of resources.
> There are several responses to my question at the
> bash bug's site, but no one tells why the construction paste -s "" ...
> works, maybe because of my bad English
I don't think your English is the barrier here. Bash quoting rules can
be tricky to learn, especially if you don't know at which point quotes
are stripped from the command line before creating the argv[] seen by
the final process.
It might help if you try this:
$ args() { echo "got $# args:"; for a; do printf '.%s.\n' "$a"; done; }
$ args a""
got 1 args:
.a.
$ args a ""
got 2 args:
.a.
..
$
Once you understand that, you will understand why "" must appear
isolated from any other text for it to produce an empty argument,
whether you are trying to pass an empty string to paste or to any other
application.
>
> I'll give up, but if you want to post this consersation on the list fell
> free to do it.
>
> I would like to thank you very much for your help and your time.
>
We're trying to help. If we haven't answered your question yet, then
feel free to try asking it in a different manner.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
Re: Paste with null delimiter, Dennis Williamson, 2015/11/03
Re: Paste with null delimiter, Andreas Schwab, 2015/11/03
Re: Paste with null delimiter, Stephane Chazelas, 2015/11/04