Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unix scripting: multiple sed commands in one

Status
Not open for further replies.

pho01

Programmer
Mar 17, 2003
218
US
I want to replace the comments with dates in an html file. There would be 3 dates that I would need to replace:

sed -e &quot;s=<!--Start Date-->=${DATE}=&quot; ${filename} > temp.html

sed -e &quot;s=<!--Accept Date-->=${DATE}=&quot; ${filename} > temp.html

sed -e &quot;s=<!--Estimate Date-->=${DATE}=&quot; ${filename} > temp.html

How do I combine these line in one? So using one, it would replace all above. This is what I do:

sed -e &quot;s=<!--Estimate Date-->=${DATE}=&quot; |sed -e &quot;s=<!--Estimate Date-->=${DATE}=&quot; |sed -e &quot;s=<!--Estimate Date-->=${DATE}=&quot; ${filename} > temp.html

but it didn't work.

Thanks much!
 
sed -e &quot;s=<!--Estimate Date-->=${DATE}=&quot; -e &quot;s=<!--Estimate Date-->=${DATE}=&quot; -e &quot;s=<!--Estimate Date-->=${DATE}=&quot; ${filename} > temp.html

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top