how to copy the results from a grep command to the bash clipboard?
- by avilella
If I type something in a Linux bash terminal with no X, and then use Ctrl+u, whatever I typed is stored in the bash "clipboard" (for lack of a better term), and I can type it again doing Ctrl+y.
How can I copy the results from a grep command on a text file to such bash clipboard?
For example, if I have an INSTALL file like this:
./installprocedure --do-some-long-and-complicated-operation-on-dir dir1
How can I copy the content of a grep command so that it's available doing Ctrl+y? For example:
copy content to bash clipboard "grep installprocedure INSTALL"
Ctrl+y
./installprocedure --do-some-long-and-complicated-operation-on-dir dir1 #cursor available here