Skip to content

Instantly share code, notes, and snippets.

@aborruso
Last active October 7, 2020 09:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aborruso/2f18c0d27b973a15f940b815f864c725 to your computer and use it in GitHub Desktop.
Save aborruso/2f18c0d27b973a15f940b815f864c725 to your computer and use it in GitHub Desktop.
Glossophaga longirostris- TK 18501, TK 18585, TK 18613, TK18667, TK 25150/ NMNH 580656, NMNH 580658;Glossophaga morenoi- TK 20563, TK 20564, TK 20579;Glossophaga soricina- TK 34707, TK 41573, TK 9251, TK 11040, TK 4728/ NMNH 578997, NMNH 579009, NMNH 579010/ FMNH 128675 to FMNH 128681
<input.txt sed -r 's/;/\n/g;s@(to|/|-)@,@g' | \
mlr --nidx --ifs "," --ofs "|" clean-whitespace \
then rename 1,specimen \
then reshape -r '[0-9]' -o item,value \
then filter '$value=~".+"' \
then cut -x -f item
Glossophaga longirostris|TK 18501
Glossophaga longirostris|TK 18585
Glossophaga longirostris|TK 18613
Glossophaga longirostris|TK18667
Glossophaga longirostris|TK 25150
Glossophaga longirostris|NMNH 580656
Glossophaga longirostris|NMNH 580658
Glossophaga morenoi|TK 20563
Glossophaga morenoi|TK 20564
Glossophaga morenoi|TK 20579
Glossophaga soricina|TK 34707
Glossophaga soricina|TK 41573
Glossophaga soricina|TK 9251
Glossophaga soricina|TK 11040
Glossophaga soricina|TK 4728
Glossophaga soricina|NMNH 578997
Glossophaga soricina|NMNH 579009
Glossophaga soricina|NMNH 579010
Glossophaga soricina|FMNH 128675
Glossophaga soricina|FMNH 128681
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment