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

sed : using colons as separators instead of forward slashes

Terminal - sed : using colons as separators instead of forward slashes
sed "s:/old/direcory/:/new/directory/:" <file>
2009-08-06 00:37:45
Functions: sed
8
sed : using colons as separators instead of forward slashes

Having to escape forwardslashes when using sed can be a pain. However, it's possible to instead of using / as the separator to use : .

I found this by trying to substitute $PWD into my pattern, like so

sed "s/~.*/$PWD/" file.txt

Of course, $PWD will expand to a character string that begins with a / , which will make sed spit out an error such as "sed: -e expression #1, char 8: unknown option to `s'".

So simply changing it to

sed "s:~.*:$PWD:" file.txt

did the trick.

Alternatives

There is 1 alternative - vote for the best!

Terminal - Alternatives

Know a better way?

If you can do better, submit your command here.

What others think

From the command "info sed":

`\%REGEXP%'

(The `%' may be replaced by any other single character.)

This also matches the regular expression REGEXP, but allows one to

use a different delimiter than `/'. This is particularly useful

if the REGEXP itself contains a lot of slashes, since it avoids

the tedious escaping of every `/'. If REGEXP itself includes any

delimiter characters, each must be escaped by a backslash (`\').

So, you can use not only ":", but any character you like. At times I get myself using "!" and "%" as delimiters too.

Comment by Patola 389 weeks ago

Erika Kors BagsThe variety of scents the vacation cruise filling can definitely maintain will unquestionably count on the ship trip brand. Nearly all fishing boats trip boats find a way to prepare yourself the rather great use of products. Seek out a few substantial very superstars (Givenchy,, Lancome, etcetera) plus some a lot more existing companies (DKNY, Web page, Observara Wang).Micael Kors seemed to be birthed in 5 Aug '09 with New york Nyc. He has been termed Karl Andersen Junior, referred to as following the daddy Karl Andesen. His or her mum remarried when he ended up being 5 various and that he had been demonstrated a decision to further improve their brand. This individual preferred to become termed Micheal Jesse Kors. Micheal Kors became a home marking as a movie star assess about the individual beloved television school Process Runway.In 1994, Gianni Versace produced a little version number of necklaces wristwatches, deriving via assistance involving the distinguished creator Franck Muller, which produced along with produced the range in Geneva. Versace is part of elegance, course and attention to specific, and this is reflected inside their enjoy series.The hold bags are additionally readily available with slouchy types made out of delicate buckskin together with tie design and style handles. The actual bag within python platinum leather is actually each big and complex in fashion and could be the perfect on the move handbag for virtually every sort of women whom would rather store. The bags inside the Darrington variety use a trendier type using magic congratulated buckles and straps running over the entrance floor. Your magic features look in particular stunning while officially used on the dark-colored region. This stuff furthermore have part storage compartments that contain zippered closures.Michael Kors Handbags Retaining wall plug targets design tendency and also advanced templates that may undoubtedly useful into a modern-day clients. This wrist watch brand target complex and complex wristwatches that have standard characteristics with stunning aesthetic special gems. Sensational organic natural leather or even steel hand rings, mother-of-pearl dial suffers from, watches having give up designer watches and also good-looking metals are only a number of the attributes which might be showcased in loves.IF you are interested in just a little and also classy wristlet that has a developer touch, the Michael Prescott Wristlet best option. This specific enchanting wristlet incorporates a teasing leather-based wristlet tie, a zipper top with wash rag pull, ruched facts, hallmark brand imprinted take plus a ruched entrance jean pocket. This Eileen Prescott Wristlet is made of wash rag using precious metal develop computer hardware and it is readily accessible inside colors vanilla flavoring black or white. Have a look at online for additional obtainable colorings.As if this record connected with parts has not been fantastic sufficient industry cost http://www.hermesbeltsbirkinkellybag.co.uk/ about this bag is actually $198.50. This specific bag is capable of supporting up any kind of kind of drop clothes. The actual retail price within this bag additionally causes it to be easily readily available for almost any person. Possibly be forewarned, several of the Bags Hand bags can maybe establish a person back about $3,1000.Michael Kors timepieces experienced a completely across the globe guarantee and that is professional for just two decades from your particular date of monetary expenditure. You will need to merely maintain repeat with the receipt for getting circumstances should the check out failures via the ensure duration. Small business circumstances to produce cost-free restoration employment along with alternatives during the entire reassurance duration. Common throughout instances you've fetish for enjoy then a variety definitely will should have 1.

Comment by stephanieg915 4 days ago

Changing bag newborn is important for a mother or father who's got to look after for the child. You will discover a lot of information regarding altering bag newborn around the searching applications, simply conduct the world wide web search and definately will get a lean body information in concerns like why to acquire modifying bag little one? Which are the functions of fixing bag child? Utilizing it? How much it would require me to pay? How to buy it? Changing bag newborn for guys, women of all ages or for different purposes. Nicely many queries this way could get resolved with the usage of sites.Few best shifting bag babyWell the excitement of using altering bag infant provides in creased a whole lot nowadays because of the enhanced understanding between folks and in addition because that the valuation on these varieties of bags is noticed in addition to http://www.hermesbeltsbirkinkellybag.co.uk/ admitted by people throughout the world. In truth some individuals discover their own child's areas imperfect devoid of the addition of shifting bag newborn.Some in the recognized altering bag child is actually: you can have diaper bags in which you can easily store nappies or even pampers pertaining to changing the actual babys paper napkins right after each hrs. Baby wipes shifting bag infant is an additional kind of bag which is often used to save baby wipes within it, that is necessary for the child during the entire period. Containers shifting bag newborn, garments bag, medical bag, anti-bacterial hand solution comprising bag, snacks bag or perhaps toys and games bag, every one of these types of bags are usually varied however you like, design and hues. Thus you may simply select the bag of your choice.How to acquire shifting bag baby?You can find a modifying bag baby through many avenues according to ones price price range and you also time period accessibility. You can get the item with the stores that contains little one goods, or perhaps moreover you could have internet retailers that helps one to obtain altering bag infant by way of online avenues. You need to simply squeeze order to them and wait for an house distribution facility. By doing this is reputable, fast and simple.Changing bag child very best offered intended for giftWell if you would like supply a give a freshly blessed little one or parents wow re also pregnant in not too distant future, and then transforming bag baby will be nota negative notion to give to someone. In reality changing bag little one is a form of present which can be used effectively in addition to treasured by the parents

Comment by stephanieg915 4 days ago

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

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

www.canadagoosefemmehomme2016.fr/canada-goose-camp-hoody_50.html

www.canadagoosefemmehomme2016.fr/survetement-canada-goose_356.html

www.canadagoosefemmehomme2016.fr/canada-goose-vs-pjs_443.html

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

www.canadagoosefemmehomme2016.fr/canada-goose-mystique-femme_179.html

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

www.canadagoosefemmehomme2016.fr/boutique-canada-goose_378.html

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

www.canadagoosefemmehomme2016.fr/canada-goose-chilliwack-enfant_431.html

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

www.canadagoosefemmehomme2016.fr/hommes-canadian-goose_102.html

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

www.canadagoosefemmehomme2016.fr/point-de-vente-canada-goose_304.html

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

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

www.canadagoosefemmehomme2016.fr/canada-goose-au-canada-prix_54.html

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

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

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

www.canadagoosefemmehomme2016.fr/site-officiel-de-canada-goose_435.html

www.canadagoosefemmehomme2016.fr/goose-canada-pas-cher_140.html

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

www.canadagoosefemmehomme2016.fr/veste-canada-goose_228.html

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

www.canadagoosefemmehomme2016.fr/canada-goose-chilliwack-femme-occasion_464.html

Comment by sguerra376 2 days ago

http://www.canadagoosefemmehomme2016.fr/canada-goose-vs-pjs_443.html

http://www.canadagoosefemmehomme2016.fr/acheter-canada-goose_446.html

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

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

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

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

http://www.canadagoosefemmehomme2016.fr/veste-canada-goose-femme_274.html

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

http://www.canadagoosefemmehomme2016.fr/manteau-comme-canada-goose_226.html

http://www.canadagoosefemmehomme2016.fr/heatherton-canada-goose_484.html

http://www.canadagoosefemmehomme2016.fr/doudoune-style-canada-goose_283.html

http://www.canadagoosefemmehomme2016.fr/langford-canada-goose_290.html

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

http://www.canadagoosefemmehomme2016.fr/canada-goose-toronto-outlet_483.html

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

http://www.canadagoosefemmehomme2016.fr/selkirk-canada-goose_77.html

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

http://www.canadagoosefemmehomme2016.fr/magasin-canada-goose_93.html

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

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

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

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

Comment by sguerra376 2 days ago

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

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

www.canadagoosefemmehomme2016.fr/livigno-canada-goose_72.html

www.canadagoosefemmehomme2016.fr/trillium-parka-canada-goose_108.html

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

www.canadagoosefemmehomme2016.fr/canada-goose-homme-pas-cher_440.html

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

www.canadagoosefemmehomme2016.fr/canada-goose-the-chateau_364.html

www.canadagoosefemmehomme2016.fr/canada-goose-occasion-femme_282.html

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

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

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

www.canadagoosefemmehomme2016.fr/manteau-canada-goose-pas-cher_42.html

www.canadagoosefemmehomme2016.fr/constable-parka-canada-goose_97.html

www.canadagoosefemmehomme2016.fr/canada-goose-vs-pjs_443.html

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

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

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

www.canadagoosefemmehomme2016.fr/selkirk-canada-goose_77.html

www.canadagoosefemmehomme2016.fr/bomber-canada-goose_240.html

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

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

www.canadagoosefemmehomme2016.fr/magasin-canada-goose-new-york_396.html

Comment by sguerra376 2 days ago

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

www.canadagoosefemmehomme2016.fr/canada-triple-goose_260.html

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

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

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

www.canadagoosefemmehomme2016.fr/parka-montebello-canada-goose_379.html

www.canadagoosefemmehomme2016.fr/canada-goose-chilliwack-bomber-femme_458.html

www.canadagoosefemmehomme2016.fr/vente-canada-goose-montreal_160.html

www.canadagoosefemmehomme2016.fr/parka-femme-canada-goose_336.html

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

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

www.canadagoosefemmehomme2016.fr/canada-goose-chilliwack-femme-occasion_464.html

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

www.canadagoosefemmehomme2016.fr/site-officiel-de-canada-goose_435.html

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

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

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

www.canadagoosefemmehomme2016.fr/rideau-canada-goose_303.html

www.canadagoosefemmehomme2016.fr/canada-goose-yorkville-bomber_408.html

www.canadagoosefemmehomme2016.fr/canada-goose-grise-homme_468.html

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

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

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

Comment by sguerra376 1 day ago

http://www.canadagoosefemmehomme2016.fr/canada-goose-homme-prix_329.html

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

http://www.canadagoosefemmehomme2016.fr/veste-canada-goose-solde_198.html

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

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

http://www.canadagoosefemmehomme2016.fr/canada-goose-a-montreal_306.html

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

http://www.canadagoosefemmehomme2016.fr/canada-goose-homme-pas-cher_440.html

http://www.canadagoosefemmehomme2016.fr/lodge-hoody-canada-goose_133.html

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

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

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

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

http://www.canadagoosefemmehomme2016.fr/parka-homme-canada-goose_84.html

http://www.canadagoosefemmehomme2016.fr/shelburne-canada-goose_418.html

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

http://www.canadagoosefemmehomme2016.fr/canada-goose-snow-mantra-parka_479.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-boutique-paris_167.html

http://www.canadagoosefemmehomme2016.fr/vetement-goose-canada_345.html

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

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

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

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

http://www.canadagoosefemmehomme2016.fr/canada-goose-homme-noir_115.html

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

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

Comment by sguerra376 1 day ago

http://www.canadagoosefemmehomme2016.fr/vetement-canada-goose_368.html

http://www.canadagoosefemmehomme2016.fr/comment-reconnaitre-une-canada-goose_478.html

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

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

http://www.canadagoosefemmehomme2016.fr/boutique-canada-goose_378.html

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

http://www.canadagoosefemmehomme2016.fr/selkirk-canada-goose_77.html

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

http://www.canadagoosefemmehomme2016.fr/manteau-comme-canada-goose_226.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-camp-hoody_50.html

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

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

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

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

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

http://www.canadagoosefemmehomme2016.fr/livigno-canada-goose_72.html

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

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

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

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

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

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

http://www.canadagoosefemmehomme2016.fr/destockage-canada-goose_286.html

Comment by sguerra376 7 hours ago

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

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

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

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

http://www.canadagoosefemmehomme2016.fr/blouson-canada-goose-pas-cher_78.html

http://www.canadagoosefemmehomme2016.fr/manteau-canada-goose-homme-pas-cher_341.html

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

http://www.canadagoosefemmehomme2016.fr/yukon-bomber-canada-goose_147.html

http://www.canadagoosefemmehomme2016.fr/manitoba-canada-goose_482.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-a-vendre_404.html

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

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

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

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

http://www.canadagoosefemmehomme2016.fr/canada-goose-a-montreal_306.html

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

http://www.canadagoosefemmehomme2016.fr/canada-goose-site-fiable_136.html

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

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

http://www.canadagoosefemmehomme2016.fr/parka-goose-canada_46.html

http://www.canadagoosefemmehomme2016.fr/manteau-type-canada-goose_369.html

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

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

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

Comment by sguerra376 2 hours ago

Your point of view

You must be signed in to comment.