This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: Including output of a command?
- From: Yann Dirson <ydirson at fr dot alcove dot com>
- To: Rory Hunter <roryh at dcs dot ed dot ac dot uk>
- Cc: docbook-apps at lists dot oasis-open dot org
- Date: Tue, 15 Jan 2002 11:29:42 +0100
- Subject: Re: DOCBOOK-APPS: Including output of a command?
- References: <3C3DED35.3030709@dcs.ed.ac.uk>
On Thu, Jan 10, 2002 at 02:36:21PM -0500, Rory Hunter wrote:
> I don't suppose it's possible to include the output of a system command in
> a docment somehow, i.e. with some hackery like,
>
> <!ENTITY date CMD "date +%A %e %B">
>
> or an equivalent? Obviously competely unportable, but it'd be quite nifty.
In addition to the production of a "date.txt" file by make, you can
pass such information through a file descriptor. That avoids the
creation of a useless file.
Eg:
<!ENTITY date SYSTEM "<OSFD>3">
and pass the output of the date command through FD 3:
$ date | jade 3<&0 ....
It gets a bit more difficult when you need several FDs, but well...
--
Yann Dirson <Yann.Dirson@fr.alcove.com> http://www.alcove.com/
Free-Software Engineer Ingénieur Logiciel-Libre
Free-Software time manager Responsable du temps Informatique-Libre
Debian GNU/Linux developper <dirson@debian.org>