paste one file at a time instead of in parallel

paste --serial file1 file2 file3
paste one file at a time instead of in parallel
Sample Output
$ paste <(seq 1 11) <(seq 10 20) <(seq 20 30) <(seq 30 40)
1	10	20	30
2	11	21	31
3	12	22	32
4	13	23	33
5	14	24	34
6	15	25	35
7	16	26	36
8	17	27	37
9	18	28	38
10	19	29	39
11	20	30	40


$ paste --serial  <(seq 1 11) <(seq 10 20) <(seq 20 30) <(seq 30 40)
1	2	3	4	5	6	7	8	9	10	11
10	11	12	13	14	15	16	17	18	19	20
20	21	22	23	24	25	26	27	28	29	30
30	31	32	33	34	35	36	37	38	39	40

2
2010-10-27 08:17:41

What Others Think

You can use a simple cat to accomplish the same task: cat file1 file2 file3
chay · 416 weeks and 5 days ago
@chay, a simple cat will give you a file which contains the contents of the files in single line. I wouldn't post it if it was simple replacement for "cat". please compare results of: cat <(seq 1 11) <(seq 10 20) <(seq 20 30) <(seq 30 40) and paste <(seq 1 11) <(seq 10 20) <(seq 20 30) <(seq 30 40)
alperyilmaz · 416 weeks and 5 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: