If you’ve got a large file on the command line, a large CSV file or whatever, you may want to paste that into a graphical application, like Firefox, via the clipboard.
If you install
xclip you can do this easily.
cat somelargefile.txt | xclip --selection clipboard
--selection clipboard saves it to the paste buffer you use in graphical applications. There are others available.
cat textfile | cut -d$'\t' -f1
This will separate fields in textfile by a tab character, and display only the first field. (Only works in bash, not plain sh, due to $‘\t’ I believe)
cat textfile | paste -s --delimiters=','
This will join all the lines in a text file (-s) using the delimiter ‘,’.