Skip to content

Instantly share code, notes, and snippets.

@jhpoelen
Last active March 27, 2023 21:50
Show Gist options
  • Save jhpoelen/92e1cf7c647cd495e6d3d3b20d71f2de to your computer and use it in GitHub Desktop.
Save jhpoelen/92e1cf7c647cd495e6d3d3b20d71f2de to your computer and use it in GitHub Desktop.
#!/bin/bash
#
# related to https://github.com/Big-Bee-Network/UCSB-IZC00012194
#
preston ls\
| grep hasVersion\
| preston grep 'UCSB-IZC00012194.*body\ssize' --log tsv\
| grep value\
| cut -f1
preston cat --remote https://linker.bio,https://softwareheritage.org 'line:hash://sha256/436ac4ec8a78c1cb86e9616b31b0c63bd76075e0551584a30f3ba73628c00723!/L1,L7'\
| mlr --icsv --oxtab cut -r -f '^measurement.*$,catalogNumber'
# produces:
#
# catalogNumber UCSB-IZC00012194
# measurementType body size;intertegular distance;ITD
# measurementValue 65
# measurementUnit mm
# measurementDeterminedBy Katja Seltmann
# measurementDeterminedDate 2023-02-10
# measurementMethod Measured under microscope
# measurementRemarks
preston cat --remote https://linker.bio,https://softwareheritage.org 'line:hash://sha256/436ac4ec8a78c1cb86e9616b31b0c63bd76075e0551584a30f3ba73628c00723!/L1,L7'\
| mlr --icsv --oxtab cut -r -f '^measurement.*$,catalogNumber'\
> UCSB-IZC00012194-itd.xtab
preston cat --remote https://linker.bio,https://softwareheritage.org 'line:hash://sha256/436ac4ec8a78c1cb86e9616b31b0c63bd76075e0551584a30f3ba73628c00723!/L1,L7'\
| mlr --icsv --ojson cut -r -f '^measurement.*$,catalogNumber'\
> UCSB-IZC00012194-itd.xtab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment