bash tail - ghdrako/doc_snipets GitHub Wiki

tail -3 columns[2-4].txt
# checks if the last line of test.txt contains the string aa:
x=`cat test.txt |tail -1|grep aa`
if [ $x ==  ]
echo found aa in the last line
fi