This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.
Subject: Re: [sf-perl] Batch printing from perl? From: David Fetter <shackle@fetter.org> Date: Wed, 2 Aug 2000 10:00:55 -0700 (PDT) Michael Ellery wrote: > > SFPUGers: > > What I need to do: > traverse a directory containing several thousand Postscript files, > print each file (to one printer or perhaps to several printers, to > spread the load), and track the success/failure of each print job > (log/e-mail on failure, etc.) I think this should work: find . -type f -name '*.ps' -print |perl -e 'open S, ">succeeded";open F,">failed";while(<>){ system("lpr",$_)?print S:print F}close S;close F' ===