Originally Posted by pwc101
You're missing a final / and you need to escape (precede with a \) the special characters (spaces, brackets, asterisks etc.):
sed '178s/include\ =\ \[\ \*\ \]/include\ =\ \[\ emc\*\ \]/' /etc/evms.test > /etc/emvs.test2
Yep! Right on! Worked like a charm! Thanks. I did not know I had to use the "\" for the spaces and other characters.
Question... In my example I had a specific line to change, but how would I do the same job if I did not know the specific line, but knew it's the second occurrence in the file? Or maybe only knew it's actually between a range of lines (i.e.: 155-190 lines)?
Thanks for your input. It really saved me time here!