Open screen: screen (or screen myprog my args here)
Run your program, producing output you want copied
Enter copy mode: ^A [
Move your cursor to the start point
Hit enter
Move your cursor to the end point
Hit enter
Paste: ^A ]
Screen is much more powerful than that (I use it to tab several virtual terminals without the need for a special terminal emulator, and also so that I don't loose my sessions when X crashes or something). To get out of screen, simply end your shell session, or type ^A ^.
In gnome terminal, you can edit the keyboard shortcuts with Edit -> Reset Shortcuts... You can then map the command "Reset and Clear", which seems to do what you're looking for.
Alternatively, you can limit the scrollback history to a small number (say 0) and Ctrl+L will be closer to what you are looking for.
Best Answer
Perhaps this works (source)
You can use GNU screen's copy and paste commands.
Quick tutorial:
Screen is much more powerful than that (I use it to tab several virtual terminals without the need for a special terminal emulator, and also so that I don't loose my sessions when X crashes or something). To get out of screen, simply end your shell session, or type ^A ^.