Hide

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again.

Delete that bloated snippets file you've been using and share your personal repository with the world. 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.


Get involved!

You can sign-in using OpenID credentials, or register a traditional username and password.

First-time OpenID users will be automatically assigned a username which can be changed after signing in.

UpGuard checks and validates configurations for every major OS, network device, and cloud provider.
Hide

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:

Hide

News

May 19, 2015 - A Look At The New Commandlinefu
I've put together a short writeup on what kind of newness you can expect from the next iteration of clfu. Check it out here.
March 2, 2015 - New Management
I'm Jon, I'll be maintaining and improving clfu. Thanks to David for building such a great resource!
Hide

Top Tags

Hide

Functions

Use tee + process substitution to split STDOUT to multiple commands

Terminal - Use tee + process substitution to split STDOUT to multiple commands
some_command | tee >(command1) >(command2) >(command3) ... | command4
2009-02-17 01:55:07
User: SiegeX
Functions: tee
23
Use tee + process substitution to split STDOUT to multiple commands

Using process substitution, we can 'trick' tee into sending a command's STDOUT to an arbitrary number of commands. The last command (command4) in this example will get its input from the pipe.

Alternatives

There are 4 alternatives - vote for the best!

Terminal - Alternatives

Know a better way?

If you can do better, submit your command here.

What others think

Thanks for this one.

Comment by CodSpirit 448 weeks and 6 days ago

Yet another confirmation that tee is awesome. This one in my favourites.

Comment by rbossy 416 weeks and 3 days ago

That one doesn't work for me, it is not portable:

/bin/mksh: syntax error: '(' unexpected

Comment by Natureshadow 279 weeks ago

