enscript -M A4 -2Gr -p - $1 | lpr -P astroprintYou may also need to press the arrow keys until you get to astroprint and press "s" to make astroprint and your command the default printing action.
Press "E" to exit settings and "y" to agree to the changes and you're done. See the manual page for enscript for more options (man enscript)
Note 1: In order for this command to work, you need to have the "enscript" package installed, if you don't have this, contact your system manager. Check enscript is installed by typing "enscript" and return. If enscript appears to be waiting for input, hit ctrl-D or ctrl-C to put it out of its misery. If it is not installed, you should get a " Command not found" error.
Note 2: This will only work for text files, because enscript generates postscript, don't give it postscript input.
Note 3: There is a command, /usr/local/bin/print on both Solaris and Linux which contains the following:
/export/home/rahm[pavo]rahm: more /usr/local/bin/print #!/bin/tcsh # Use enscript in gaudy mode to format text files for printing. /usr/bin/enscript -L55 -G2r -p - $1 | lpr