Donnerstag, 16. Februar 2012

QM 001: Getting the barrier for rotation in H2C=CH2, correctly

Upcoming post on the calculation of the energy barrier around the sigma bond in H2C=CH2.

Freitag, 10. Februar 2012

Bash if statement

The Bash if statement is a bit funny. Say for every files-i.txt, there should be a files-i.dat.
This example can be used to filter out files that dont have the corresponding .dat file present.

for i in files-*txtdo    if [ ! -e ${i/txt/dat} ] then echo$i    fidone

Note the spaces after and before the opening and closing hard bracket. Also note that "then" is on its own line.