Disable form feed on a serial printer connected to Sco OpenServer


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Disable form feed on a serial printer connected to Sco OpenServer
# 1  
Old 06-28-2005
Disable form feed on a serial printer connected to Sco OpenServer

I connected a serial printer to my scoOpenServer which works great. I was able to disable the banner in the interface of the printer. However i am unable to find the command in the interface to disable the formfeed . Below is a copy of the interface file. Please can anyone instruct me on how to disable the file.
--------------------------------------------------------------------------
#Set up some global variables.
: ${SPOOLDIR:=/usr/spool/lp}
: ${LOCALPATH:=${SPOOLDIR}/bin}

#Set up the default filter.
if [ -x "${LOCALPATH}/lp.cat" ]
then
LPCAT="${LOCALPATH}/lp.cat 0"
else
LPCAT="cat"
fi

#If we are not using a filter, use the default one.
if [ -z "${FILTER}" ]
then
FILTER="${LPCAT}"
fi

if [ -x "${LOCALPATH}/drain.output" ]
then
DRAIN="${LOCALPATH}/drain.output 1"
else
DRAIN=
fi

nobanner="yes"

if [ -z "${BANNERS}" ]
then
nhead=0
else
nhead=${BANNERS}
fi

for i in $5
do
case "${i}" in

nobanner )
nobanner="yes"
;;
esac
done

if [ "no" = "${nobanner}" ]
then

while [ $nhead -gt 0 ]
do
# echo "\014\c"
echo "$x\n$x\n$x\n$x\n"
banner "$2"



echo "\n"
user=`grep "^$2:" /etc/passwd | line | cut -d: -f5`
if [ -n "$user" ]
then
echo "User: $user\n"
else
echo "\n"
fi
echo "Request id: $1 Printer: `basename $0`\n"
date
echo "\n"
if [ -n "$3" ]
then
banner $3
fi
nhead=`expr $nhead - 1`
done
fi

copies=$4
#echo "\014\c"
shift; shift; shift; shift; shift
files="$*"
i=1
while [ $i -le $copies ]
do
for file in $files
do
0<${file} eval ${FILTER} 2>&1
echo "\014\c"
done
i=`expr $i + 1`
done

if [ "no" = "${nobanner}" ]
then
echo "$x\n$x\n$x\n$x\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
echo "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n$x\n$x\n$x\n$x"
echo "$x\n$x\n$x\n$x\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
echo "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
echo "$x\n$x\n$x\n$x\n$x\n$x\n$x\n$x\n"
fi

#Draining characters might be necessary.
${DRAIN}

exit 0
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Insert FF (feed form) in text file so that when printing the printer print on a new page accordingly

Hello. First happy new year to everybody. I have a script that generate a text file ( /tmp/part_list.txt for example ). This file can be edited using a kde graphical text editor like kate or kwrite The file can be printed out from command line or within the text editor using the print... (5 Replies)
Discussion started by: jcdole
5 Replies

2. AIX

Printer delay before final form feed

Hi, I am new to printing with Unix (AIX on HP). I am printing from a COBOL program. On our test system the page prints and does a Form Feed to the next page. This is good. When I release the program to our customer it prints the page but waits 5 or more seconds before doing a page... (11 Replies)
Discussion started by: habler
11 Replies

3. Solaris

1 way serial feed from Linux to Solaris. Help!

Hi All.. No Labor Day weekend for me.. too much to do. 1 of which is that I have been pulling my hair out trying to get a 1-way serial feed working from a Linux box running Centos to a Solaris 10 box. The serial feed consists of a blackbox fiber driver on each end connected with 1 strand of fiber... (6 Replies)
Discussion started by: HawaiiMike
6 Replies

4. Shell Programming and Scripting

replace last form feed with line feed

Hi I have a file with lots of line feeds and form feeds (page break). Need to replace last occurrence of form feed (created by - echo "\f" ) in the file with line feed. Please advise how can i achieve this. TIA Prvn (5 Replies)
Discussion started by: prvnrk
5 Replies

5. UNIX for Dummies Questions & Answers

Printer for SCO OpenServer 5

I only know enough about Unix to get me in trouble: I have an old UNIX SCO OpenServer 5 that I am phasing out. It had been connected to an HP laserjet via a serial port connection. As part of the phase out I disconnected and removed the workstations leaving only the server. I didn't think I... (9 Replies)
Discussion started by: rpmaps
9 Replies

6. UNIX for Dummies Questions & Answers

Freeing up a serial port with a modem connected

I currently access a remote Unix server which has an external modem connected to one of it's serial ports (/dev/cua/b). At times, this server undergoes a hard reset and for some reason this disallows us from making use of the modem any longer. A hard reset of the modem always seems to fix the... (0 Replies)
Discussion started by: ebender1
0 Replies

7. UNIX for Dummies Questions & Answers

how to share printer installed on windows 2000 with SCO OpenServer 5.0.5

i have wipro netpower server with p4 and 256 ram. i want share dot matrix printer installed on windows 2000 prof. with sco openserver 5.0.5. plz help me to comeout from this trouble. (0 Replies)
Discussion started by: raj_shivage
0 Replies

8. SuSE

Using printer that is connected to WinXP machine

If all else fails, ask right?? I am a Linux Newbie (that's an understatement) and I am trying to setup a printer that is connected to a WinXP machine on a local network. I am using SuSE 9.0 and am using YaST to connect to the printer. The problem is that I keep receiving an NT_ACCESS_DENIED... (1 Reply)
Discussion started by: maelgwyn
1 Replies

9. UNIX for Dummies Questions & Answers

Form Feed...

Hi, I've a text file that has a formfeed character at the beginning. I want to get rid of this formfeed character using sed. But I don't know how to specify the formfeed character. I've tried \014 (octal for formfeed), \f but still not works. Regards, Johnny (5 Replies)
Discussion started by: johnny_woo
5 Replies

10. UNIX for Dummies Questions & Answers

getting info from microannex connected to serial port A

Hi, is there a way to get information of an annex device connected to port A ? i need to get the I.P address of the annex and the port it connected to on the annex. dori (1 Reply)
Discussion started by: dorilevy
1 Replies
Login or Register to Ask a Question