I'm trying to replace the first occurrence in a file using sed:  sed -i s/he/He/ dummy.txt   Instead of replacing first occurrence, it replaces all the occurrences, even without /g.  According to the documentation it should replace the first only.   The sed version which is:  GNU sed version 4.1.5   Am I missing anything? Or does the behavior differ for different sed implementations?
Original file claudio antonio claudio michele  I  want to change only the first occurrence of &quot;claudio&quot; with &quot;claudia&quot; so that I would get the following: claudia antonio claudio michele  I have tried the following: sed -e '1,/claudio/s/claudio/claudia/' nomi  The above command performs global substitution (it replaces all occurrences of 'claudio') . Why?
How do I include a custom class file in a module? In Drupal 7 module development, I could include a custom inc, api, or php class file using the  directive in the module.info file or the drupal_load_included() function.   With D8 using PSR, what is the proper way to package up a "plain ole PHP object" and reference it in DefaultController.php? Think something like: $a = new POPO();.  Is just giving the PHP file containing the class a namespace sufficient? How does the controller (or module in general) know to reference or scan for that class? TeXnicCenter & Adobe Reader DC What is the optimum pattern to place crops in Minecraft? What factors affect soil hydration and crop growth time? What is the most efficient layout of dirt and water to grow crops? If $0$ is the zero-object $ \Longrightarrow F(0) $ is the zero object when $F$ additive How do I migrate my Keychain's "Local Items" to a new Mac? Does anyone know any example that invalidates the following affirmation:     If a morphism $f:A\to A$ induces the identity $\hat f:\operatorname{Spec} \left( A \right) \to \operatorname{Spec} \left( A \right)$ then $f = \operatorname{id} _A $. Assume that $X$ and $Y$ are independent random variables with $X \sim \exp(\lambda)$ and $Y \sim \exp(\mu)$. It is impossible to obtain direct observations of $X$ and $Y$. Instead, we observe the random variables $Z$ and $W$, where $Z = \min\{X,Y\}$ and $W =1$ if $Z=X$ and $W=0$ if $Z=Y$.  How to find the joint distribution of $Z$ and $W$? Geometry of Riemann Stieltjes integration What is the geometrical interpretation of Riemann Stieltjes Integration ?   We know that for Riemaan integration $\int_{a}^b f(x)dx$ represents the area bounded by the curve $y=f(x)$&amp; the straight lines $x=a$ &amp; $x=b$.  But when we integrate $f(x)$ with respect to another function $g(x)$ then which area represents that integration geometrically ? Difference between “with”, “at” and “for” with a business title and a company name Performance of a Trigger vs Stored Procedure in MySQL Smooth transition between two materials I need to make the transition smoother between the 2 different colored objects in my scene, somehow like one of the colors fades into the other one, while still keeping the line between them. Adding newmode with Xrandr - "800x480_60.00" I have 5-inch a 800x480 tft connected to the LVDS connector on a Portwell WADE-8020 mini-ITX embedded system board. I would like to build a XMBC/Kodi box for streming my music from my freenas PC with the tft showing what is been played, I got as fare as this...   sudo xrandr --newmode "800x480_60.00"  29.50  800 824 896 992  480 483 493 500 -hsync +vsync`enter code here   then,  sudo xrandr --addmode LVDS1 800x480_60.00   now that I get the correct resolution, I now have a black band on the top of the screen.  sudo xrandr --output LVDS1 --set "scaling mode"  "Full aspect"   However this did not solve the issue, also I know I need to amend the /bin/sh file with this from googling so I don't need to keep doing this at every boot. But I don't know how to as I'm very new to Linux.  #!/bin/sh xrandr --newmode "800x480_60.00"  29.50  800 824 896 992  480 483 493 500 -hsync +vsync xrandr --addmode LVDS1 800x480_60.00 Difference between Hashing a Password and Encrypting it The current top-voted to  states:     Another one that's not so much a security issue, although it is security-related, is complete and abject failure to grok the difference between hashing a password and encrypting it. Most commonly found in code where the programmer is trying to provide unsafe "Remind me of my password" functionality.   What exactly is this difference? I was always under the impression that hashing was a form of encryption. What is the unsafe functionality the poster is referring to? What are these tags related to on the Newest Questions page? On the right, there is a widget that lists "Related Tags" (left − SO April 2013, right − MSE May 2014):         What are they related to? There isn't even a question selected. Are they related to the whole displayed list?  This can be seen on every SE site. I understand why the Empire would want to start using more than one genetic template to create clone troopers, but why did it start using non-clone troopers instead of just continuing the cloning program?  It seems that with cloning they were able to use a training program (and genetic manipulation) that gave them completely loyalty (other than when the Kaminoan rebellion, where the Kaminoans had sabotaged the training programs).  Why stop using such troops and start using people that might question orders or aren't as easily controlled as clones were? Prove $\det(kA)=k^n\det A$ does not appear to actually define what a rigid shape is. Rather it defines 'same shape' and 'rigid transformations' without giving any definitions of what is necessary and sufficient for a shape to be considered rigid.  For instance, I've seen the following image:    I understand intuitively why the triangle is rigid and quadrilateral is non-rigid. It is also my understanding that inserting a single diagonal connection into the quadrilateral would make the shape rigid? However, given the following image (labeling the shapes $S_1$, $S_2$ and $S_3$ in sequence left to right):    If $S_1$ had a single diagonal connection AB, it would be possible to flip ADB over axis q to obtain a shape similar to $S_2$ with the addition of connection AB (my explanation may not be the greatest). This shape is clearly not the same as $S_1$, so how can we say $S_1$ with a single diagonal connection CD is rigid? I feel I am unclear on what the definition of rigidity actually is. Enlarged partition, filesystem still reports old size Cosmological constant doubts Is there a word to describe a highly desirable cursed treasure? Is there a single word to describe an object or idea that is so desirable that everyone wants to attain it but once they have it they are immediately cursed?  The idea is often used in literature—some examples:   In Lord of the Rings, the 'one ring' is a perfect example of this. In Guy de Maupassant's story , the necklace might be considered to be this. There are many stories of people making deals with the devil (see question: ), or being granted three wishes by a Djinn or fairy, which inevitably turn out bad. In the Twilight Zone episode , Bemis's desire to be left alone with his books would be an example of this word.   'Bane' covers the cursed part, but no one desires it.  Is there a single word to describe a most highly desired treasure that (knowingly or unknowingly) comes with a curse?