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

mixread.sh 564 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
  1. #!/usr/bin/env bash
  2. # Test gmt convert with mixed format binary input
  3. # This is what the output should look like
  4. cat << EOF >> tt.d
  5. 3.1400001 3.1400001 3.14 3.14 3.14 9999 9999 123123.000000 123123
  6. 3.1400001 3.1400001 3.14 3.14 3.14 9999 9999 123123.000000 123123
  7. 3.1400001 3.1400001 3.14 3.14 3.14 9999 9999 123123.000000 123123
  8. EOF
  9. # Use +L since binary file was created on a little-endian OS X box
  10. gmt convert -bi2f,3d,2h,10x,2i+L mix_binary_data.b --FORMAT_FLOAT_OUT=0-1:%.8g,2-4:%.2f,5-6:%g,7:%12.6f,8:%g > tt.txt
  11. diff tt.d tt.txt --strip-trailing-cr > fail
Tip!

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

Comments

Loading...