SED: match pattern & delete matched lines

Hi all,

I have the following data in a file x.csv:

> ,this is some text here
> ,,,,,,,,,,,,,,,,2006/11/16,0.23
> ,,,,,,,,,,,,,,,,2006/12/16,0.88
< ,,,,,,,,,,,,,,,,this shouldnt be deleted

I need to use SED to match anything with a > in the line and delete that line, can someone help me out?

sed '/>/d' x.csv

alternatively you can use the following command

grep -v ">" x.csv

Thanks for the responses - is it possible to have multiple sed commands in a statement so I can for example delete the lines with ">" and then delete instances of lines with "---" in them?

I tried but it doesnt like this:

sed -e  '/>/d' '/---/d' x

Thanks again,

sed -e  '/>/d;/---/d' x

Thanks for the quick responses,

I want to search for a particular string and then append to the first line, is this possible with something like the following:

 sed -e /test/s/$/ testString/; x.csv

This appends testString to the EOL (where test is matched) but I need to append testString to the line above the one matched, is this possible?

The easiest way to find out is to try and to experiment.

try this

sed "N;s/\(\n.*test\)/ teststr\1/;P;D" file