Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #11910

Re: redirecting a file descriptor to an array variable? Possible? How? RFE?

Path csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!usenet.stanford.edu!not-for-mail
From Linda Walsh <bash@tlinx.org>
Newsgroups gnu.bash.bug
Subject Re: redirecting a file descriptor to an array variable? Possible? How? RFE?
Date Wed, 18 Nov 2015 12:29:15 -0800
Lines 31
Approved bug-bash@gnu.org
Message-ID <mailman.181.1447878567.31583.bug-bash@gnu.org> (permalink)
References <564532BD.60801@tlinx.org> <CAJnmqwbeSXYrNF6zEJ9nEx2Zyi23X9fxLvkkc1HFOh7JkqZUsw@mail.gmail.com> <564CC7A1.9090004@tlinx.org> <20151118185629.GJ27325@eeg.ccf.org>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 7bit
X-Trace usenet.stanford.edu 1447878568 25863 208.118.235.17 (18 Nov 2015 20:29:28 GMT)
X-Complaints-To action@cs.stanford.edu
Cc Greg Wooledge <wooledg@eeg.ccf.org>
To bug-bash <bug-bash@gnu.org>
Envelope-to bug-bash@gnu.org
User-Agent Thunderbird
In-Reply-To <20151118185629.GJ27325@eeg.ccf.org>
X-detected-operating-system by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic]
X-Received-From 173.164.175.65
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.14
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <http://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
Xref csiph.com gnu.bash.bug:11910

Show key headers only | View raw



Greg Wooledge wrote:
> On Wed, Nov 18, 2015 at 10:46:57AM -0800, Linda Walsh wrote:
>> 	One thing that seems to be another problem.  Greg called
>> my attention to another printf format bug:
>>
>>              %q     causes  printf  to output the corresponding argument in 
>>              a
>>                     format that can be reused as shell input.
>>
>> 	Which it doesn't when nuls are involved.
> 
> An argument cannot contain a NUL byte.  So it's moot.
---
	As in:
> printf '"%c"\n'  $'\x00'|hexdump -C
00000000  22 00 22 0a                                       |".".|

	I see 2 arguments being passed to printf. That puts the 
NUL byte between 2 double quotes and terminates the line w/a newline.

	What I'm pointing out is that a NUL byte can be used
and processed as an argument in some cases.  The fact that it doesn't work
in most places, I will agree, is a short-coming.  However one cannot
categorically say that a NUL byte can't be used as an argument.  Solving
other places where it doesn't work might make it so that it *would* work...

Maybe a "-b" (binary) option could be added to 'declare'?

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: redirecting a file descriptor to an array variable? Possible? How? RFE? Linda Walsh <bash@tlinx.org> - 2015-11-18 12:29 -0800

csiph-web