tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: HAtasoy () ifk ! com ! tr
To: tru64-unix-managers
Subject: SUMMARY : print quene
Date: Thu, 23 Nov 2000 09:25:44 +0000	[thread overview]
Message-ID: <97497146128471.tru64-unix-managers.marc@archive.invalid> (raw)



My original questin was=20

Hello gurus
How can i find the spooler directory  of a printer with a shell script =
or
command .
Thans a lot


thanks to Alan Angulo [alan@esu.edu] who gave me correct perl script =
that I
want=20

#!/usr/bin/perl
$printer=3D$ARGV[0];
open(PRINTER,"</etc/printcap");
while($line=3D<PRINTER>){
  if ($line =3D~ /^$printer[:\|]/) {
    while($line=3D<PRINTER>){
      chomp($line);
      if ($line =3D~ /:sd/) {
        print substr($line,(index($line,"sd:")+6),length($line)-7);
        print("\n");
        close PRINTER;
        exit
      }
    }
  }
  close printer
}



also thanks=20
	Dr. Tom Blinn, 603-884-0646 [tpb@doctor.zk3.dec.com]
	ROBIN Jean-Marie (EURIWARE S.A.) [jmrobin@euriware.fr]
	Tru64 User [tru64user@yahoo.com]
=09
=09





Hasan Atasoy
Sistem =DDleti=FEim M=FCd=FCrl=FC=F0=FC
E-mail : hatasoy@ifk.com.tr
Tel       : +90  212 454 1362
Gsm    : +90  532 284 3959

                 reply	other threads:[~2000-11-23  9:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox