how to use multiple files in sed with w command

i have a command like :
sed -n 's/^[0-9][02468] /&/w even' <file
if i want to write to multiple files like
sed -n 's/^[0-9]
[02468] /&/w zero two three' < file
its not working it is taking "zero two three" as a single file i want to write to 3 seperate files . pls can anyone help me

Hi,

try:

sed -n -e '/file1/w f1' -e '/file1/w f2' file

HTH Chris

sed -n 's/^[0-9]*[02468] /&/p' file | tee zero two > three

Though that is the same as:

sed -n '/^[0-9]*[02468] /p' file | tee zero two > three

Or:

grep '^[0-9]*[02468] ' file | tee zero two > three