removing lines with single charector

Hi

Need help with SED.

I have a file which has lines in between that just contain a single charector like *. I need to remove such lines. but the problem am facing is that these lines does not start with that charector and instead starts with a Tab and then the charector

eg:

This is a sample file
[tab]*
This is a sample file

I need to delete the middle line.. I can't delete lines starting with tab as i have other needed lines in the file starting with tab.

any ideas?

what have you tried?

sed  "/^ .*\*/d" file

It helps to state your problem accurately. The line you want to delete does not contain a single character; it contains two characters, TAB and *.

Therefore, use a pattern that matches a line with just a TAB and an asterisk:

sed '/^\t\*$/d'

If that doesn't work in your version of sed, use a literal TAB in place of \t.

Yes.. that helped.. I had to use a literal tab..

Thanks guys

I think this easy one is ok.

 sed '/*/d'