Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #14255 > unrolled thread
| Started by | Clark Wang <dearvoid@gmail.com> |
|---|---|
| First post | 2018-06-20 23:36 +0800 |
| Last post | 2018-06-20 23:36 +0800 |
| Articles | 1 — 1 participant |
Back to article view | Back to gnu.bash.bug
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Variables can’t contain NUL Clark Wang <dearvoid@gmail.com> - 2018-06-20 23:36 +0800
| From | Clark Wang <dearvoid@gmail.com> |
|---|---|
| Date | 2018-06-20 23:36 +0800 |
| Subject | Re: Variables can’t contain NUL |
| Message-ID | <mailman.2300.1529509015.1292.bug-bash@gnu.org> |
On Wed, Jun 20, 2018 at 10:22 PM, George <tetsujin@scope-eye.net> wrote:
>
> Personally I do think some method of handling arbitrary binary data in the
> shell would be a welcome addition (and I think zsh provides that - don't
> remember if ksh does)
>
Ksh93 has "typeset -b" which defines vars for binary data (actually base64
encoded). E.g.:
[STEP 100] $ echo ${.sh.version}
Version AJM 93u+ 2012-08-01
[STEP 101] $ typeset -b var
[STEP 102] $ var=$( echo hello world | base64 )
[STEP 103] $ echo $var
aGVsbG8gd29ybGQK
[STEP 104] $ printf %B var
hello world
[STEP 105] $
Back to top | Article view | gnu.bash.bug
csiph-web