From the xclip(1) man page:
Quote:
Reads from standard in, or from one or more files, and makes the data
available as an X selection for pasting into X applications. Prints current X selection to standard out.
|
When with the left mouse button you copy from a xterm window you also copy a lot of trailing whitespace. See the attached file for an example.
With xclip you can transfer a file or command output to the X clipboard
Code:
$ dmesg | head -4 | xclip
$ xclip -o
OpenBSD 7.1 (GENERIC.MP) #3: Sun May 15 10:27:01 MDT 2022
root@syspatch-71-amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4242419712 (4045MB)
avail mem = 4096557056 (3906MB)
Or you can paste into an program/application (e.g. forum message box) with the middle mouse button.