> > + emit = 0
> > +}
> > +emit { print > outfile[test] }
>
> Solaris awk barfs when writing to more than 10 files:
Hmm. Either your other approach with caching line numbers (would need
similar fixes for Solaris awk as listed in my previous message), or one
could enclose the test groups in
cat >"$at_test_source"-AT_ordinal <<_AT_T_EOF
...
_AT_T_EOF
and source the goo by the shell again. I don't know of another portable
tool that can write to arbitrarily many files. But talk about going
round in circles, with: shell script -> awk -> shell script -> script
snippet to be sourced. (With old shells, there will be additional
copies of temp files that hold the here documents.) :-/
_AT_EOF is already taken by stuff like AT_DATA, maybe the ^_AT namespace
should be listed in the manual as well?
Cheers,
Ralf