Is it intended to use ascii SOH \x01
for ascii_null alias instead of \x00
?
#1618
-
I'm opening a discussion thread instead of an issue ticket because maybe it's intended for some reasons and is known by experienced users. It took me quite a bit to get it but parsing the output of miller modifying the record separator with convenient And indeed in the docs is stated correctly that:
I admit I totally blinded the Is this an error or intended? With this sample script you can use to test that with #!/bin/bash
mlr --version
# -d '' means use null byte as line separator
while read -r -d '' line; do
echo "$line"
# below using ascii_null is printing nothing,
# replacing ascii_null with '\x00' works as expected
done < <(mlr --icsv --ors ascii_null cat << CSV
id,first_name,last_name
1,Corbet,Torrejon
2,Alwin,Lucien
3,Tades,Huson
4,Rachel,Cuniffe
5,Armand,Skase
6,Demetre,Blase
CSV
) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
It's been a long time but IIRC this is unintentional. I'll fix this, along with a heavy warning in the release notes ...
|
Beta Was this translation helpful? Give feedback.
-
My very deep apologies -- this is embarrasing. All four of I've done an awful lot of low-level programming over the years including serial/UART on-circuit-board development and I really ought to have known better :( |
Beta Was this translation helpful? Give feedback.
It's been a long time but IIRC this is unintentional.
I'll fix this, along with a heavy warning in the release notes ...
ascii_null
will now be\x00
ascii_soh
will now be\x01