howtos


Bash: tail: Remove first N lines from file

tail -n +$N inputFile > outputFile

Where $N is the number of the line which you want to start printing from.
For example if you want to delete only the first line / start printing from the second line you must issue the following:

tail -n +2 inputFile > outputFile


Ubuntu: How to compile PrecoSAT v.570 under ubuntu 11.10

By downloading PrecoSAT from http://fmv.jku.at/precosat/ and trying to install it on Ubuntu 11.10 32-bit (Oneiric Ocelot) by:

    • Decompressing the files
    • and calling ./configure && make

I got the following error at make:

g++ -O3 -m32 -static -Wall -Wextra -DNDEBUG -DNLOGPRECO -DNSTATSPRECO  -c precomain.cc
In file included from precomain.cc:23:0:
precosat.hh:164:31: error: ‘ptrdiff_t’ has not been declared
precosat.hh:270:13: error: ‘ptrdiff_t’ has not been declared
make: *** [precomain.o] Error 1

which can be resolved by adding

#include <cstddef>

at the includes in the file precosat.hh