Path: csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!usenet.stanford.edu!not-for-mail From: Eric Blake Newsgroups: gnu.bash.bug Subject: Re: Paste with null delimiter Date: Tue, 3 Nov 2015 13:52:07 -0700 Organization: Red Hat, Inc. Lines: 77 Approved: bug-bash@gnu.org Message-ID: References: <3a207f09-fc2b-4a2e-a6e5-1d33c7479849@googlegroups.com> <5638F1C2.9000607@redhat.com> <5638F804.7010609@redhat.com> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="dnUw616rALpbxg01HGnuFphS5J3OAjLhD" X-Trace: usenet.stanford.edu 1446583934 10886 208.118.235.17 (3 Nov 2015 20:52:14 GMT) X-Complaints-To: action@cs.stanford.edu To: "Julio C. Neves" , bug-bash Envelope-to: bug-bash@gnu.org Openpgp: url=http://people.redhat.com/eblake/eblake.gpg X-Enigmail-Draft-Status: N1110 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com gnu.bash.bug:11828 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --dnUw616rALpbxg01HGnuFphS5J3OAjLhD Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable [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: =2Ea. $ args a "" got 2 args: =2Ea. =2E. $ 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. >=20 > I'll give up, but if you want to post this consersation on the list fel= l > free to do it. >=20 > I would like to thank you very much for your help and your time. >=20 We're trying to help. If we haven't answered your question yet, then feel free to try asking it in a different manner. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --dnUw616rALpbxg01HGnuFphS5J3OAjLhD Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJWOR53AAoJEKeha0olJ0NqEz4H/jqOQRlWifB5RGDvSMQ/vQM9 WpRY2rjMWZHpiee1NmGJ8rvK6cUzz0lidUPTOl8pgnoEKP5MGFRIJXxqVdZdRC6e fTIvdi2TDOm5pfKNDLwyIsx20vvXO0wIJuMtXXdV8H6hKkJLXngmXvw0riR7xw1W kktgd33jx/Xrv2NgSX13iWZ2NjQPLzY+19i044X+3K/O4/6COir/ZA+B4XmEMNEU GQRqr2N34wou+0PD+h2LlDhY+K5WV+geEM7x0YCe1w2y7Iar8b/WHrS+ABMDgR66 II2mHpNVkXLq1csSBFu1hUXyvJAogSw3RTGymdGVG+XD0wCioUayooykV/3iSP8= =R3zN -----END PGP SIGNATURE----- --dnUw616rALpbxg01HGnuFphS5J3OAjLhD--