[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: some variable level issues
From: |
Eric Blake |
Subject: |
Re: some variable level issues |
Date: |
Mon, 30 Jun 2008 06:31:14 +0000 |
>
> 1. I noticed bash variables don't support null characters (0x00). This is
> unlike
> perl and other languages. Will this ever change? Have people requested or
> wanted
> this feature?
POSIX says that the use of NUL bytes gives undefined behavior in a shell.
zsh supports this, but it would take a radical change to bash to support
it, with minimal benefit (since you cannot pass such variables on to
child processes - after all, the environ variable consists of NUL-terminated
entries).
> 3. The "+=" operator in bash seems to be slow. For instance, with my
> benchmarks,
> it is hundreds of times slower than ".=" in perl. Thoughts?
It's much faster than the alternative of "=".
--
Eric Blake