Closed derekmahar closed 4 years ago
The behavior is intended, but you are probably right. Please wait a while, I’ll check about there is no problem if output nothing when there is no data to be output.
I use something like
sed '/^$/d'
as a filter :-)-O
el
On 12/12/2019 09:18, Yuki wrote:
The behavior is intended, but you are probably right. Please wait a while, I’ll check about there is no problem if output nothing when there is no data to be output.
-- Dr. Eberhard W. Lisse \ / Obstetrician & Gynaecologist el@lisse.NA / * | Telephone: +264 81 124 6733 (cell) PO Box 8421 \ / Bachbrecht 10007, Namibia ;____/
Yes, I agree that | sed '/^$/'
is a workaround, but users would first
need to identify csvq --format CSV --without-header
as the source of the
blank line and then apply this filter to every instance.
On Thu., Dec. 12, 2019, 2:24 a.m. ondohotola, notifications@github.com wrote:
I use something like
sed '/^$/d'
as a filter :-)-O
el
Fixed and released as the version 1.11.8. Thanks.
Thank you! The blank line is gone!
$ printf "date,source_currency_code,target_currency_code,exchange_rate" |
csvq --format CSV --without-header "SELECT * FROM STDIN"
$
Command
cvsq --format CSV --without-header
outputs an unnecessary blank line (newline) when the input CSV file contains only a header (no data rows).By contrast, command
cvsq --format CSV
correctly outputs only the header:This is a minor, but rather annoying bug because it means that when appending the output of
csvq --format CSV --without-header
of a CSV file that contains no rows to another CSV file,csvq
appends a blank line.