Is there functionality in unix that allows for the following:echo Some Text | copy-to-clipboard
How do I send stdin to the clipboard?
command line;clipboard
There are a couple tools capable of writing to the clipboard; I use xsel. It takes flags to write to the primary X selection (-p), secondary selection (-s), or clipboard (-b). Passing it -i will tell it to read from stdin, so you want:$ echo Some Text | xsel -i -b