File: bufr_ls.sh

package info (click to toggle)
eccodes 2.45.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 154,404 kB
  • sloc: cpp: 162,953; ansic: 26,308; sh: 21,742; f90: 6,854; perl: 6,361; python: 5,172; java: 2,226; javascript: 1,427; yacc: 854; fortran: 543; lex: 359; makefile: 283; xml: 183; awk: 66
file content (82 lines) | stat: -rwxr-xr-x 1,966 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#!/bin/sh

#Default options

echo "-# Without options a <b>default list of keys</b> is printed. \\n"
echo "The default list can be different depending on the type of BUFR message. \\n"
echo "\\verbatim "
echo "> bufr_ls ../data/bufr/syno_multi.bufr \\n"
echo "\\endverbatim\\n "

echo "The result is: \\n"

echo "\\verbatim "

./bufr_ls ../data/bufr/syno_multi.bufr

echo "\\endverbatim\\n "

#Wildcards

echo "-# It is allowed to use <b>wildcards</b> in filenames.  \\n"
echo "\\verbatim "
echo "> bufr_ls ../data/bufr/syno_*.bufr \\n"
echo "\\endverbatim\\n "

#echo "The result is: \\n"

#echo "\\verbatim "

#./bufr_ls ../data/bufr/syno_*.bufr

#echo "\\endverbatim\\n "

#Custom keys

echo "-# To list only a specific set of keys use the <b>-p</b> option. \\n"
echo "\\verbatim "
echo "> bufr_ls -p totalLength,bufrHeaderCentre,bufrHeaderSubCentre ../data/bufr/syno_multi.bufr \\n"
echo "\\endverbatim\\n "

#echo "The result is: \\n"

#echo "\\verbatim "

#./bufr_ls -p totalLength,bufrHeaderCentre,bufrHeaderSubCentre ../data/bufr/syno_multi.bufr

#echo "\\endverbatim\\n "

#Where

echo "-# To list only a subset of messages use the <b>-w</b> (where option).\\n "
echo "Only the 12 UTC messages are listed with the following line.\\n "
echo "\\verbatim "
echo "> bufr_ls -w typicalTime=\"120000\" ../data/bufr/syno_*.bufr"

#./bufr_ls -w typicalTime="120000" ../data/bufr/syno_*.bufr

echo "\\endverbatim\\n "

#Where

echo "-# All the non-12 UTC messages are listed as follows:\\n "
echo "\\verbatim "
echo ">  bufr_ls -w typicalTime!=\"120000\" ../data/bufr/syno_*.bufr"
echo "\\endverbatim\\n "

#echo "The result is: \\n"

#echo "\\verbatim "

#./bufr_ls -w typicalTime!="120000" ../data/bufr/syno_*.bufr 

#echo "\\endverbatim\\n "

echo "-# To list only the second message from a BUFR file:\\n "
echo "\\verbatim "
echo "> bufr_ls -w count=2 ../data/bufr/syno_multi.bufr"

#./bufr_ls -w count=2  ../data/bufr/syno_multi.bufr

echo "\\endverbatim\\n "