[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netCDF #UGN-989544]: ncdump -k fails to add newline to result in later versions
- Subject: [netCDF #UGN-989544]: ncdump -k fails to add newline to result in later versions
- Date: Thu, 06 Dec 2018 18:53:23 -0700
I think this change was intentional. The idea was that
it made it easier to use ncdump -k in scripts to determine
the type of a file.
e.g.
KIND=`ncdump -k $file`
if test "x$KIND" = xnetcdf-4 ; then ... else ... fi
> In version 4.4.1.1, "ncdump -k file.nc" printed a string ending with a
> newline.
> In 4.6.1 and 4.6.2, it does not. I compared the source for 4.4.1.1 and 4.6.2.
>
> The lines:
>
> if (kind_out) {
> printf ("%s\n", kind_string(formatting_specs.nc_kind));
> } else if (kind_out_extended) {
> printf ("%s\n",
> kind_string_extended(formatting_specs.nc_extended,formatting_specs.nc_mode));
> } else {
>
> became:
>
> if (kind_out) {
> printf ("%s", kind_string(formatting_specs.nc_kind));
> } else if (kind_out_extended) {
> printf ("%s",
> kind_string_extended(formatting_specs.nc_extended,formatting_specs.nc_mode));
> } else {
>
> Diff output looks like:
>
> 2302c2362
> < printf ("%s\n", kind_string(formatting_specs.nc_kind));
> ---
> > printf ("%s", kind_string(formatting_specs.nc_kind));
> 2304c2364
> < printf ("%s\n",
> kind_string_extended(formatting_specs.nc_extended,formatting_specs.nc_mode));
> ---
> > printf ("%s",
> kind_string_extended(formatting_specs.nc_extended,formatting_specs.nc_mode));
>
> So, fixing it would be trivial, given the will....
>
> Thanks,
> -Hoop
>
>
=Dennis Heimbigner
Unidata
Ticket Details
===================
Ticket ID: UGN-989544
Department: Support netCDF
Priority: Normal
Status: Open
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata
inquiry tracking system and then made publicly available through the web. If
you do not want to have your interactions made available in this way, you must
let us know in each email you send to us.