[cups.development] originating host
Martin Heggemann
mheggemann at ferrocontrol.de
Thu Mar 10 16:05:34 PST 2005
Hi Jerome, hello *,
thanks to Jerome I took a deeper look at the
job's control-file and experimented a few things
to get the "job-originating-host-name" into my
cups-Backend (a bash-script).
Finally I came to the following commandline:
cat /var/spool/cups/$CONTROLFILE | \
strings | \
grep -A 1 "job-originating-host-name" | \
grep -v "job-originating-host-name" | \
tr -c -d [1234567890.]
That results to (e.g.):
192.168.0.30
The commands used should be available on any Linux-
System and can be found in these (Debian-)Packages:
- coreutils
- binutils
- grep
I tried the command on Debian-Woody and Debian-Sarge
and it works on both systems.
Thanks again
Martin
More information about the cups-devel
mailing list