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

outputselect.sh 1.3 KB

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
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
  1. #!/usr/bin/env bash
  2. # Test gmt convert with ASCII data and using -s
  3. # Build input file
  4. cat << EOF > input.txt
  5. 1 1 1 1
  6. 2 2 NaN 2
  7. 3 3 3 NaN
  8. 4 4 NaN NaN
  9. EOF
  10. echo "# Test -s" > answer.txt
  11. gmt convert input.txt -s >> answer.txt
  12. echo "# test -s+r" >> answer.txt
  13. gmt convert input.txt -s+r >> answer.txt
  14. echo "# Test -s3" >> answer.txt
  15. gmt convert input.txt -s3 >> answer.txt
  16. echo "# test -s3+r" >> answer.txt
  17. gmt convert input.txt -s3+r >> answer.txt
  18. echo "# test -s+a" >> answer.txt
  19. gmt convert input.txt -s+a >> answer.txt
  20. echo "# test -s+a+r" >> answer.txt
  21. gmt convert input.txt -s+a+r >> answer.txt
  22. echo "# test -s2:3" >> answer.txt
  23. gmt convert input.txt -s2:3 >> answer.txt
  24. echo "# test -s2:3+a" >> answer.txt
  25. gmt convert input.txt -s2:3+a >> answer.txt
  26. echo "# test -s2:3+r" >> answer.txt
  27. gmt convert input.txt -s2:3+r >> answer.txt
  28. echo "# test -s2:3+r+a" >> answer.txt
  29. gmt convert input.txt -s2:3+a+r >> answer.txt
  30. cat << EOF > truth.txt
  31. # Test -s
  32. 1 1 1 1
  33. 3 3 3 NaN
  34. # test -s+r
  35. 2 2 NaN 2
  36. 4 4 NaN NaN
  37. # Test -s3
  38. 1 1 1 1
  39. 2 2 NaN 2
  40. # test -s3+r
  41. 3 3 3 NaN
  42. 4 4 NaN NaN
  43. # test -s+a
  44. 1 1 1 1
  45. 3 3 3 NaN
  46. # test -s+a+r
  47. 2 2 NaN 2
  48. 4 4 NaN NaN
  49. # test -s2:3
  50. 1 1 1 1
  51. 2 2 NaN 2
  52. 3 3 3 NaN
  53. # test -s2:3+a
  54. 1 1 1 1
  55. # test -s2:3+r
  56. 4 4 NaN NaN
  57. # test -s2:3+r+a
  58. 2 2 NaN 2
  59. 3 3 3 NaN
  60. 4 4 NaN NaN
  61. EOF
  62. diff truth.txt answer.txt --strip-trailing-cr > fail
Tip!

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

Comments

Loading...