Sed-replacing a pattern

Posted by grails_enthu on Stack Overflow See other posts from Stack Overflow or by grails_enthu
Published on 2012-03-24T17:20:31Z Indexed on 2012/03/24 17:29 UTC
Read the original article Hit count: 164

Filed under:
|
|

I have below code:

<td nowrap="nowrap" width="74">
<p align="center">server1</p>
</td>
<td nowrap="nowrap" width="74">
<p align="center">server2</p>
</td>

and so on.I want to get output as:

<td nowrap="nowrap" width="74">server1</td>
<td nowrap="nowrap" width="74">server2</td>

What should be my approach?Say for example the file is server.html I have done something like this:

sed "s/<p align="center">*</p>/*/" -i server.html

But its not working.

© Stack Overflow or respective owner

Related posts about bash

Related posts about shell