Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

How do you change the previous command so that the output is in descending step order ?

Tip

Hint:  think about stings strings and integers


Expand
titleClick here to see the solution...

To order the output in descending step order use the –B option:

No Format
$> grib_ls -B "step:i desc" t2m.grib1
edition      centre       typeOfLevel  level        dataDate     stepRange    dataType     shortName    packingType  gridType     
1            ecmf         surface      0            20170217     24           cf           2t           grid_simple  reduced_gg  
1            ecmf         surface      0            20170217     18           cf           2t           grid_simple  reduced_gg  
1            ecmf         surface      0            20170217     12           cf           2t           grid_simple  reduced_gg  
1            ecmf         surface      0            20170217     6            cf           2t           grid_simple  reduced_gg  
1            ecmf         surface      0            20170217     0            cf           2t           grid_simple  reduced_gg  
5 of 5 grib messages in t2m.grib1

5 of 5 total grib messages in 1 files 


Tip

Note that you need to specify “step:i” so that step is treated as an integer rather than a character string.


...