Difference between revisions of "Grep log file"

From relax wiki
Jump to navigation Jump to search
(Created page with "== Grep the log file == Category:grep")
 
Line 1: Line 1:
== Grep the log file ==
+
== Grep the log file for commands ==
 +
First we find which commands relax has performed, and separate into the different fitting models
 +
egrep -wi --color 'relax>| model -' LOGFILE.txt > greplogfile.txt
 +
Then we replace instances of '''relax> ''' with empty, and comment out the model line
 +
sed -i "s/relax> //" greplogfile.txt
 +
sed -i "s/relax> //" greplogfile.txt
 +
 
 +
 
 +
== See also ==
 +
[http://www.pement.org/sed/sed1line.txt Sed one-liners]
  
 
[[Category:grep]]
 
[[Category:grep]]

Revision as of 13:21, 13 June 2013

Grep the log file for commands

First we find which commands relax has performed, and separate into the different fitting models

egrep -wi --color 'relax>| model -' LOGFILE.txt > greplogfile.txt

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

sed -i "s/relax> //" greplogfile.txt
sed -i "s/relax> //" greplogfile.txt


See also

Sed one-liners