From owner-freebsd-questions Wed Sep 15 7: 6: 1 1999 Delivered-To: freebsd-questions@freebsd.org Received: from megaweapon.zigg.com (megaweapon.zigg.com [206.114.60.8]) by hub.freebsd.org (Postfix) with ESMTP id A9CE014FDC for ; Wed, 15 Sep 1999 07:05:56 -0700 (PDT) (envelope-from matt@zigg.com) Received: from localhost (matt@localhost) by megaweapon.zigg.com (8.9.3/8.9.3) with ESMTP id KAA12811 for ; Wed, 15 Sep 1999 10:05:52 -0400 (EDT) (envelope-from matt@zigg.com) Date: Wed, 15 Sep 1999 10:05:51 -0400 (EDT) From: Matt Behrens To: questions@freebsd.org Subject: m4-controlled multiple file output Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Does anyone know if there is (a) a way to have m4 (or gm4, if necessary) redirect output to files as controlled by macros, i.e. - this text goes to stdout filedivert(`otherfile.txt')dnl - this text goes in otherfile.txt filedivert()dnl - this text goes to stdout (b) a tool that can reprocess the output of m4 to do this simply, given certain output strings embedded in the output? I can use sh and cat with some creative "here documents" but I would think there'd be a less fork-intensive way... Thanks... Matt Behrens Owner/Administrator, zigg.com Chief Engineer, Nameless IRC Network To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message