Putting multiple sed commands on a single line

Hi,
I want to make sed write a part of fileA (first 7 lines) to file1 and the rest of fileA to file2 in a single call and single line in sed. If I do the following:

sed '1,7w file1; 8,$w file2' fileA

I get only one file named file1 plus all the characters following file1. If I try to use curly braces in any form, either on the same line or multiline (with labels), I get either an error message about opening "{" not matched or two files with the desired result but with the syntax as their filename. Even if I use sed with -e option and preceed each write command with -e, I get the opening-curly-brace-not-matched complain, like here:

sed -e '1,7{w file1}' -e '8,${w file2}' fileA

How to concatenate multiple write sed commands with only one call to sed and on one line?

varelg, you were on the right track. All you need is:

sed -e '1,7w file1' -e '8,$w file2' fileA