I have recently discovered a new Windows command line tool, called 'clip'
that can be used to redirect the output of CLI tools to the Windows Clipboard.
This command is available in Windows Vista but not found in Windows XP. It’s found in the %systemroot%\system32 directory.
To copy the output of a CLI tool to the Windows Clipboard, append ‘| clip’ to the end of the command. To retrieve the output, open Notepad or a text editor and click on ‘Paste’.
Clip can also be used with input redirection operator – ‘<‘. To perform the redirection, prepend clip < to the command.
Below are some examples on how the program can be called.
1 |
C:\temp> type readmet.txt | clip |
1 |
C:\temp> clip < readme.txt |
I am not sure if such a tool is available in UNIX or Linux. But this feature can be easily emulated by redirecting the output to a file and opening the file in VI or a text editor.