grep foo --color=always | more
Friday, September 9, 2011
Monday, July 18, 2011
cpp lint by google
http://google-styleguide.googlecode.com/svn/trunk/cpplint/cpplint.py
c++ style from google
Monday, July 4, 2011
clang another good c compiler
It took me several minutes and googling to remember it is `clang', another c compiler.
Sunday, July 3, 2011
obtain a figure file list from a tex file using grep and sed: new version
#!/bin/bash
# to get a list of pdf files included in a tex file
# echo "Usage: $0 {file.name}"
# echo "Processing file $1"
EXPECTED_ARGS=1
E_BADARGS=65
if [ $# -ne $EXPECTED_ARGS ]
then
echo "Usage: `basename $0` {tex.file}"
exit $E_BADARGS
fi
tmpfile=`mktemp -p . exttmp.XXXX`
grep includegraphics $1 > $tmpfile
# sed -e 's/includegraphics/ /' -e 's/[\\{}]//g' -e 's/\[.*\]//g' -e 's/[^ ]\+//' -e 's/^ \+//' < $tmpfile
# this one is much better than the above
sed -e 's/.*{\(.*\.pdf\)}.*/\1/' < $tmpfile
if [ -f "$tmpfile" ]
then
rm "$tmpfile"
fi
tmpfile=`mktemp -p . exttmp.XXXX`grep includegraphics $1 > $tmpfilesed -e 's/includegraphics/ /' -e 's/[\\{}]//g' -e 's/\[.*\]//g' -e 's/[^ ]\+//' -e 's/^ \+//' < $tmpfileif [ -f "$tmpfile" ]thenrm "$tmpfile"fi## the includegraphics must be at the same line with the pdf or other figure files included.
R mathplot plotmath
it is ?plotmath to get the help in R.
You cannot imagine that at some time point, you would forget this.
Friday, July 1, 2011
Subscribe to:
Posts (Atom)