SUMMARY : print quene

From: <HAtasoy_at_ifk.com.tr>
Date: Thu, 23 Nov 2000 11:25:44 +0200

My original questin was

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_at_esu.edu] who gave me correct perl script that I
want

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



also thanks
        Dr. Tom Blinn, 603-884-0646 [tpb_at_doctor.zk3.dec.com]
        ROBIN Jean-Marie (EURIWARE S.A.) [jmrobin_at_euriware.fr]
        Tru64 User [tru64user_at_yahoo.com]
        
        





Hasan Atasoy
Sistem İletişim Müdürlüğü
E-mail : hatasoy_at_ifk.com.tr
Tel : +90 212 454 1362
Gsm : +90 532 284 3959
Received on Thu Nov 23 2000 - 09:26:48 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:41 NZDT