Skip to content

Instantly share code, notes, and snippets.

@aammd
Created July 17, 2015 17:36
Show Gist options
  • Save aammd/31eff86ca7160a780cbb to your computer and use it in GitHub Desktop.
Save aammd/31eff86ca7160a780cbb to your computer and use it in GitHub Desktop.
some genera, where repeated genera have been annoyingly abbreviated
BEGIN {FS = ","
genus = "0"}
$1 ~ /[A-Z][a-z]/ {genus = $1}
{
$2 = genus
printf "%s %s\n", $1, $2
}
Ardea
A.
A.
Hylobates
H.
Mus
Balenoptera
B.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment