[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] Introduction to groff in french
From: |
Ralph Corderoy |
Subject: |
Re: [Groff] Introduction to groff in french |
Date: |
Thu, 23 Oct 2014 11:40:30 +0100 |
Hi Gregoire,
> This isn't the best way to verify package installation from the
> command line. I recommend inserting a bit of code into your article
> for checking whether groff is installed:
>
> dpkg -l | sed -n '/groff[^-]/p'
To avoid scaring the chevaux, how about
$ dpkg -l | grep 'groff[^-]'
ii groff 1.20.1-10 GNU troff text-formatting system
$
Or even better, simply
$ dpkg -l groff
Desired=Unknown/Install/Remove/Purge/Hold
|
Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
ii groff 1.20.1-10 GNU troff text-formatting system
$
> Generally, I wouldn't spend so much space on piping text at the
> command line through to groff (your poem, e.g.).
The printfs don't end with `\n' so are producing a non-Unix text file.
:-) Also, another way to do it might be
printf '%s\n' 'The boy stood on the burning deck,' \
'His feet glued down with treacle,' \
'...' |
But I agree with Peter, the less odd command line stuff up front, the
better. After saying how to use a text editor, one could stick to
$ cat foo.tr
...
$ groff -k foo.tr >foo.ps
$
to show examples of input, the commands used on them, and expected
outputs.
Cheers, Ralph.