Skip to content

Instantly share code, notes, and snippets.

@jarvist
Created January 1, 2012 15:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jarvist/1547580 to your computer and use it in GitHub Desktop.
Save jarvist/1547580 to your computer and use it in GitHub Desktop.
Tiny awk-driven shell script to extract Raman frequencies + Activity from a Gaussian (quantum chemical program) .log output file.
#!/usr/bin/awk -f
BEGIN{j=0
a=0}
{
if (($1=="Frequencies"))
{
freq[j]=$3
j++
freq[j]=$4
j++
freq[j]=$5
j++
}
if (($1=="Raman"))
{
activ[a]=$4
a++
activ[a]=$5
a++
activ[a]=$6
a++
}
}
END{
for (k=1;k<=j;k++)
{
print freq[k], activ[k]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment