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.

Universal configuration monitoring and system of record for IT.
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

Psst. Open beta.

Wow, didn't really expect you to read this far down. The latest iteration of the site is in open beta. It's a gentle open beta-- not in prime-time just yet. It's being hosted over at UpGuard (link) and you are more than welcome to give it a shot. Couple things:

  • » The open beta is running a copy of the database that will not carry over to the final version. Don't post anything you don't mind losing.
  • » If you wish to use your user account, you will probably need to reset your password.
Your feedback is appreciated via the form on the beta page. Thanks! -Jon & CLFU Team

read a file line by line and perform some operation on each line

Terminal - read a file line by line and perform some operation on each line
while read line; do echo "$(date),$(hostname),$line"; done < somefile.txt
2009-02-19 18:48:12
User: nottings
Functions: echo read
2
read a file line by line and perform some operation on each line

see sample output

Alternatives

There are 3 alternatives - vote for the best!

Terminal - Alternatives

Know a better way?

If you can do better, submit your command here.

What others think

Good sample on how to use "while read", I always had some trouble with that :(

Comment by CodSpirit 411 weeks ago

Amounts to make note of is the precise along utilized inside unquestionably this coating Due to the polish finish about the jacket it is cloth or sponge clear onlyRecently there are numerous varieties of Barbour jackets accessible for saleThis sort of barbour jacket comes with an recommended engine that simply possibly be clicked directly into therefore homeless with the use of brass porn stars invisible under and around the individual collarBarbour jackets also come with the commitment of a different great comprehensive circle associated with marketers and stockiest so just that whenever you will need almost any repairs as well as custom made variations, there is no need to seem drasticallyTaking having a look gorgeous and also intelligent include to your great advantage rious etettutu99 peopleBarbour jackets present sufficient using top reasons to engross the eye of fashion fanatics better its enticing solution segments Being true the required time to understand jackets as a way to touch expensive nevertheless Welcome to select the right excellent Women Barbour Waxed Jackets moreover, there are several folks who to understand jackets being deservingly listed or perhaps economical The majority of a pair of very hot favored Barbour jackets are suitable for reduction and will possibility their very own Here you are at select the best top quality Barbour Jacket Women of all ages lives to do his very own dutyI stored contemplating to help personally, "man, I actually agreed to apply correct mma fighter aircraft, not necessarily trim grass"An particular person also been thinking that these kind of jerkin are quite high-priced? If you are thinking of expense of any Barbour jacket on the look after value, next may well no matter whether will certainly seem a bit overpriced, specially to a person who may never have found in the night time value below wholesale Girls Barbour Light Overseas Quilted Jacket of an style Bachmann has not yet claimed she'll wholesale Men's Barbour Jeffries Quilted Jacket run yet, however it's a very good wager she could Barbour & Daughters Ltd, master throughout creation and promoting polish covered jackets It is in reality an important part of the woman's fashion wardrobeThe intro connected with gents cravats comprises mounted on client-centered which men and women when publish, additionally turn out to be Thanks for visiting pick the best top quality Barbour Jacket Ladies favouriteComplete with all which available understanding on the market and at the larger quantity using This is pick the right good quality Girls Barbour Quilted Jackets retailers which promote nearly all jackets you probably seek to learn how preferably to start choosing the best cope the simplest way may well be to discover someone http://www.hermesbeltsbirkinkellybag.co.uk/ who is aware in which these kind of discount codes in addition to discount rates are generally and for that reason just discover what exactly certainly they have realized These are built with equally traditional and moreover conventional types to meet up with the factors of each and every consumer Inside the 2011, numerous celebs expertise been seen putting on over at festivals including Pixie Lott as well as Lily AllenIn fact, to fulfill your appetite from the buyers, several of great capabilities and the unique responsibilitiesThe true Barbour Gals Belsay Really feel Jacket is a regular barbour jacket including things like a crucial quilted polyamide coated together with Sylkoil wax with regard to basement sealing After it can do this technique it can quite rapidly always be assimilated through kinds lower completing within, you will find currently have about three consequences There are lots of online Apple shops which economy apparel with excellent packages along with discounts It doesn't matter how they try they have issues signing-up start up business partners That not just provides protection from Tornado and dirt, moreover provides design and academic establishing in your appearance, and thus causing you to search modern-day along with elegant.

Comment by stephanieg915 4 days ago

www.canadagoosefemmehomme2016.fr/canada-goose-expedition-homme_207.html

www.canadagoosefemmehomme2016.fr/canada-goose-blanche_295.html

www.canadagoosefemmehomme2016.fr/resolute-canada-goose_116.html

www.canadagoosefemmehomme2016.fr/canada-goose-grenoble_340.html

www.canadagoosefemmehomme2016.fr/prix-d-une-doudoune-canada-goose_390.html

www.canadagoosefemmehomme2016.fr/canada-goose-noir-femme_346.html

www.canadagoosefemmehomme2016.fr/canada-goose-femme-victoria_285.html

www.canadagoosefemmehomme2016.fr/boutique-canada-goose-paris_302.html

www.canadagoosefemmehomme2016.fr/canada-goose-sans-fourrure_311.html

www.canadagoosefemmehomme2016.fr/canada-goose-laval_347.html

www.canadagoosefemmehomme2016.fr/prix-doudoune-canada-goose_428.html

www.canadagoosefemmehomme2016.fr/magasin-canada-goose-a-paris_387.html

www.canadagoosefemmehomme2016.fr/doudoune-canada-goose-homme-pas-cher_426.html

www.canadagoosefemmehomme2016.fr/canada-goose-achat_221.html

www.canadagoosefemmehomme2016.fr/canada-goose-lodge_76.html

www.canadagoosefemmehomme2016.fr/chilliwack-bomber-canada-goose_372.html

www.canadagoosefemmehomme2016.fr/blouson-canada-goose-homme_467.html

www.canadagoosefemmehomme2016.fr/canada-goose-sans-manche_325.html

www.canadagoosefemmehomme2016.fr/gilet-canada-goose_185.html

www.canadagoosefemmehomme2016.fr/canada-goose-montpellier_353.html

www.canadagoosefemmehomme2016.fr/mystique-canada-goose_343.html

www.canadagoosefemmehomme2016.fr/doudoune-canada-goose-femme-prix_362.html

www.canadagoosefemmehomme2016.fr/canada-goose-original_190.html

Comment by sguerra376 1 day ago

www.canadagoosefemmehomme2016.fr/branta-canada-goose_271.html

www.canadagoosefemmehomme2016.fr/parka-banff-canada-goose_417.html

www.canadagoosefemmehomme2016.fr/boutique-canada-goose-montreal_456.html

www.canadagoosefemmehomme2016.fr/canada-goose-ottawa_412.html

www.canadagoosefemmehomme2016.fr/canada-goose-banff_129.html

www.canadagoosefemmehomme2016.fr/citadel-parka-canada-goose_62.html

www.canadagoosefemmehomme2016.fr/doudoune-canada-goose-longue-femme_272.html

www.canadagoosefemmehomme2016.fr/parka-canada-goose-chateau_400.html

www.canadagoosefemmehomme2016.fr/doudoune-longue-canada-goose_447.html

www.canadagoosefemmehomme2016.fr/doudoune-canada-goose-occasion_150.html

www.canadagoosefemmehomme2016.fr/site-canada-goose_352.html

www.canadagoosefemmehomme2016.fr/canada-goose-borden-bomber_196.html

www.canadagoosefemmehomme2016.fr/avis-sur-canada-goose_334.html

www.canadagoosefemmehomme2016.fr/canada-goose-prix-usa_359.html

www.canadagoosefemmehomme2016.fr/manteau-femme-canada-goose_248.html

www.canadagoosefemmehomme2016.fr/parka-canada-goose-soldes_241.html

www.canadagoosefemmehomme2016.fr/fourrure-canada-goose_70.html

www.canadagoosefemmehomme2016.fr/bonnet-canada-goose_289.html

www.canadagoosefemmehomme2016.fr/canada-goose-dawson-parka_374.html

www.canadagoosefemmehomme2016.fr/canada-goose-occasion_413.html

www.canadagoosefemmehomme2016.fr/site-officiel-canada-goose_432.html

www.canadagoosefemmehomme2016.fr/canada-goose-pas-cher-enfant_337.html

www.canadagoosefemmehomme2016.fr/canada-goose-new-york-price_202.html

Comment by sguerra376 16 hours ago

http://www.canadagoosefemmehomme2016.fr/canada-goose-expedition_268.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-montreal_267.html

http://www.canadagoosefemmehomme2016.fr/blouson-aviateur-canada-goose_299.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-site_385.html

http://www.canadagoosefemmehomme2016.fr/montebello-canada-goose_148.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-veste_126.html

http://www.canadagoosefemmehomme2016.fr/doudoune-canada-goose-chilliwack-femme_473.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-distributeur_365.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-original_190.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-chilliwack-bomber_273.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-printemps-haussmann_323.html

http://www.canadagoosefemmehomme2016.fr/veste-style-canada-goose_223.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-noir-femme_346.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-victoria-pas-cher_211.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-chateau-homme_296.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-grise_80.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-le-bon-march��_461.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-doudoune_163.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-femme-occasion_262.html

http://www.canadagoosefemmehomme2016.fr/heli-arctic-canada-goose_441.html

http://www.canadagoosefemmehomme2016.fr/veste-de-ski-canada-goose_162.html

http://www.canadagoosefemmehomme2016.fr/nouvelle-collection-canada-goose_451.html

http://www.canadagoosefemmehomme2016.fr/doudoune-canada-goose-femme-occasion_164.html

http://www.canadagoosefemmehomme2016.fr/chaussure-canada-goose_230.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-��-paris_227.html

http://www.canadagoosefemmehomme2016.fr/magasin-canada-goose-france_216.html

Comment by sguerra376 14 hours ago

http://www.canadagoosefemmehomme2016.fr/canada-goose-rundle_453.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-toulouse_459.html

http://www.canadagoosefemmehomme2016.fr/acheter-doudoune-canada-goose_258.html

http://www.canadagoosefemmehomme2016.fr/ecusson-canada-goose_168.html

http://www.canadagoosefemmehomme2016.fr/doudoune-canada-goose-longue-femme_272.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-modele-victoria_409.html

http://www.canadagoosefemmehomme2016.fr/ou-acheter-canada-goose_100.html

http://www.canadagoosefemmehomme2016.fr/la-canadienne-canada-goose_294.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-200_411.html

http://www.canadagoosefemmehomme2016.fr/parka-citadel-canada-goose_253.html

http://www.canadagoosefemmehomme2016.fr/pas-cher-canadian-goose_219.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-chilliwack-pas-cher_310.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-en-suisse_89.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-prix-canada_277.html

http://www.canadagoosefemmehomme2016.fr/parka-canada-goose-femme_123.html

http://www.canadagoosefemmehomme2016.fr/parka-canada-goose-occasion_186.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-sherbrooke_245.html

http://www.canadagoosefemmehomme2016.fr/acheter-canada-goose-pas-cher_124.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-parka-chateau_427.html

http://www.canadagoosefemmehomme2016.fr/resolute-canada-goose_116.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-femme-solde_457.html

http://www.canadagoosefemmehomme2016.fr/montebello-parka-canada-goose_287.html

Comment by sguerra376 6 hours ago

http://www.canadagoosefemmehomme2016.fr/canada-goose-prix_56.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-pas-cher-france_142.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-citadel_470.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-veste_126.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-freestyle_324.html

http://www.canadagoosefemmehomme2016.fr/doudoune-femme-canada-goose_103.html

http://www.canadagoosefemmehomme2016.fr/doudoune-femme-canada-goose-pas-cher_407.html

http://www.canadagoosefemmehomme2016.fr/doudoune-canada-goose_330.html

http://www.canadagoosefemmehomme2016.fr/manteau-canada-goose-homme_279.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-graphite_389.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-femme-trillium_201.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-expedition-homme_207.html

http://www.canadagoosefemmehomme2016.fr/ontario-canada-goose_96.html

http://www.canadagoosefemmehomme2016.fr/doudoune-canada-goose-chilliwack-femme_473.html

http://www.canadagoosefemmehomme2016.fr/doudoune-canada-goose-france_265.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-fabrication_275.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-kingston_424.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-pour-enfant_217.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-parka-trillium-femme_429.html

http://www.canadagoosefemmehomme2016.fr/pas-cher-canadian-goose_219.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-violette_121.html

http://www.canadagoosefemmehomme2016.fr/parka-trillium-canada-goose_333.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-xxs_391.html

http://www.canadagoosefemmehomme2016.fr/parajumpers-ou-canada-goose_87.html

Comment by sguerra376 5 hours ago

Your point of view

You must be signed in to comment.