I have a script that operates on enormous files and outputs an enormous amount of content (almost 7000 lines). I need to copy the output of this to my clipboard so I can then paste it into paste2.org and make a paste. Is there a way for me to directly copy the output to my clipboard? Some operation like that of redirection for the clipboard?
2 Answers
You can use the tools xsel or xclip to translate from X clipboard to stdin/stdout on a terminal. If these aren't installed, they're usually available through your distro's package manager. See the man page for the relevant tool to get details on invocation.
Use file redirection to save standard out to a temporary file such as
/tmp/o$ script.sh > /tmp/o
Open browser such as Firefox/Iceweasel, to address:
/tmp/oNow select all, copy and paste to Pastebin.org