Sponsored Content
Full Discussion: Printing spits out paper!!!
Operating Systems Solaris Printing spits out paper!!! Post 71836 by penguin-friend on Monday 16th of May 2005 09:31:16 AM
Old 05-16-2005
Network Printing spits out paper!!!

Hello again..

Here's my problem: i've got uses who print on a epson 1170 dot printer from a solaris server (SunOS ss5 5.3 Generic_101318-70 sun4m sparc)
Normally they print out data of an informix database.
The file is about 30 pages long.

I had to modify the lp command as follows (lpbase being the normal lp command)
if [ "$USERNAME" = "surve1" ] # username being their login
then
cat <&0 > /tmp/file_sql.$$
iconv -f 8859 -t 646fr /tmp/file_sql.$$ > /tmp/file_sql.conv.$$
chmod 777 /tmp/file_sql.conv.$$
chmod 777 /tmp/file_sql.$$
lpbase -s -y portrait -o nobanner /tmp/file_sql.conv.$$
else
cat <&0 | lpbase -s
fi

As you can see, this is not to terrific! So, when they print, the printer spits out tons of paper, not empty, but with data!!! The part to that interets me is the "else". What's wrong?

Thanx for any help..


Jason
 

6 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Research paper

I am doing a "research" paper for school and i'm having a hard time finding accurate information. I am supposed to choose three differant versions of unix, give a brief explination of each, tell why there each differant from each other. I have found a ton of web sites but the information is so vast... (1 Reply)
Discussion started by: pantsusan
1 Replies

2. Shell Programming and Scripting

Research paper library

menu should look at least like the following:- RESEARCH PAPER LIBRARY - Main Menu 0 : EXIT this program 1 : EDIT menu 2 : REPORTS Menu Enter your choice> program should check for invalid choice and display error message and re-display the main-menu. If EDIT is... (1 Reply)
Discussion started by: SHakur_BIG
1 Replies

3. UNIX for Dummies Questions & Answers

Rock Paper Scissors

I'm trying to create this game in Unix. This is what I have so far: echo "Player one: Choose (R)ock, (P)aper (S)cissors" stty -echo read Pone case $Pone in R) echo "Good Choice! Let's see what Player two chooses.";; P) echo "Good Choice! Let's see what Player two chooses.";; S) echo... (5 Replies)
Discussion started by: gpro
5 Replies

4. HP-UX

Setting printer paper length using unix commands

Hi Guys, I have been trying to resolve a printing problem but nothing works out . I have an Epson LQ 680 (dot matrix printer) . I need to print a file . The paper length should be 34 .Left margin should be 5. I have tried the following things after researching from the man pages. pr -t... (24 Replies)
Discussion started by: Kar1234
24 Replies

5. AIX

Print Paper Size always A3 instead of A4

RICOH MPC4501 via AIX PrintServer is only printing on A3, even though its A4 contents. Similar Printer on same AIX PrintServer is printing correct though. What you think issue with first printer? AIX V6.1 (1 Reply)
Discussion started by: panchpan
1 Replies

6. Shell Programming and Scripting

How to check if printer is out of paper using perl script ?

Hello, I need to chack if the printer is out of paper, and send message to operator. I need to do this from perl script. The printer have mechanism to check if it have paper. However, the cups does not report "printer out of paper" when I remove the paper, and try to print. Is there any... (1 Reply)
Discussion started by: +Yan
1 Replies
UNBUFFER(1)						      General Commands Manual						       UNBUFFER(1)

NAME
unbuffer - unbuffer output SYNOPSIS
unbuffer program [ args ] INTRODUCTION
unbuffer disables the output buffering that occurs when program output is redirected from non-interactive programs. For example, suppose you are watching the output from a fifo by running it through od and then more. od -c /tmp/fifo | more You will not see anything until a full page of output has been produced. You can disable this automatic buffering as follows: unbuffer od -c /tmp/fifo | more Normally, unbuffer does not read from stdin. This simplifies use of unbuffer in some situations. To use unbuffer in a pipeline, use the -p flag. Example: process1 | unbuffer -p process2 | process3 CAVEATS
unbuffer -p may appear to work incorrectly if a process feeding input to unbuffer exits. Consider: process1 | unbuffer -p process2 | process3 If process1 exits, process2 may not yet have finished. It is impossible for unbuffer to know long to wait for process2 and process2 may not ever finish, for example, if it is a filter. For expediency, unbuffer simply exits when it encounters an EOF from either its input or process2. In order to have a version of unbuffer that worked in all situations, an oracle would be necessary. If you want an application-specific solution, workarounds or hand-coded Expect may be more suitable. For example, the following example shows how to allow grep to finish pro- cessing when the cat before it finishes first. Using cat to feed grep would never require unbuffer in real life. It is merely a place- holder for some imaginary process that may or may not finish. Similarly, the final cat at the end of the pipeline is also a placeholder for another process. $ cat /tmp/abcdef.log | grep abc | cat abcdef xxxabc defxxx $ cat /tmp/abcdef.log | unbuffer grep abc | cat $ (cat /tmp/abcdef.log ; sleep 1) | unbuffer grep abc | cat abcdef xxxabc defxxx $ BUGS
The man page is longer than the program. SEE ALSO
"Exploring Expect: A Tcl-Based Toolkit for Automating Interactive Programs" by Don Libes, O'Reilly and Associates, January 1995. AUTHOR
Don Libes, National Institute of Standards and Technology 1 June 1994 UNBUFFER(1)
All times are GMT -4. The time now is 07:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy