xsel

xsel

TLDR

Use a command's output as input of the clip[b]oard (equivalent to Ctrl + C)

>_ echo 123 | xsel -ib
copy

Use the contents of a file as input of the clipboard

>_ cat [file] | xsel -ib
copy

Output the clipboard's contents into the terminal (equivalent to Ctrl + V)

>_ xsel -ob
copy

Output the clipboard's contents into a file

>_ xsel -ob > [file]
copy

Clear the clipboard

>_ xsel -cb
copy

Output the X11 primary selection's contents into the terminal (equivalent to a mouse middle-click)

>_ xsel -op
copy

Copied to clipboard
free 100$ digital ocean credit