With Perl:
perl -lne '/^\d+ -/ && print(STDERR) || print' input 2> minus > plus
in a slightly different form:
perl -lpe 'select(/^\d+ -/?STDERR:STDOUT)' input 2> minus > plus
It is also possible to use tee :
tee >(sed -n '/^[0-9]* -/p' > minus) < input | \ sed -n '/^[0-9]* +/p' > plus
source share