Unix Pine can print to generic printers attached to ansi terminals.
Pine uses escape sequences on ansi/vt100 terminals. "<ESC>[5i"
directs all output sent to terminal to the printer, then "<ESC>[6i" to
return to normal.
I have tried to implement this in the following script:
#!/bin/sh
echo "\033[5i" #redirect terminal to printer
cat somefile #send file to printer
echo "\033[6i" #should reset terminal
The first echo works fine.
The file is sent to printer
The second echo *does not reset terminal output but rather continues
to output to printer so the "[6i" is sent to printer.
Clearly there is something I do not understand. Maybe this cannot be
done with shell script.
Any insights appreciated.
Andy
--
+---------------------------------+--------------------------------+
| Department of Neurology | FAX - (916)452-2739 |
| University of California, Davis | |
+---------------------------------+--------------------------------+