SUMMARY: Print to 2 queues at once

Shaun.Racine_at_intier.com
Date: 08/01/03

  • Next message: lawries_at_btinternet.com: "UPDATE: User account state change emails"
    Date: Fri, 01 Aug 2003 10:42:51 +0000
    To: tru64-unix-managers@ornl.gov
    
    

    Thanks to Lawrie Smith.

    No answer for my problem, but included response if it helps anyone else. I
    cannot change the application, I wanted to know if Tru64 could duplicate
    the prints for me.

    Original Question:

    ES40, Tru64 v5.1A, patch kit 1.
    HP Laserjet 4100 with internal Jetdirect card.

    Our application prints to a printer via LPD, which we suspect of giving us
    a problem.

    Is there a way to set up a print queue in Unix so that it prints to 2
    printers from one print queue? We want to compare the output from both.

    More info: When we configure our printers and queues, we edit the printcap
    file directly and manually create spool directories and so on. We do not
    use lprsetup or other helpful utility.

    Here is the section in printcap;
    mm_hp4|lp35|mm_hp4:\
            :lp=:\
            :rm=MM_HP4:\
            :rp=text:\
            :lf=/usr/spool/lpd/mm_hp4.log:\
            :sd=/usr/spool/lpd/mm_hp4:

    Reply from: Lawrie Smith

    I would set up a wrapper script to take the same command line arguments as
    lpr
    And call the script, something like

    #! /usr/bin/ksh
    ##########################################################################
    # A quick and dirty wrapper for printing
    #
    # No parameter checking occurs in this version.
    # Only errors are logged as the lpd will log successful printing
    #
    # Lawrie Smith - (WM) Technical services - December 2001
    ##########################################################################

    USAGE="usage: $0 orientation printer document"
    # The script takes three parameters

    if (($# == 0))
    then
            print ""
            print "You must specify between 2 or 3 command line arguments"
            print ""
            print "If two arguments are given they are assumed to be"
            print "printer and document (including full path)"
            print ""
            print "If three arguments are given they are assumed to be"
            print "orientation printer and document (including full path)"
            print ""
            print "EXAMPLE: JupiterP portrait shfcomp3
    /app/application/document"
            print "NB: No parameter checking is performed"
            print ""
            print "$USAGE"
    else
            case $# in
                    2) cat $2 | tr '#' '£' | lpr -P$1
                    ;;
                    3) cat $3 | tr '#' '£' | lpr -O$1 -P$2
                    ;;
                    *) ERROR="$LOGNAME: Incorrect number of parameters `date`"
                       print $ERROR >> JupiterP.err
                    ;;
            esac
    fi


  • Next message: lawries_at_btinternet.com: "UPDATE: User account state change emails"

    Relevant Pages

    • Re: Domain Logon Script Advice
      ... users printers and network shares based upon which Active Directory OU ... I happy with deploying the script via GPO etc, ... A very basic VBScript logon script to map the same printer and shares to all ...
      (microsoft.public.scripting.wsh)
    • Re: Re: Running an OU policy only after a previous OU policy com
      ... > Printers with .vbs logon scripts because regular users don't ... In the Computer Configuration ... > Script and in the User Configuration I put the Same as a Logon ...
      (microsoft.public.win2000.group_policy)
    • Printer question
      ... This question is not as much the content within a script, ... What is the best way to assign default printers with the following conditions. ... Thin clients using Citrix. ... OU and assigning a GPO to the container, however Thin clients are not in ADS. ...
      (microsoft.public.scripting.vbscript)
    • Removing Network Printers - Two Quick Questions Please
      ... when I remove a printer via the logon script it works - the first time - just fine. ... possible to remove all printers that are homed on one server? ... objNet.AddWindowsPrinterConnection strPrinter1 ...
      (microsoft.public.scripting.vbscript)
    • Re: script to map network and default printers
      ... there are three printers showing in the Printers applet of Control ... The script found all three configured as local. ... I placed the script in the logon under group policy where I mapped ...
      (microsoft.public.scripting.vbscript)