I've got a problem with some regular expression in sed
.
I want to change a line in my file, so I did it like that:
sed -i '3s/.*/my new text in file/' file.txt
.
This extension is looking for 3rd line in a file and change it.
This solution isn't good but I don't know how to build a good regular extension. Let's say that I am looking for the word 'Host' in some file. How to build a good regular extension?
I have tried the following:
sed -e '<\H...s>\ /my new text in file/' file.txt
'.
What am I doing wrong?