GNU/Linux Command – PASTE

paste – Merge lines of files.

Summary :

Paste write the lines from files in parallel and sequential manner in the screen. By default, Lines will separated by a TAB character.

Examples :
$ paste f1 f2 f3 -- Contents of the f1,f2 & f3 will be pasted in parallel and lines are separated by TABs. $ paste -d'#' f1 f2 f3 -- Same as above. But # is the separator. $ paste -d'@#' f1 f2 f3 -- Same as above. But the separator for f1 and f2 is @ and for f2 & f3 is #. $ paste -s f1 f2 -- Paste one file at a time instead of in parallel (as in above commands) $ paste num word > myfile -- Paste the content of num and word and write the output into myfile.
Read : man paste

Advertisements
Tagged with: ,
Posted in Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: