I have one file named "test-file". It has just two following lines (one line with # sign in the front and second line with same content but without hash):
#contents of line
contents of line
I want to update/replace the contents of second line by using sed command. I know its simple syntax for example:
sed -i 's/.*contents of line.*/updated contents/' test-file
but the above command is replacing both of the lines whereas I don't want to update the first line with # sign in the front.