200 201 PWSJDTI7L2XDO5SLI46DZF3H425ZV2OTGHXIPCY


Complete Idiot's Guide to Linux:Command Toolbox: Useful Shell Command and Shortcuts function GetCookie (name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) { var end = document.cookie.indexOf (";", j); if (end == -1) end = document.cookie.length; return unescape(document.cookie.substring(j, end)); } i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null; } var m1=''; var gifstr=GetCookie("UsrType"); if((gifstr!=0 ) && (gifstr!=null)) { m2=gifstr; } document.write(m1+m2+m3);            Keyword Title Author ISBN Publisher Imprint Brief Full  Advanced      Search  Search Tips Please Select ----------- Components Content Mgt Certification Databases Enterprise Mgt Fun/Games Groupware Hardware IBM Redbooks Intranet Dev Middleware Multimedia Networks OS Prod Apps Programming Security UI Web Services Webmaster Y2K ----------- New Titles ----------- Free Archive To access the contents, click the chapter and section titles. Complete Idiot's Guide to Linux (Publisher: Macmillan Computer Publishing) Author(s): Manuel Ricart ISBN: 078971826x Publication Date: 12/22/98 function isIE4() { return( navigator.appName.indexOf("Microsoft") != -1 && (navigator.appVersion.charAt(0)=='4') ); } function bookMarkit() { var url="../../../../../www.itknowledge.com/PSUser/EWBookMarks.html@url="+window.location+"&isbn=0"; parent.location.href=url; //var win = window.open(url,"myitk"); //if(!isIE4()) // win.focus(); } Search this book:   Previous Table of Contents Next UNIX Printing Primer In this book, I sort of neglected telling you how to print files, partly because if you are using a word processor such as StarOffice, WordPerfect, or Applix, these programs already know how to print without going through this fuss (StarOffice is included on the CD that comes with this book.) If you want to do UNIX text processing from the command line (as contrasted with word processing in a GUI), there are a few things you need to know that will affect the final presentation of the document you print. Printing under Linux and UNIX is radically different from printing under Windows or the Macintosh. Printing from the command line involves three steps: 1.  Create a document with a text editor, adding any formatting commands to it as you need. These formatting commands, or macros, will depend on the formatting program you use. However, the idea of text markup (text processing, as UNIX folks like to call it) is the same. 2.  Run your document through one or more filters (some filters might be as basic as the fmt command I talked about earlier); the final filter will typically produce a file that contains all the necessary printer control codes to render your document. Sometimes, the filter can send this output directly to the printer. 3.  Send your filtered file to the printer using a program called lpr. If you only need to print a plain text file, you’ll have to do several things. The program you use will depend on the type of printer you have. Typically, printers are separated into two camps: those that have PostScript and those that don’t. If your printer has PostScript support, you’ll probably use a program called enscript. If not, you’ll use a program called pr. At the surface level, these programs are equivalent—save that enscript harnesses features available to PostScript so it has a lot more of them. These programs at the basic level allow you to specify margins, headers, and length of a line of text. Not fancy, but they provide the basic formatting capabilities you need to generate a reasonably plain-looking document. Here’s an example. If you wanted to print a text file called intro.txt, you would send it to pr: pr intro.txt The same file sent to a PostScript printer would be done like this: enscript intro.txt Both pr and enscript can send the output to the printer, and that is what they will do by default. That aside, these basic invocations will hardly produce the output you expect. What are the page margins? Where do the lines fold? You get the idea. You need to set up all these options on pr or enscript, or your document will use your printer’s default settings. Your defaults will be something like left and top margins 1/2” from the edge of the paper, line length of about 72 characters wide, and Courier (typewriter) typeface—more than likely not what you want. So what are you to do? The first thing you need to do is read the man page and figure out the default settings you want for pr or enscript. In addition to those, you might have to use another formatting command such as fmt. When you figure out the various settings, you just use them over and over. My typical enscript session goes something like this: [alberto@digital alberto]$ fmt -w 65 intro.txt | enscript -- margins=100:100:100:100 -h -B [ 1 pages * 1 copy ] sent to printer I use fmt to create lines that are about 65 characters wide and then pipe the output to enscript. I set the options for the margins at 100 pixels (72 pixels = 1”), and with the -h option, I suppress the printing of the banner page (a page that tells who printed the file and wastes paper). The -B option suppresses the printing of the header line that usually shows the document title, the last time it was saved, and the page number. I could produce similar output using pr like this: fmt -w 65 intro.txt | pr -o 15 The -o option specifies the number of characters for the left margin; 15 characters is about 1.5”. Previous Table of Contents Next Products |  Contact Us |  About Us |  Privacy  |  Ad Info  |  Home Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc. All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited.

Wyszukiwarka

Podobne podstrony:
200 201
200 201
200 201
Dwyer 200 5 201 202 5 209 215 244 Dwyer Inclined Stationary
AUDI 200 1990
Wykorzystanie systemu hivamat 200 w leczeniu ran
200 25
200 18 (2)
instrukcja bhp przy obsludze czyszczarki naroznej typu cnr 200

więcej podobnych podstron