Friday, October 19, 2012

DOS prompt output to clip board

This trick is so simple, yet so powerful if you dabble in the DOS Prompt a lot. You can pipe the output from any command to the clipboard simply by piping it to "clip". That;s it. No more copy paste from the line wrapped DOS prompt output.

Example:
dir | clip
will give you the output of the DIR command to the clipboard.

Or if you are running Cygwin or MKS toolkit, and want to get the counts of instances in column 3 of a file
cut -f3 myfile.txt | sort | uniq -c | clip

Nifty,