I have a file that looks like this:
myFile
Hello World
Hello World
Hello World
Hello
Hello
Hello World
Hello World
What I want to do is a find and replace of any line in the file that has just the word "Hello" with the string "Hello World", keeping the spacing the same as what's already in the file (let's say 10 characters width from the H to the W).
What I have so far:
perl -pi -e 's/Hello/Hello World/' myFile
I know I didn't get far but I have been Googling this for quite some time and can't figure out what I need to do..
Any help is greatly appreciated!! Thanks!!
You have to specify that the string ends after the "Hello":