Hi,
This is my first post.It has two parts
first part:
I want to match a line that starts with whitespace tab or similar followed by
must start with specific word and not match same word start with hyphen
like this:
grep height file1:
height: 150px;
line-height: 1.5em;
height: 100px;
height: 350px;
height: 100px;
line-height: 17px;
second part
I would like to redirect content to another file and the word that matches (in this case height ) I would like to set a fix value like (height: 40px; for every height value.
And after this is done I would like this output if possible
grep height file2:
height: 40px;
line-height: 1.5em;
height: 40px;
height: 40px;
height: 40px;
line-height: 17px;
I understand the basic about sed. My problem is to not include words with hyphen in the match!
Is it possible to do with sed, or do you have any better approach?
Help would be deeply appreciated