As a lot of other part of bash, this is black magic. Lets suppose a friendly command that spits out NUL separated fields (as find -print0, shyaml get-values-0, ...). Which - may I insist - is the recommended way to …
Tag Archives: bash
bash lore: command substitution and final new lines
Posted by vaab
on 2014/05/07
No comments
Be wary that command substitution will remove all final new lines. Command substitution are $(command ..) construct or older `command ..` one that will be substitued by the standard output of the given command. But that's incorrect: a proper definition …
bash lore: NUL character and variables
Posted by vaab
on 2014/05/03
No comments
Bash variables are often thought as being able to store any binary content. Please bear in mind that it can't store NUL character, and only this one. Here you are: $ ascii_table() { echo -en "$(echo '\'0{0..3}{0..7}{0..7} | tr -d …