Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

gmtmath_op.sh 749 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  1. #!/usr/bin/env bash
  2. # Testing gmt math for the DIFF, MEAN & -S Ops
  3. $AWK 'BEGIN{printf "1 10\n2 10\n3 10\n4 10\n"}' | gmt math STDIN DIFF MEAN -S -o1 = out
  4. echo 0 > in
  5. # Testing gmt math for the BITANDoperators
  6. gmt math -Q 7 3 BITAND = >> out
  7. echo 3 >> in
  8. # Testing gmt math for the BITLEFT operators
  9. gmt math -Q 8 3 BITLEFT = >> out
  10. echo 64 >> in
  11. # Testing gmt math for the BITOR operators
  12. gmt math -Q 7 3 BITOR = >> out
  13. echo 7 >> in
  14. # Testing gmt math for the BITTEST operators
  15. gmt math -Q 15 3 BITTEST = >> out
  16. echo 1 >> in
  17. # Testing gmt math for the BITXOR operators
  18. gmt math -Q 7 3 BITXOR = >> out
  19. echo 4 >> in
  20. # Testing gmt math for the BITRIGHT operators
  21. gmt math -Q 64 3 BITRIGHT = >> out
  22. echo 8 >> in
  23. diff out in --strip-trailing-cr > fail
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...