To make it work universally, the simplist solution is to use sed and mv(a tempfile).
sed
mv
sed '1d' test.dat > tmp.dat && mv tmp.dat test.dat