How to Redirect Output of Command Line Tools to Windows Clipboard

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.

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.

ibrahim = { interested_in(unix, linux, android, open_source, reverse_engineering); coding(c, shell, php, python, java, javascript, nodejs, react); plays_on(xbox, ps4); linux_desktop_user(true); }