Tuesday, April 19, 2011

Delete empty lines from file

perl -pi -e 's/^\n$//' file.txt

Friday, April 15, 2011

AG PI BibTeX key scheme for JabRef

Key pattern -> default pattern
[auth3_1:upper:]:[auth3_2:upper:]:[auth3_3:upper:]:[auth3_4:upper:]:[auth3_5:upper:]:[auth3_6:upper:]:[auth3_7:upper:]:[auth3_8:upper:]:[auth3_9:upper:]:[auth3_10:upper:]:[year]

Regular Expression
replace 
:+
with
:

Wednesday, April 13, 2011

Cross out terms or text in LaTeX

Required package: cancel
\usepackage{cancel}

You can make the following
with the following LaTeX source code:
\[ a + b + \cancel{c} = \cancel{c} + d + e \]

You can also zero out a term in an equation looking like
with the following LaTeX source code:
\[ a + b + \cancelto{0}{c} = d + e \]

Monday, April 11, 2011

Find out whether sparc machine is 32 or 64 bit

If you want to find out if your machine is 32 or 64 bit, simply type in the following:

isainfo -v

Finding out about the type of machine (sparc vs x86) is

uname -a

Monday, April 4, 2011

Check whether binary was compiled for 64 bit

linse@zebrano ~/release/RNAforester-1.5 $ file /vol/rnaforester2/bin/RNAforester
/vol/rnaforester2/bin/RNAforester: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), not stripped, uses CMOV SSE SSE2