I\'m using PuTTY to run:
mysql> SELECT * FROM sometable;
sometable has many fields and this results in many columns trying
sometable
You can use tee to write the result of your query to a file:
tee
tee somepath\filename.txt