...
But it is better to write a rules file and use grib_filter:
Code Block |
---|
language | bash |
---|
title | my.filter |
---|
|
if (count < 4) {
print "Copying message number [count]";
write;
} |
...
Of course you can make the IF condition more complicated e.g. select a range of messages to be copied:
Code Block |
---|
|
if (count == 3 || count == 13) {
write; # Write out message 3 and 13 only
} |
Code Block |
---|
if (count % 2 == 0) {
write; # Write out even-numbered messages, e.g., 2, 4, 6 etc
} |
Info |
---|
Note: The "count" key starts from 1 |
Related articles
Content by Label |
---|
showLabels | false |
---|
max | 5 |
---|
spaces | ~usa |
---|
showSpace | false |
---|
sort | modified |
---|
reverse | true |
---|
type | page |
---|
cql | label in ("kb-how-to-article","eccodes-faqs","grib","grib_copy","clone","grib_filter") and label in ("grib","grib_copy","grib_filter") and type = "page" and space = "UDOC" |
---|
labels | kb-how-to-article |
---|
|
...