Capture terminal output to clipboard

Install xclip and/or xsel packages

Using xclip

cat filename.txt | xclip -sel clip

Using xsel

cat filename.txt | xsel -ib