On Thu, 19 Nov 2020 18:15:32 -0500
Richard Morse <[email protected]> wrote:
> This would simplify a lot of things, because this kind of thing could
> be easily be put into the roff file when I?m generating that.
Good, so if .OUT is your marker, here's a working script:
#! /usr/bin/awk -f
/^[.]OUT/ {
if( output ) {
system( "nroff -ms " input " > " output )
system( "rm " input )
}
input = "tmp/" $2
output = "output/" $2
next
}
{
print > input
}
END {
if( output ) {
system( "nroff -ms " input " > " output )
system( "rm " input )
}
}
> I?m going to have to generate 15 different roff files for each time I
> run this.
As you can see, the script cleans up after itself. :-)
--jkl