Path: utzoo!attcan!uunet!mcvax!hp4nl!rivm!ccea3 From: ccea3@rivm.UUCP (Adri Verhoef) Newsgroups: comp.unix.wizards Subject: Re: Occasionally lp cannot find my print file. Why? Keywords: lp Message-ID: <1211@rivm05.UUCP> Date: 12 Jan 89 22:46:35 GMT References: <1512@anasaz.UUCP> Reply-To: ccea3@rivm05.UUCP (Adri Verhoef) Organization: RIVM, Bilthoven, The Netherlands Lines: 77 >Occasionally I try to enqueue a file for printing by > > lp xxx > >and lp comes back with a message saying that it cannot find "xxx". >Duane Morse ...!noao!{asuvax or nud}!anasaz!duane The program 'lp' is set[ug]id to user 'lp' and that's why... lp < file also works, [as was pointed out], but only ONE file at a time can be queued. Now for the solution. Over here we use 'llp': llp -dclaser -ob -og -t1+2 file1 file2 'llp' understands all 'lp' options. In fact 'llp' just passes its options on to 'lp'. 'llp' takes multiple file arguments, concatenates the files, each separated by a formfeed, and the resulting output will be standard input to 'lp'. Only one queue-id is used. SYNOPSIS llp [lp-options] [files] #-------------- snip 8< snip 8< snip --------------- BEGIN #ident "@(#)llp.sh (a3) 1.0 17 nov 1988" # Usage: llp [lp-options] [files] for arg do case $arg in -*) shift;; *) break;; esac case $arg in -o*) t= # take special care of white space for i in $arg do if [ -z "$t" ]; then t=$i; else t=-o$i; fi oopt="$oopt $t" done ;; -t*) topt="$arg";; # take special care of white space -*) mopt="$mopt $arg";; esac done # If there are no filearguments, use the standard input. if [ $# = 0 ] then cat else for file do [ -n "$cat0" -a -z "$cat1" ] && echo "\0014\c" if cat "$file" then cat0=0 cat1= else cat1=1 fi done fi | lp ${mopt} ${topt+"$topt"} ${oopt} exit $? #-------------- snip 8< snip 8< snip --------------- END # Hey, Duane, if the uucp routing tables still say that the path to # anasaz is ellymae!anasaz, I won't be able to reach you via e-mail. # Could you please have this fixed up? # How and when do I know when this is done?