Created
January 1, 2012 15:19
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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