[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Send output to file & printer



On Friday 30 January 2004 04:59 pm, James Horvath wrote:
> Not new to linux per say, but have done almost no shell scripting or
> programming with it, so consider me a complete rookie.

There are probably some good shell scripting HOWTOs you could find using 
Google.

> Using lpd, is there a simple way using the command line to send the
> output of a process to both a file and a printer at the same time?

I believe the "tee" command does something like this - see its man page.

> Optionally, how might I go about saving a copy of a print job to file
> before it prints (without disabling the print queue itself)?
> As an example, if I issue a command like "ls -laF" on a directory

ls -laF > dirlist.txt; lpd [options] < dirlist.txt

Adam



Reply to: