Open main menu

Grep the log file for commands

First we find which commands relax has performed, and separate into the different fitting models.
We also just make some line space and important points.

Then we replace instances of relax> with empty, and comment out the model line.

set IN=logfile.txt ;
set OUT=grep_log_to_commands.txt ;
egrep -wi --color 'relax>| model -' $IN > $OUT ;
sed -i "s/relax> //" $OUT ;
sed -i 's/^- /\n#- /' $OUT ;
sed -i 's/^minimise(/\nminimise(/' $OUT ;
sed -i 's/^script(/\n#script(/' $OUT ;
sed -i 's/^results.write(/\nresults.write(/' $OUT ;
sed -i 's/^model_selection(/\nmodel_selection(/' $OUT ;
sed -i '0,/spectrum.replicated(/s//\nspectrum.replicated(/' $OUT ;
sed -i '0,/spectrum.read_intensities(/s//\nspectrum.read_intensities(/' $OUT ;

See also