I am trying to replace the old 3par LUNs with new Vmax LUNs. Can someone help me  make a script to ease the task?  Is it possible to create 2 files, one file having the 3par LUNs, the other file having all the new VMAX LUNS? Then replace all the content of mulipath.conf.  Currently I am using:  sed -i "s/360002ac000000000000001f20001add7/60002ac000000000000001f20001accb/g" multipath.conf   Can someone help make the command work?  sed "s/`cat 3par.txt`/`cat vmax.txt`/g" multipath.conf
Preface: Every couple of days there comes a question of this type, which is easy to solve with sed, but takes time to explain. I'm writing this question and answer, so I can later refer to this generic solution and only explain the adaption for the specific case. Feel free to contribute.  I have files with variable definitions. Variables consist of uppercase letters or underscore _ and their values follow after the :=. The values can contain other variables. This is Gnom.def:  NAME:=Gnom FULL_NAME:=$FIRST_NAME $NAME FIRST_NAME:=Sman STREET:=Mainstreet 42 TOWN:=Nowhere BIRTHDAY:=May 1st, 1999   Then there is another file form.txt with a template form:  $NAME Full name: $FULL_NAME Address: $STREET in $TOWN Birthday: $BIRTHDAY Don't be confused by $NAMES   Now I want a script which replaces the variables (marked with $ and the identifier) in the form by the definitions in the other file, recursively, if necessary, so I get this text back:  Gnom Full name: Sman Gnom Address: Mainstreet 42 in Nowhere Birthday: May 1st, 1999 Don't be confused by $NAMES   The last line is to ensure that no substrings of variables get replaced accidentally.
Definite Integral $\int_{-\infty}^{\infty}\frac{x\sin x}{(x^2+a^2)(x^2+b^2)}\,\mathrm{d}x$ $$\int_{-\infty}^{\infty}\frac{x\sin x}{(x^2+a^2)(x^2+b^2)}\,\mathrm{d}x$$  This is easy to evaluate with complex analysis but is there an elementary way (substitution, partial fractions, integration by parts)? I just installed Ubuntu 14.04 Server and cannot get wifi configured correctly to work with WPA2 personal and could use some help.    There was a simple wizard during install where I selected my SSID from a list and entered my passphrase and that worked great.  Now that the install is done I am having trouble configuring wifi.  My Access Point is setup to WPA2 Personal TKIP or AES. Any advice would be greatly appreciated.  I have been messing around with WPA supplicant ant my /etc/network/interfaces file with no luck.  Thanks Is there a missing definite article before caliph in 'the group's leader, XYZ, as (the) caliph'? Arguably the most famous scene in Star Wars is when Darth Vader reveals to Luke Skywalker that      He is Luke's father.   This surprise was kept secret to most of the crew and even the cast , with Dave Prowse, the actor playing Darth Vader, delivering a fake line, the actual line being overdubbed. (Of course, Darth Vader wasn't voiced by him in the first place; all lines were overdubbed by James Earl Jones).   Like Mark Hamill relates in :     But, for example, your big scene, one of the classic cinematic moments when Darth Vader divulges his true identity, is no longer a revelation.       It's such a great moment! The fake line that was put in there just to try and keep the secret was "You don't know the truth: Obi-Wan killed your father!" But as much as I enjoyed leaking false information, it was a wonderfully hard secret to keep because (Irvin) Kershner, the director, brought me aside and said "Now I know this, and George knows this, and now you're going to know this, but if you tell anybody, and that means Carrie or Harrison, or anybody, we're going to know who it is because we know who knows."   So how do we explain ?       And [David Prowse] offered a glimpse of a possible plot for the second sequel. Darth Vader and Luke Skywalker, the young hero in the first film played by Mark Hamill, are hooked up in a do-or-die light saber duel when Luke learns that Darth is, in fact, his long-lost father.   So exactly how secret was this secret anyway?    As DVK points out , the newspaper article is probably authentic. Solving factorial equations I am given that $${n \choose a}={n \choose b}$$ I need to show that $n=a+b$ or $a=b$.  Now I am left with $a!(n-a)!=b!(n-b)!$.  I don't know what to do next. I checked there on google to solve the above, it says:- "On comparing, we get the required result." But it makes no sense to me. Is there any substantial disadvantage to booking two one-way tickets, versus a round trip ticket?  Booking vacation travel with family of four for winter, from Northeast US to Mexico.  Round trip is pricy and no preferred travel times.  Two one ways is slightly cheaper with much preferred timing.      Different airlines there and back, both reputable national US carriers. Is there anything that is totally random? When I say totally random, I mean absolutely random, not pseudorandom. If I want to say "totally random" numbers such as 1,26,17,4,1 and 27, although I see them to be totally random, they aren't. These are numbers that I think are influenced by my childhood, ideology and everything that I've seen. So, what do you think? Is there anything completely random? What is the difference between a field and a property? Alternate property name while deserializing Accessing class members on a NULL pointer This is what my  looks like when it first loads:    But if we unselect math.SE, we get a y-axis rescaling mess:    I'm using Firefox. I'm in China, so many things involving Google and Imgur are blocked, and I use  to stop the browser attempting to load unloadable Google objects.  I'm hoping other users can check whether or not this issue is localized to my system, and if it's not just me, here's the bug report. How does Loki survive his fall at the end of Thor? In one of the concluding scenes of the movie Thor, it's shown that Loki deliberately let go of the Scepter, and falls deep into the vast intergalactic sea sort of thing. How does he survive and return in The Avengers? As mentioned in the , Ubuntu 18.04 LTS will not have a 32 bit Desktop Image Installer. But in the  it has  32bit Desktop Images.  This is little off topic, but I'm confused. How do I flatten this vector logo leaving only the visible black paths? How do I get evolution items like King's Rock? Where can I get a Thunderbolt hub or splitter? Apple has just announced the new MacBook Airs, Mac mini, and Thunderbolt display. One of the features of the Thunderbolt display that caught my eye was its ability to daisy-chain two displays together from one Thunderbolt port (on a MacBook Pro).  I already have two 24" monitors and I don't feel like paying for two £900 displays. I worked out that all I need is a Thunderbolt hub/splitter so that I can plug the two cables that emerge into mini DisplayPort-to-DVI adapters.  Does anyone know of any Thunderbolt hubs or splitters? Or does anyone know of an alternative method? Is there a quick way to reset a .blend files windows and settings to default Whenever I download a .blend from someone all of the windows and settings are the way they have left them as it is saved in the file. It takes way to long to rearrange every window and toolbar to the way it is by default. Is there any tool or shortcut that can reset the UI to blenders default and just leave the actual contents of the file? The only way I could do this is by creating a new file and using link/append but this is not the best option. Oftentimes, I want to include code samples in a list, for example:   Item One Item Two, for example: private bool ItemTwo() {     return this.IFeelLucky; } Item Three   The problem is that there isn't a good and intuitive way to do this using . It's doable, but you have to do some formatting black-magic to get it that way, which is just not "nice" to deal with.  Source that produces this:  1. Item One 2. Item Two, for example: &lt;br/>&lt;br/>&lt;pre>&lt;code>private bool ItemTwo()     {         return this.IFeelLucky;     }&lt;/code>&lt;/pre> 3. Item Three    I would love to just be able to do it this way:  1. Item One 2. Item Two, for example:      private bool Test()     {         return this.IFeelLucky;     }  3. Item Three  Which results in, well, this:   Item One Item Two, for example:  private bool Test() {     return this.IFeelLucky; } Item Three "Pupil" or "Student", what is the correct use? How do I download Minecraft 1.6.4? I tried connecting to a server this morning but it said "outdated client". I understand that that means I have to get Minecraft 1.6.4 but I have no clue how to do it. I tried getting it on Minecraft.net but I couldn't find it. Please tell me how to download it and use it.