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
Data::Util::Curry(3pm)					User Contributed Perl Documentation				    Data::Util::Curry(3pm)

NAME
Data::Util::Curry - Curries functions and methods SYNOPSIS
use feature 'say'; use Data::Util qw(curry); sub sum{ my $total = 0; for my $x(@_){ $total += $x; } return $total; } # placeholder "" indicates a subscript of the arguments say curry(&add, , 42)->(10); # 52 # placeholder "*_" indicates all the arguments say curry(&add, *_)->(1 .. 10); # 55 # two subscripts and the rest of the arguments say curry(&add, *_, 1, )->(1 .. 5); # 3 + 4 + 5 + 1 + 2 DESCRIPTION
(todo) EXAMPLES
Currying Functions curry(&f, , 2)->(1); # f(1, 2) curry(&f, 3, )->(4); # f(3, 4) curry(&f, *_)->(5, 6); # f(5, 6) curry(&f, , 1, *_)->(1, 2, 3, 4); # f(1, 2, 3, 4) curry(&f, *_, , 1)->(1, 2, 3, 4); # f(3, 4, 1, 2) Currying Methods curry($obj, 'something', *_)->(1, 2); # $obj->something(1, 2) curry($obj, 'something', foo => , bar => 1)->(1, 2); # $obj->something(foo => 1, bar => 2) curry(, 'something', 1)->($obj, 42); # $obj->something(42) curry($obj, , *_)->('something', 1, 2); # $obj->something(1, 2) Argument Semantics sub incr{ $_[0]++ } my $i = 0; curry(&incr, )->($i); # $i++ curry(&incr, *_)->($i); # $i++ curry(&incr, $i)->(); # $i++ SEE ALSO
Data::Util. perl v5.14.2 2011-10-20 Data::Util::Curry(3pm)
All times are GMT -4. The time now is 03:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy