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
Net::DRI::Data::Hosts(3pm)				User Contributed Perl Documentation				Net::DRI::Data::Hosts(3pm)

NAME
Net::DRI::Data::Hosts - Handle ordered list of nameservers (name, IPv4 addresses, IPv6 addresses) for Net::DRI SYNOPSIS
use Net::DRI::Data::Hosts; my $dh=Net::DRI::Data::Hosts->new(); $dh->add('ns.example.foo',['1.2.3.4','1.2.3.5']); $dh->add('ns2.example.foo',['10.1.1.1']); ## Third element can be an array ref of IPv6 addresses ## ->add() returns the object itself, and thus can be chained ## Number of nameservers print $dh->count(); ## Gives 2 ## List of names, either all without arguments, or the amount given by the argument my @a=$dh->get_names(2); ## Gives ('ns.example.foo','ns2.example.foo') ## Details for the nth nameserver (the list starts at 1 !) my @d=$dh->get_details(2); ## Gives ('ns2.example.foo',['10.1.1.1']) ## Details by name is possible also my @d=$dh->get_details('ns2.example.foo'); DESCRIPTION
Order of nameservers is preserved. Order of IP addresses is preserved, but no duplicate IP is allowed. If you try to add a nameserver that is already in the list, the IP addresses provided will be added to the existing IP addresses (without duplicates) Hostnames are verified before being used with Net::DRI::Util::is_hostname(). IP addresses are verified with Net::DRI::Util::is_ipv4() and Net::DRI::Util::is_ipv6(). METHODS
new(...) creates a new instance ; if parameters are given, add() is called with them all at once new_set(...) creates a new instance ; if parameters are given, add() is called once for each parameter clear() clears the current list of nameservers set(...) clears the current list of nameservers, and call add() once for each parameter passed add(name,[ipv4],[ipv6]) adds a new nameserver with the given name and lists of IPv4 and IPv6 addresses name() name of this object (for example for registries having the notion of host groups) ; this has nothing to do with the name(s) of the nameservers inside this object loid() local id of this object get_names(limit) returns a list of nameservers' names included in this object ; if limit is provided we return only the number of names asked count() returns the number of nameservers currently stored in this object is_empty() returns 0 if this object has nameservers, 1 otherwise get_details(pos_or_name) given an integer (position in the list, we start to count at 1) or a name, we return all details as a 3 element array in list context or only the first element (the name) in scalar context for the nameserver stored at the given position or with the given name ; returns undef if nothing found at the position/with the name given. SUPPORT
For now, support questions should be sent to: <netdri@dotandco.com> Please also see the SUPPORT file in the distribution. SEE ALSO
http://www.dotandco.com/services/software/Net-DRI/ AUTHOR
Patrick Mevzek, <netdri@dotandco.com> COPYRIGHT
Copyright (c) 2005,2006,2007,2008,2009 Patrick Mevzek <netdri@dotandco.com>. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. See the LICENSE file that comes with this distribution for more details. perl v5.10.1 2010-03-25 Net::DRI::Data::Hosts(3pm)
All times are GMT -4. The time now is 04:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy