I found this asked by someone 2 years ago and it worked great.   sed 's/$/      /' SUDIP1&gt;SUDIP2   But I have found if I add white space to every line, it messes up later sed commands. I'd like to search for EQU:  EQU       888-111-2222   T   1234   then move down one line and add the extra spaces at the end of these following types of lines and leaving alone all other lines in between.  888-111-2222   T   1234(6 white spaces here)   Several people in this site have marked my question as a duplicate, but it is not. The question they point out was searching for a string after the letter C appears, and then replacing it with a different string. My question is different because it involves adding white space to the end of the line and not changing the text on the line. Please don't be so quick to call a question a duplication. It affects people's reputation and points!
I have the following text:    A   Hello   world   B   Hello   world   C   Hello   world   I know that I can replace Hello by Hi using sed:  sed 's/Hello/Hi/g' -i test   but this replace each Hello with Hi:    A   Hi   world   B   Hi   world   C   Hi   world   what I really want is to replace only the Hello after B:    A   Hello   world   B   Hi   world   C   Hello   world   so I have tried this:  sed 's/"B\nHello"/"B\nHi"/g' -i test   but nothing happened, How can I do this?  Note: There are some white-spaces on the beginning of each line of the file.
How to copy a dictionary and only edit the copy Android design convention for saying a user needs to complete an action first? I've read the Android design conventions, but can't see a good solution.  I have a 3 tab mobile application. Tabs 2 and 3 need a selection made on screen 1 before they will work. The user enters at Screen 1, and the tab options are along the top. If they attempt to open screen 2 or 3, I would like to advise them to make a selection first. 'notifications' are the closest answer I can see from the Android design guidelines. Anybody have any other solutions?  Thanks  Andy What is the function of this circuit? Just wondering if someone can give me an explanation for this capacitor layout - what is it's function? The chip to the right is an ADC.  Circled in blue.    I'm guessing it is well known but i don't know how to search for it. Why: a relative adverb, a conjunction ... or both? I am not familiar with the idea that an adverb can function as a conjunction at the same time. Here are a couple of sentences that are confusing me.     This is the reason why she left him.   ...and     He was transferred to New York, where he was promoted to a higher level.   The  why, where, when, and how seem to introduce a clause. Therefore, can they also be called conjunctions? If yes, would I be right in assuming that relative adverbs can function as conjunctions at the same time? Description of varieties in $\mathbb{P}^2\times \mathbb{P}^1$ If $[x:y]$ are coordinates of $\mathbb{P}^1$ and $[X:Y:Z]$ are coordinates of $\mathbb{P}^2$, what do the following varieties look like?   $V(x^2X+y^2Y+xyZ)\subset \mathbb{P}^2\times \mathbb{P}^1$ $V(x^2X^2+y^2Y^2+xyZ^2)\subset \mathbb{P}^2\times \mathbb{P}^1$   As of now, I don't quite know how to visualize these varieties. A detailed geometric picture would be especially welcome. How to install Ubuntu on VirtualBox? I have already proved Triangle Inequality $\lVert v+w\rVert \le \lVert v \rVert+\lVert w \rVert$ in vector space $\mathbb{R}^n$. However, I'm having difficulties proving the Reverse Triangle Inequality in the vector space.  I have started with   $$\lVert v \rVert^2=v \cdot v-w\cdot w+w\cdot w \le \lVert v-w \rVert+\lVert w \rVert^2$$ $$\lVert w \rVert^2=w \cdot w-v\cdot v+v\cdot v \le \lVert w-v \rVert+\lVert v \rVert^2$$  based on the Triangle Inequality but I don't know if it is correct. If this is right, I think I can go on with proving it the same way I would the normal Reverse Triangle Inequality. Spatial query to return multiple values I have a woodland scheme advice layer that has a polygon for each area of advice (brown layer in the picture). I also have a polygon layer of UK local authorities (red boundary layer in the picture). I would like to perform a spatial query which returns the local authority name for each woodland advice scheme. This would work fine if each woodland advice scheme was found in just one local authority boundary. However many are found across a boundary of two different authorities. For instance, one scheme sits across the boundaries of the authorities of Fife and Angus. The scheme is the yellow selected polygon in the picture and the red line is the authority boundary. How do I get the spatial join to return a value of Fife; Angus (or something similar to identify two values) instead of just Fife or Angus. Earlier this year, I read a huge (1000+ pg) novel about a cloistered group of monks that sort of worshiped math. The story involved alternate dimensions or time travel or something. A big thing in the book was coordinates, containing data like for speed or something as an alternate axis. There were several rings of the monastery.   At some point the main character was called out of his monastery to never return. I'm hoping to figure out the name so I can discuss it with my book club. Should training data in each batch size be resample only one time or at each epoch when using mini-batch I saw some related question regarding to the fact is one should use sampling with resampling or without when using minibatch.  However my question is different.  Let's assume that I use sampling witouth replacement. Meaning that for each epoch one training example can only belong one 'batch size' group.  I want to know if one should only resample the training data (into the different batch size) only 1 time or before to start to update the parameters before each epoch.  For instance suppose I have 20 'batch size' group. Suppose at the first iteration I have sampled picture A in group 2 and picture B in group 4.  If so should picture A always stay in group 2 and picture B in group 4. Or should I resample it before to start a new epoch (e.g. at epoch 2 put picture B in group 6 and picture B in group 20). Is it possible to set the GPU fan speed using the default free ati driver?  My card (X1900) was deprecated in the fglrx drivers a while back.  The free drivers seem to work with 3D, Compiz and such, but running graphics intensive programs makes my GPU heat up and produce artifacts, while the GPU fan never seems to increase. (When set to 100% in Windows it makes a massively louder noise.) I'm trying to prove that the rationals are not the countable intersection of open sets, but I still can't understand why   $$\bigcap_{n \in \mathbf{N}} \left\{\left(q - \frac 1n, q + \frac 1n\right) : q \in \mathbf{Q}\right\}$$   isn't a counter-example. Any ideas? Thanks! postfix doesn't work after iptables set up Where can I find the status of the released versions of Ubuntu? I want to know where I can find updated information about all the stable and in-development versions of Ubuntu, where I can find this information?     This question is meant to be a canonical question. It expects to answer the following questions:         Is X version stable yet?   Is X version in beta?   Is X version still supported?   What versions are still supported?   What are the versions in Beta/Alpha?   Until where X version will be supported?   Have X version ceased support?   When will be X version released?   Where I can download any release?   When will the next LTS version of Ubuntu be released?         The list is not exhaustive. Do gravitational lenses work on gravitational waves? I seem to have run into a bit of a challenge on one of our Android/Samsung devices...   On the device, regardless of what's open, when the battery reaches 25% on discharge, the below screen pops up and covers the entire screen, with MUCH difficulty to get rid of. I've tried to trace it to a certain app, but was unsuccessful in doing so.     Can someone perhaps help with some advice on this, on how to get rid of it? Is it correct to hyphenate with compound premodifiers? If so, where is the hyphen placed? Killing thread after some specified time limit in Java Answering beyond the question's scope Is answering beyond the scope of the question a valid thing? Or should we just stick to the question asked and ignore any potential bugs which might be present (of course OP is unaware of that, as of now).  To make myself more clear, please have a look at this .  There are 3 answers which talk about the issue asked and that's it. If you look at my answer, I've added an additional point about a potential bug which the OP has missed now (may find out later). So is it a good thing to point out such potential bugs or not? Should this practice be encouraged? I have been playing with Ubuntu for a few weeks now, and I'd like to revert my computer back to it's original - factory - defaults.   On the computer I have a recovery partition (it's a netbook). I went through the process of recovery and everything seemed fine. However, when I restart the computer I'm presented with   grub rescue &gt;   Now, my understanding is that when I installed Ubuntu "side by side" it replaced the MBR or something like it, with GRUB.   I've read on a slew of forums, that I need to use a Windows Recovery Disk.   Here are my issues:   a) I don't have a recovery disk, I have a recovery partition - it's a netbook. b) I don't have an external cd drive.   What I do have is a USB key that has about 1gb of space on it.   Thanks in advance.