I am trying to parse a file test.txt and append "https://" to the following string within the file:
"1234.def.efj.abcd-1.nopqrs.com"
Note: the string has white space and the quotes at the beginning and end. Also def, efj, and nopqrs.com are static and won't change.
I am trying to accomplish this via sed. So far I have:
sed -e 's#^\s*[\"][0-9]+[\.]def[\.]efj[\.][a-z]+[\-][a-z]+[\-][0-9][\.]nopqrs[\.]com$#\s+[\"]https[\:][\/][\/][0-9]+[\.]def[\.]efj[\.][a-z]+[\-][a-z]+[\-][0-9][\.]nopqrs[\.]com#g' test.txt
When I run that command I just get the file output without the change. I have gone through other sed posts and can't seem to figure out what is wrong with my expression. Thanks in advance for your help!