[ Pobierz całość w formacie PDF ]
.g.nobannerFiles beginning with the string "%!" are assumed to contain PostScript commands.ExamplesTo print the file ssh.ps:% lp ssh.psrequest id is lp-153 (1 file(s))This submits the job to the queue for the default printer, lp, with the request-id lp-153.Introduction to Unix © 1998 University Technology Services, The Ohio State University 41System Resources & Printing4.2.2 lpstat/lpq - check the status of a print jobYou can check the status of your print job with lpstat or lpq.Syntaxlpstat [options]lpq [options] [job#] [username]Common Optionslpstat lpq function-d (defaults to lp) list system default destination-s summarize print status-t print all status information-u [login-ID-list] user list-v list printers known to the system-p printer_dest -Pprinter_dest list status of printer, printer_destExamples% lpstatlp-153 frank 208068 Apr 29 15:14 on lp4.2.3 cancel/lprm - cancel a print jobAny user can cancel only heir own print jobs.Syntaxcancel [request-ID] [printer]lprm [options] [job#] [username]Common Optionscancel lprm function-Pprinter specify printer- all jobs for user-u [login-ID-list] user listExamplesTo cancel the job submitted above:% cancel lp-15342 © 1998 University Technology Services, The Ohio State University Introduction to UnixPrint Commands4.2.4 pr - prepare files for printingpr prints header and trailer information surrounding the formatted file.You can specify the numberof pages, lines per page, columns, line spacing, page width, etc.to print, along with header and trailerinformation and how to treat characters.Syntaxpr [options] fileCommon Options+page_number start printing with page page_number of the formatted input file-column number of columns-a modify -column option to fill columns in round-robin order-d double spacing-e[char][gap] tab spacing-h header_string header for each page-l lines lines per page-t don t print the header and trailer on each page-w width width of pageExamplesThe file containing the list of P.G.Wodehouse s Lord Emsworth books could be printed, at 14 linesper page (including 5 header and 5 (empty) trailer lines) below, where the -e option specifies theconversion style:% pr -l 14 -e42 wodehouseApr 29 11:11 1996 wodehouse_emsworth_books Page 1Something Fresh [1915] Uncle Dynamite [1948]Leave it to Psmith [1923] Pigs Have Wings [1952]Summer Lightning [1929] Cocktail Time [1958]Heavy Weather [1933] Service with a Smile [1961]Introduction to Unix © 1998 University Technology Services, The Ohio State University 43System Resources & PrintingApr 29 11:11 1996 wodehouse_emsworth_books Page 2Blandings Castle and Elsewhere [1935] Galahad at Blandings [1965]Uncle Fred in the Springtime [1939] A Pelican at Blandings [1969]Full Moon [1947] Sunset at Blandings [1977]44 © 1998 University Technology Services, The Ohio State University Introduction to UnixPrint CommandsCHAPTER 5 ShellsThe shell sits between you and the operating system, acting as a command interpreter.It reads yourterminal input and translates the commands into actions taken by the system.The shell is analogousto command.com in DOS.When you log into the system you are given a default shell.When the shellstarts up it reads its startup files and may set environment variables, command search paths, andcommand aliases, and executes any commands specified in these files.The original shell was the Bourne shell, sh.Every Unix platform will either have the Bourne shell, ora Bourne compatible shell available.It has very good features for controlling input and output, but isnot well suited for the interactive user.To meet the latter need the C shell, csh, was written and is nowfound on most, but not all, Unix systems.It uses C type syntax, the language Unix is written in, buthas a more awkward input/output implementation.It has job control, so that you can reattach a jobrunning in the background to the foreground
[ Pobierz całość w formacie PDF ]