Batch printing

I often upload some pdf files on a server to print them at my faculty. On the server I follow these steps:

1. Convert the uploaded pdf files to postscript

for file in `ls -1`; do pdftops $file; done

ls -11 lists all the files of the current directory, one file per line. pdftops actually converts the pdf files to postscript.

2. Delete the pdf files

rm *.pdf

We need to delete the pdf files to only list postscript files in the next command.

3. Put two pages on one page and print them

for file in `ls -1`; do psnup -2 -d0 $file | lpr -Pscit32411d; done

Again we walk through the file list but this time psnup prints two pages on one page and we pipe its result to the print command lpr. The argument P is the printer name of our destination.

I’m sure this can be done in only one line but I’m not a big shell scripter so I make the batch printing in three lines.

  1. The parameter is a one and not a l


  1. The dominant theme in the foyer is medievalism with a life-sized knight in shining armor guarding the large double doors, and an equally threatening armored warhorse peeking around the corner.
    new balance 90% off

  2. thanks to the author for taking his clock time on this one.
    Cheap puma Deals

  3. Super-Duper website! I am loving it!! Will come back again. I am taking your feeds also
    bearpaw vs ugg

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>