Hi Joerg, Boss Hog wrote on Sat, Oct 26, 2019 at 05:33:38PM -0400: > Andrea wrote: >> Joerg Klein wrote:
>>> .TH >>> sed -e -i '1d' alpha.csv >>> .so alpha.csv >>> .TE >> How does groff understand the line starting with sed has to be executed? > By using one of these requests. > .pso your_command > or > .sy command-line > > With both of these, groff should run in unsafe mode ( groff -U ... ) In addition to the good feedback provided by Ralph Corderoy: Avoid shelling out from application programs (like groff) whenever possible. It makes your document files unsafe to process; in particular, you can no longer give your source files to others because those others would have to fear that they might contain trojan horses. Instead, always preprocess your input files as needed *before* passing them to groff. That also agrees better with the general UNIX and roff philosophy of using pipelines - even though pipelines themselves work best for the simple case where only one single file needs to be processed by multiple filter programs in turn. But the basic idea can easily be generalized to the case of handling many files by storing all input, intermediate, and output files on disk and using a controlling shell script or the make(1) utility to do all the required processing in the right order, with running groff(1) as one of the latest steps. Yours, Ingo