sed - striping out html tags

I have pasted the contents of a log file (swmbackup.wrkstn.1262071383.sales2a) below:

 
Workstation: sales2a<BR
Vault sales2a-hogwarts will be initialized.<BR
<font color="red"There was a problem mounting /mnt/sales2a/desktop$ </FONT<BR
<font color="red"There was a problem mounting /mnt/sales2a/mydocuments$ </FONT<BR
<font color="red"There was a problem mounting /mnt/sales2a/office$ </FONT<BR
Vault sales2a-offlinehogwarts will be initialized.<BR
<font color="red"There was a problem mounting /mnt/sales2a/desktop$ </FONT<BR
<font color="red"There was a problem mounting /mnt/sales2a/mydocuments$ </FONT<BR
<font color="red"There was a problem mounting /mnt/sales2a/office$ </FONT<BR

Now I have a sed command below:

cat swmbackup.wrkstn.1262071383.sales2a | sed -e 's/<*>//g'

This only outputs:

 
Workstation: sales2a
Vault sales2a-hogwarts will be initialized.
 
 
 
Vault sales2a-offlinehogwarts will be initialized.

The problem lines do not output. How can I modify the sed command to give me the the other lines in the file without the tags and give me the output below?

 
Workstation: sales2a
Vault sales2a-hogwarts will be initialized.
There was a problem mounting /mnt/sales2a/desktop$ 
There was a problem mounting /mnt/sales2a/mydocuments$
There was a problem mounting /mnt/sales2a/office$
Vault sales2a-offlinehogwarts will be initialized.
There was a problem mounting /mnt/sales2a/desktop$
There was a problem mounting /mnt/sales2a/mydocuments$
There was a problem mounting /mnt/sales2a/office$

Thanks :smiley:

Try this:

sed 's/<.*"//;s/<.*//' file

This is close enough. I can live with the greater than signs at the begining of each line.

Thanks again!

sed -e 's/<[^>]*>//g' file

Aia,

I don't see any changes with your command:

$ cat file
Workstation: sales2a<BR
Vault sales2a-hogwarts will be initialized.<BR
<font color="red"There was a problem mounting /mnt/sales2a/desktop$ </FONT<BR
<font color="red"There was a problem mounting /mnt/sales2a/mydocuments$ </FONT<BR
<font color="red"There was a problem mounting /mnt/sales2a/office$ </FONT<BR
Vault sales2a-offlinehogwarts will be initialized.<BR
<font color="red"There was a problem mounting /mnt/sales2a/desktop$ </FONT<BR
<font color="red"There was a problem mounting /mnt/sales2a/mydocuments$ </FONT<BR
<font color="red"There was a problem mounting /mnt/sales2a/office$ </FONT<BR
$
$ sed -e 's/<[^>]*>//g' file
Workstation: sales2a<BR
Vault sales2a-hogwarts will be initialized.<BR
<font color="red"There was a problem mounting /mnt/sales2a/desktop$ </FONT<BR
<font color="red"There was a problem mounting /mnt/sales2a/mydocuments$ </FONT<BR
<font color="red"There was a problem mounting /mnt/sales2a/office$ </FONT<BR
Vault sales2a-offlinehogwarts will be initialized.<BR
<font color="red"There was a problem mounting /mnt/sales2a/desktop$ </FONT<BR
<font color="red"There was a problem mounting /mnt/sales2a/mydocuments$ </FONT<BR
<font color="red"There was a problem mounting /mnt/sales2a/office$ </FONT<BR
$