Mike Frysinger schrieb:
> is it even possible to utilize NUL in scripts ? or does bash just strip it
> out ? for example, trying to work with binary data:
> foo=$(<binary-file)
> echo "${foo}" > new-file
> the "new-file" will be exactly "binary-file" if all NUL bytes are stripped out
>
> or perhaps i want to take an arg list, append a string, and run a command on
> it ... but i cant pass it straight as it may be too large, so i need to xargs
> it ... so i'd do something like:
> echo ${@/%.moo/.foo$'\000'} | xargs -0 rm -f
> but this doesnt work since the $'\000' gets stripped
> -mike
We also once inspected that (more general "binary data"), the result was:
http://wooledge.org/mywiki/BashFAQ/058
J.