bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Syntax Question...


From: Greg Wooledge
Subject: Re: Syntax Question...
Date: Mon, 3 Oct 2011 08:36:06 -0400
User-agent: Mutt/1.4.2.3i

On Thu, Aug 18, 2011 at 11:10:17AM +0100, Stephane CHAZELAS wrote:
> >> Please read BashFAQ/006: http://mywiki.wooledge.org/BashFAQ/006
> > "no force in the universe can put NUL bytes into shell strings usefully"

> No, zsh supports NUL bytes in its strings happily. It's even in
> the default $IFS. Where NUL bytes can't go, it's in arguments
> to commmands, environment variables, filenames... But I can't
> see why a shell variable couldn't contain NUL bytes, it's even a
> good thing for both those reasons as you can use that character
> to safely separate filenames, arguments, env vars... See for
> instance the -0 option of many GNU utilities.

zsh doesn't count, because it's not compatible with any other shell.
Since this is a bash mailing list (or newsgroup), we're concerned with
the behavior of bash, and bash can't store NUL bytes in strings.  The
reason for this is simple enough -- bash uses native C strings for
its variables.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]