groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] groffview shell script


From: Ralph Corderoy
Subject: Re: [Groff] groffview shell script
Date: Wed, 28 Nov 2001 10:55:23 +0000

Hi Bernd,

> In a later version, there should be an automatic detection if X75 or
> X100 is better.

Here's a first stab.

    xset q |
    awk '
        BEGIN {
            FS = "/"
            f = "75dpi"
        }
        {
            for (i = 1; i <= NF; i++) {
                if ($i ~ /^(75|100)dpi$/) {
                    f = $i
                    exit
                }
            }
        }
        END {
            print f
        }
    '

It needs fixing to cope with xset returning an error, e.g. because the
DISPLAY can't be opened.

Cheers,


Ralph.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]