select * from table limit 100 into outfile '/home/test.txt';
pager cat > /home/test.txt;
nopager
mysql -p -e "select * from table" > /home/test/txt