If you http://www.huaracherunpas-cher.fr/nike-air-huarache-run-pas-cher_98.html will get personal http://www.huaracherunpas-cher.fr/huarache-noir-femme_60.html shoes now this kind http://www.huaracherunpas-cher.fr/huarache-og_183.html of Christian louboutin shoes, you http://www.huaracherunpas-cher.fr/huarache-noir-et-blanc_96.html should spend from http://www.huaracherunpas-cher.fr/huarache-air-max_163.html a several plenty to http://www.huaracherunpas-cher.fr/nike-huarache-paris_69.html a couple 1000s for any two http://www.huaracherunpas-cher.fr/nike-air-flight-huarache_102.html of the idea. http://www.huaracherunpas-cher.fr/huarache-femmes_170.html In fact the buying price http://www.huaracherunpas-cher.fr/nike-air-huarache-light-pas-cher_44.html of http://www.huaracherunpas-cher.fr/nike-huarache-premium_126.html such boots and shoes isn't the http://www.huaracherunpas-cher.fr/nike-huarache-femme-pas-cher_140.html type of price anyone can http://www.huaracherunpas-cher.fr/basket-nike-huarache_45.html find the money to http://www.huaracherunpas-cher.fr/huarache-4_118.html devote for for http://www.huaracherunpas-cher.fr/nike-huarache-light-og_115.html any trendy piece. http://www.huaracherunpas-cher.fr/nike-huarache-free-run-2012_146.html If someone is actually cheaply http://www.huaracherunpas-cher.fr/air-huarache-light_139.html but she likes to http://www.huaracherunpas-cher.fr/huarache-light-og_105.html the desire make use http://www.huaracherunpas-cher.fr/nike-air-huarache-rouge_47.html of some thing http://www.huaracherunpas-cher.fr/huarache-nike-noir_149.html popular next obtaining Red Bottom http://www.huaracherunpas-cher.fr/air-huarache-og_71.html Sneaker by simply Christian louboutin http://www.huaracherunpas-cher.fr/air-nike-huarache_107.html uk is a http://www.huaracherunpas-cher.fr/huarache-beige_106.html good technique of doing this.Today, http://www.huaracherunpas-cher.fr/huarache-chaussure_122.html putting on unique shoes http://www.huaracherunpas-cher.fr/air-flight-huarache_68.html or boots has http://www.huaracherunpas-cher.fr/chaussure-nike-air-huarache_76.html stopped being an issue http://www.huaracherunpas-cher.fr/nike-air-huarache-original_144.html with Christian louboutin shoes http://www.huaracherunpas-cher.fr/huarache-light_50.html or boots. Christian louboutin is http://www.huaracherunpas-cher.fr/nike-huarache-gris_59.html a top developer company http://www.huaracherunpas-cher.fr/huarache-noir-et-rose_109.html which gives good, http://www.huaracherunpas-cher.fr/huarache-leopard_77.html fantastic reductions in price http://www.huaracherunpas-cher.fr/achat-nike-huarache_137.html for every woman hunting for http://www.huaracherunpas-cher.fr/nike-air-huarache-prix_120.html a sophisticated and trendy http://www.huaracherunpas-cher.fr/boutique-nike-huarache_151.html kind of shoes http://www.huaracherunpas-cher.fr/nike-huarache-usa_114.html or boots. When you are http://www.huaracherunpas-cher.fr/huarache-bleu_111.html getting out and about http://www.huaracherunpas-cher.fr/nike-air-huarache-pas-chere_161.html in addition to http://www.huaracherunpas-cher.fr/huarrache-blanche_135.html look for a type http://www.huaracherunpas-cher.fr/huarache-bordeaux_53.html of shoe you http://www.huaracherunpas-cher.fr/nike-huarache-light-ultramarine_171.html eagerly want, you'll definitely http://www.huaracherunpas-cher.fr/air-huarache-blanc_123.html buy those who are http://www.huaracherunpas-cher.fr/nike-huarache-noir-et-bleu_130.html low priced. Should http://www.huaracherunpas-cher.fr/nike-huarache-prix_66.html you located a couple discounted with http://www.huaracherunpas-cher.fr/nike-air-huarache-blanche_153.html 50%, this will give http://www.huaracherunpas-cher.fr/nike-huarache-run-pas-cher_61.html the particular rationale to delight. http://www.huaracherunpas-cher.fr/nike-air-max-huarache-hybrid_121.html Nevertheless let's say you http://www.huaracherunpas-cher.fr/huarache-run_132.html obtain ones shoes and http://www.huaracherunpas-cher.fr/nike-air-huarache-turquoise_160.html boots cheaper during 90% http://www.huaracherunpas-cher.fr/nike-huarache-noir-et-rose_58.html ? This really is going http://www.huaracherunpas-cher.fr/air-huarache-homme_67.html to delight anyone without http://www.huaracherunpas-cher.fr/nike-air-huarache-og_162.html a doubt and you http://www.huaracherunpas-cher.fr/nike-huarache-free-light_134.html simply could http://www.huaracherunpas-cher.fr/basket-huarache_63.html only desire to obtain http://www.huaracherunpas-cher.fr/nike-huarache-agassi_133.html a growing number of http://www.huaracherunpas-cher.fr/huarache-vintage_42.html pairs by yourself.The Low-priced Crimson Bottom http://www.huaracherunpas-cher.fr/chaussures-air-huarache_128.html part http://www.huaracherunpas-cher.fr/nike-air-huarache-run-chaussures_174.html ShoeThe Reddish Underside Shoe line is http://www.huaracherunpas-cher.fr/huarache-usa_100.html sold with minimal http://www.huaracherunpas-cher.fr/nike-huarache-toute-noir_154.html value offers. A lot of web-sites http://www.huaracherunpas-cher.fr/nike-air-huarache-1991_65.html and retailers offer deals http://www.huaracherunpas-cher.fr/air-huarache-solde_40.html but the truth is http://www.huaracherunpas-cher.fr/nike-air-flight-huarache-og_48.html can hardly believe that http://www.huaracherunpas-cher.fr/huarache-2017_99.html this particular type http://www.huaracherunpas-cher.fr/nike-air-huarache-beige_112.html of shoes and http://www.huaracherunpas-cher.fr/nike-huarache-id_164.html boots offer discounts of up http://www.huaracherunpas-cher.fr/nike-huarache-femmes_182.html to 90%. It's similar http://www.huaracherunpas-cher.fr/nike-huarache-jd_46.html to buying a footwear for http://www.huaracherunpas-cher.fr/nikeair-huarache_88.html women intended http://www.huaracherunpas-cher.fr/nike-huarache-magenta_51.html for $100 costs three hundred dollars http://www.huaracherunpas-cher.fr/nike-air-huarache-run_43.html $1000. Just isn't http://www.huaracherunpas-cher.fr/nike-huarache-safari_52.html mtss is http://www.huaracherunpas-cher.fr/nike-air-huarache-blanc_41.html a great deal on your behalf?Shopping http://www.huaracherunpas-cher.fr/nike-air-huarache-90_110.html on the http://www.huaracherunpas-cher.fr/nouvelle-nike-huarache_82.html internet offers the http://www.huaracherunpas-cher.fr/nike-huarache-1991_55.html ability to get Excellent http://www.huaracherunpas-cher.fr/air-huarache-paris_138.html Christian louboutin shoes Duplicate Shoes and http://www.huaracherunpas-cher.fr/air-huarache-femme_90.html boots on http://www.huaracherunpas-cher.fr/nike-huarache-boutique_147.html Sale. There's no alternative route http://www.huaracherunpas-cher.fr/air-huarache-noir_116.html you can get http://www.huaracherunpas-cher.fr/nike-huarache-ultramarine_125.html this sort of wonderful rates apart from http://www.huaracherunpas-cher.fr/huarache-og-2017_143.html on the internet http://www.huaracherunpas-cher.fr/nike-huarache-taille_49.html and you can get http://www.huaracherunpas-cher.fr/nike-huarache-2_166.html that will http://www.huaracherunpas-cher.fr/nike-huarache-fille_148.html in louboutinshop2012.world wide web. http://www.huaracherunpas-cher.fr/huarache-nike-blanche_127.html This site offers you the most effective http://www.huaracherunpas-cher.fr/nike-huarache-homme_141.html selections as well http://www.huaracherunpas-cher.fr/nike-air-force-1-huarache_113.html as the finest expense http://www.huaracherunpas-cher.fr/chaussure-air-huarache_180.html gives too. Louboutinshop2012.org could http://www.huaracherunpas-cher.fr/nike-air-force-huarache_124.html be the dwelling involving Low-priced http://www.huaracherunpas-cher.fr/nike-id-huarache_158.html Louboutin sneakers. It's http://www.huaracherunpas-cher.fr/nike-air-huarache-og-retro_101.html actually a wonderful http://www.huaracherunpas-cher.fr/acheter-huarache_84.html privilege for any women http://www.huaracherunpas-cher.fr/nike-air-huarache-bleu_167.html searching for a excellent shoes or http://www.huaracherunpas-cher.fr/huarache-montante_179.html boots bearing one http://www.huaracherunpas-cher.fr/air-huarache-run_157.html of the most http://www.huaracherunpas-cher.fr/nike-air-zoom-huarache_89.html famous brands of shoes all http://www.huaracherunpas-cher.fr/huarache-nike-pas-cher_79.html over the world right http://www.huaracherunpas-cher.fr/huarache-nike-chaussures_131.html now. The reality http://www.huaracherunpas-cher.fr/chaussure-huarache-nike_173.html is that possibly http://www.huaracherunpas-cher.fr/nike-huarache-violet_54.html common persons and Hollywood stars http://www.huaracherunpas-cher.fr/nike-huarache-beige_91.html wear these kinds of shoes. Thus, http://www.huaracherunpas-cher.fr/nike-huarache-rouge_81.html as a result http://www.huaracherunpas-cher.fr/nike-huarache-chaussures_129.html the thing is by yourself http://www.huaracherunpas-cher.fr/nike-huarache-leopard_57.html putting on stylish http://www.huaracherunpas-cher.fr/nike-air-huarache-retro_70.html footwear which will genuinely allow http://www.huaracherunpas-cher.fr/nike-huarache-2013_159.html you http://www.huaracherunpas-cher.fr/nike-air-huarache-safari_73.html to appear cool and trendy each day http://www.huaracherunpas-cher.fr/huarache-instagram_169.html or maybe http://www.huaracherunpas-cher.fr/free-huarache_103.html after you ought to http://www.huaracherunpas-cher.fr/air-huarache-nike_87.html sign up for http://www.huaracherunpas-cher.fr/nike-air-huarache-light-ultramarine-og_75.html an exceptional meeting or http://www.huaracherunpas-cher.fr/nike-huarache-run_72.html perhaps event.Shopping ones Louboutin http://www.huaracherunpas-cher.fr/nike-air-huarache-light_168.html shoes or boots on line http://www.huaracherunpas-cher.fr/chaussures-huarache_56.html in particular from http://www.huaracherunpas-cher.fr/nike-huarache-solde_94.html louboutinshop2012.world wide web offers you http://www.huaracherunpas-cher.fr/nike-air-huarache-solde_181.html the ability to select http://www.huaracherunpas-cher.fr/huarache-noir_86.html from it has the greatest http://www.huaracherunpas-cher.fr/nike-huarache-3_108.html range of choices. http://www.huaracherunpas-cher.fr/nike-huarache-pour-femme_155.html Instead of that; purchasing on http://www.huaracherunpas-cher.fr/huarache-enfant_62.html this website can even provide http://www.huaracherunpas-cher.fr/nike-huarache_93.html you http://www.huaracherunpas-cher.fr/huarache-5_74.html with the ideal price reduction http://www.huaracherunpas-cher.fr/air-huarache-grise_142.html selling prices which can http://www.huaracherunpas-cher.fr/nike-air-huarache-chaussures_80.html do not available on http://www.huaracherunpas-cher.fr/air-huarache-noire_117.html different internet sites http://www.huaracherunpas-cher.fr/chaussures-huarache-nike_152.html nowadays. This really is the website which http://www.huaracherunpas-cher.fr/nike-air-huarache-light-ultramarine_64.html offers http://www.huaracherunpas-cher.fr/nike-air-huarache-international_104.html it is clients together with the http://www.huaracherunpas-cher.fr/nike-air-huarache-mid_78.html best shipment associated with http://www.huaracherunpas-cher.fr/nike-air-huarache-homme_150.html order placed done online. http://www.huaracherunpas-cher.fr/huarache-chaussures_95.html Sop where http://www.huaracherunpas-cher.fr/huarache-free-run_145.html ever that you are, take time to http://www.huaracherunpas-cher.fr/nike-huarache-marron_165.html place your http://www.huaracherunpas-cher.fr/nike-huarache-blanc_85.html order on this site you could http://www.huaracherunpas-cher.fr/air-max-huarache_39.html your current Low-cost Red-colored http://www.huaracherunpas-cher.fr/nike-air-huarache-2_92.html Bottom part Running shoe http://www.huaracherunpas-cher.fr/huarache-acheter_83.html the fastest period probable. http://www.huaracherunpas-cher.fr/nike-huarache-free-run-pas-cher_156.html A lot of http://www.huaracherunpas-cher.fr/nike-air-huarache-taille_172.html boot selling http://www.huaracherunpas-cher.fr/nike-air-huarache-noir_97.html is available online however, if Red http://www.huaracherunpas-cher.fr/ Bottom part Shoes sale is exactly what you are searching for, louboutinshop2012.net is the foremost destination for a proceed.

Comment by scott154 6 weeks and 4 days ago

Your point of view

You must be signed in to comment.