GNU bash、バージョン 4.3.42(1) リリース
null 文字を区別しようとしていますが、bash は null 文字を変数に保持していないようです。
$ echo -e 'hello\0goodbye' > testlist
$ cat testlist | cut -d '' -f1
hello
$ foobar=$(echo -e 'hello\0goodbye'); echo "$foobar" | cut -d '' -f1
hellogoodbye
私が間違っていることはありますか?