Yes, I know
The Paste Command

In a previous video, we talked about the cut command which can be used to extract columns from a CSV or tabular text data file.

 Get the support materialCheck your mailbox for the link!  View on YouTube 

Share 
The Paste Command

The paste command does the exact opposite: it merges several input files on a line-by-line basis to produce a new delimited text file from them.

I already mentioned in the introduction the cut command that can be used to split delimited or fixed-width text files in individual columns that can later be merged back using the paste command. Something that can be useful when you need, for example, to re-order the columns of a table.

But the paste command identifies the corresponding data based only on their physical position in the file (their "line number"). Sometimes though, we would like to merge data based on their content. If that’s your need, I suggest you take a look at the join utility instead.

How can I take the most of this video?

I encourage you to download the files used on the video so you will be able to try the same commands as me on your own system.

The link above will allow you to download a gzipped tar archive of the files used in the video. To extract the content of that archive on your system, you can use the command:

    tar xzf Yes_I_Know_IT-EP23.tar.gz
    cd EP23

Share to Help me reach my next YouTube milestone!

It’s a lot of work to maintain this channel, and the only thing I can take joy in from what I do is seeing more subscribers and the channel growing. That’s why I’m asking you to recommend and share the following links on your favorite social media and websites. Thanks!