Sponsored Content
Operating Systems SCO Printer is winning the battle! (for now) Post 302721781 by jgt on Thursday 25th of October 2012 07:23:10 PM
Old 10-25-2012
Code:
while [ $i -le $copies ]
do
    for file in $files
    do
        echo "\033\0170\061\033\0153\0\c"
        0<${file} eval ${FILTER} 2>&1
        echo "\033e\c"   # or whatever the escape sequence is to return the printer to its power on settings
        #echo "\014\c"     # "Remed out by SR to stop extra from feed..."   "
    done
    i=`expr $i + 1`
done

If you want to be really fancy, echo the escape sequences into a file, and then add a -o file_name to the lp statement.
Code:
=1
while [ $i -le $copies ]
do
    for file in $files
    do
        0< /usr/spool/lp/bin/$5  #because of the shift statement, you should copy $5 to a variable before the shift statment
        0<${file} eval ${FILTER} 2>&1
        echo "\033e\c"   # or whatever the escape sequence is to return the printer to its power on settings
        #echo "\014\c"     # "Remed out by SR to stop extra from feed..."   "
    done
    i=`expr $i + 1`
done

Code:
copies=$4
letterquality=$5
shift; shift; shift; shift; shift
..........
         0</usr/spool/lp/bin/$letterquality
.......


Last edited by jgt; 10-25-2012 at 08:42 PM..
This User Gave Thanks to jgt For This Post:
 

2 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

Winning Lotto...

I purchased a ticket for Lotto which was the drawing date on 03-15-10, and when i see it now to know who wins, there is no winner while the winner number is 363? So how is the drawing process?does it also consider the ticket number which is not purchased?:confused: (4 Replies)
Discussion started by: malcomex999
4 Replies

2. What is on Your Mind?

Alita Battle Angel - Happy Valentines Day

Just saw Alita Battle Angel with my Valentine and we really liked it. Hope many will go see it so they will make a sequel. https://www.unix.com/members/1-albums221-picture1089.jpg (0 Replies)
Discussion started by: Neo
0 Replies
LP(1)							    BSD General Commands Manual 						     LP(1)

NAME
lp -- front-end to the print spooler SYNOPSIS
lp [-cs] [-o option] [-d printer] [-n num] [name ...] DESCRIPTION
The lp utility is a front-end to the print spooler as required by the IEEE Std 1003.2 (``POSIX.2'') specification. It effectively invokes lpr(1) with the proper set of arguments. It generally prints the named files on the destination printer. The following options are available: -c Make the lp command exit only after further access to any of the input files is no longer required. The application can then safely delete or modify the files without affecting the output operation. -d dest Specify a particular printer. If no -d is provided on the command line, the contents of the environment variables LPDEST or PRINTER (with this precedence) are taken as the destination printer. -m Send mail upon completion. -n num Specify that num copies of each of the named files shall be printed. -o option Printer specific options. Not supported, provided only as a compatibility option for SVR. -s Silent operation. Not supported, provided only as a compatibility option for Version 2 of the Single UNIX Specification (``SUSv2''). -t title Set the job title to title. ENVIRONMENT
As described above, the variables LPDEST and PRINTER are examined to select the destination printer. SEE ALSO
lpr(1) STANDARDS
The lp command is expected to comply with the IEEE Std 1003.2 (``POSIX.2'') specification. AUTHORS
This implementation of the lp command has been written by Jorg Wunsch. BUGS
The IEEE Std 1003.2 (``POSIX.2'') specification does not provide any means to print non-text files. It rather requires the files to be printed to be text files limited to reasonable line lengths and printable characters. BSD
January 22, 1995 BSD
All times are GMT -4. The time now is 10:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy