I'm using miller
to process some CSV files like so:
mlr --mmap --csv --skip-comments -N cut -f 2 my.csv
It works well, but some of the CSV files contain field names and some do not, which is why I'm using -N
. In the files that have field names, they get printed in the output. You would think that having the headerless-csv-output
bundled in the N
flag they wouldn't, but they are. Maybe it's a bug? Anyway, how would do I prevent the field names from being printed? If the input needs to be altered somehow and piped in that's fine, but the output is being uniquely processed.
Here's the documentation I've been referencing:
- https://manpages.ubuntu.com/manpages/focal/man1/mlr.1.html#options
- https://miller.readthedocs.io/en/latest/reference.html
my.csv
################################################################
# #
# #
# BIG OL' COMMENT BLOCK #
# #
# #
################################################################
#
"first_seen_utc","dst_ip","dst_port","c2_status","last_online"
"2021-01-17 07:30:05","67.213.75.205","443","online","2021-06-24"
"2021-01-17 07:44:46","192.73.238.101","443","online","2021-06-24"
Expected output
67.213.75.205
192.73.238.101
Present output
dst_ip
67.213.75.205
192.73.238.101