1
1
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
http://stackoverflow.com/questions/749544/pipe-to-from-clipboard may be related to this. – N.N. – 2011-06-30T14:30:19.033
1On Mac OS X, you can pipe into
pbcopy
when you're in a GUI session (so not via SSH) and it puts it into the system-wide clipboard.pbpaste
to retrieve. – Daniel Beck – 2011-06-30T14:47:32.123added comment this is on linux bash terminal with no X – 719016 – 2011-06-30T14:48:41.573
It's actually "the kill ring in GNU Readline" if you want the correct name. – JdeBP – 2011-07-01T12:13:46.513