I am trying to replace the below tag with the new content along with the tag line. Is there a way we can change the tag along with its values using sed or any other options we have to do this?
Original html Tag (inside th>
tag):
th> file-109 /th>
th> file-209 /th>
Change this html tag to:
th>S.No Name /th>
th>S.No Name /th>
I tried the below but this doesn't work. Its throwing error.
sed "s/th>file-1.*/'th>`head -5 file-109 | tail -1`/th>'/g" Diff.html
sed "s/th>file-2.*/'th>`head -5 file-209 | tail -1`/th>'/g" Diff.html
th>
with no<
, or is that just something you did to make the text appear in your post? Always post exactly what you have, and use the code formatting tools to format code. With code formatting, you can post special characters such as<
and>
. See how I edited your post.