⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 plan9.ps

📁 早期freebsd实现
💻 PS
📖 第 1 页 / 共 5 页
字号:
%!PS%%Version: 3.3%%DocumentFonts: (atend)%%Pages: (atend)%%EndComments%% Version 3.3 prologue for troff files.%/#copies 1 store/aspectratio 1 def/formsperpage 1 def/landscape false def/linewidth .3 def/magnification 1 def/margin 0 def/orientation 0 def/resolution 720 def/rotation 1 def/xoffset 0 def/yoffset 0 def/roundpage true def/useclippath true def/pagebbox [0 0 612 792] def/R  /Times-Roman def/I  /Times-Italic def/B  /Times-Bold def/BI /Times-BoldItalic def/H  /Helvetica def/HI /Helvetica-Oblique def/HB /Helvetica-Bold def/HX /Helvetica-BoldOblique def/CW /Courier def/CO /Courier def/CI /Courier-Oblique def/CB /Courier-Bold def/CX /Courier-BoldOblique def/PA /Palatino-Roman def/PI /Palatino-Italic def/PB /Palatino-Bold def/PX /Palatino-BoldItalic def/Hr /Helvetica-Narrow def/Hi /Helvetica-Narrow-Oblique def/Hb /Helvetica-Narrow-Bold def/Hx /Helvetica-Narrow-BoldOblique def/KR /Bookman-Light def/KI /Bookman-LightItalic def/KB /Bookman-Demi def/KX /Bookman-DemiItalic def/AR /AvantGarde-Book def/AI /AvantGarde-BookOblique def/AB /AvantGarde-Demi def/AX /AvantGarde-DemiOblique def/NR /NewCenturySchlbk-Roman def/NI /NewCenturySchlbk-Italic def/NB /NewCenturySchlbk-Bold def/NX /NewCenturySchlbk-BoldItalic def/ZD /ZapfDingbats def/ZI /ZapfChancery-MediumItalic def/S  /S def/S1 /S1 def/GR /Symbol def/inch {72 mul} bind def/min {2 copy gt {exch} if pop} bind def/setup {	counttomark 2 idiv {def} repeat pop	landscape {/orientation 90 orientation add def} if	/scaling 72 resolution div def	linewidth setlinewidth	1 setlinecap	pagedimensions	xcenter ycenter translate	orientation rotation mul rotate	width 2 div neg height 2 div translate	xoffset inch yoffset inch neg translate	margin 2 div dup neg translate	magnification dup aspectratio mul scale	scaling scaling scale	/Symbol /S Sdefs cf	/Times-Roman /S1 S1defs cf	0 0 moveto} def/pagedimensions {	useclippath userdict /gotpagebbox known not and {		/pagebbox [clippath pathbbox newpath] def		roundpage currentdict /roundpagebbox known and {roundpagebbox} if	} if	pagebbox aload pop	4 -1 roll exch 4 1 roll 4 copy	landscape {4 2 roll} if	sub /width exch def	sub /height exch def	add 2 div /xcenter exch def	add 2 div /ycenter exch def	userdict /gotpagebbox true put} def/pagesetup {	/page exch def	currentdict /pagedict known currentdict page known and {		page load pagedict exch get cvx exec	} if} def/decodingdefs [	{counttomark 2 idiv {y moveto show} repeat}	{neg /y exch def counttomark 2 idiv {y moveto show} repeat}	{neg moveto {2 index stringwidth pop sub exch div 0 32 4 -1 roll widthshow} repeat}	{neg moveto {spacewidth sub 0.0 32 4 -1 roll widthshow} repeat}	{counttomark 2 idiv {y moveto show} repeat}	{neg setfunnytext}] def/setdecoding {/t decodingdefs 3 -1 roll get bind def} bind def/w {neg moveto show} bind def/m {neg dup /y exch def moveto} bind def/done {/lastpage where {pop lastpage} if} def/f {	dup /font exch def findfont exch	dup /ptsize exch def scaling div dup /size exch def scalefont setfont	linewidth ptsize mul scaling 10 mul div setlinewidth	/spacewidth ( ) stringwidth pop def} bind def/changefont {	/fontheight exch def	/fontslant exch def	currentfont [		1 0		fontheight ptsize div fontslant sin mul fontslant cos div		fontheight ptsize div		0 0	] makefont setfont} bind def/sf {f} bind def/cf {	dup length 2 idiv	/entries exch def	/chtab exch def	/newfont exch def	findfont dup length 1 add dict	/newdict exch def	{1 index /FID ne {newdict 3 1 roll put} {pop pop} ifelse} forall	newdict /Metrics entries dict put	newdict /Metrics get	begin		chtab aload pop		1 1 entries {pop def} for		newfont newdict definefont pop	end} bind def%% A few arrays used to adjust reference points and character widths in some% of the printer resident fonts. If square roots are too high try changing% the lines describing /radical and /radicalex to,%%	/radical	[0 -75 550 0]%	/radicalex	[-50 -75 500 0]%% Move braceleftbt a bit - default PostScript character is off a bit.%/Sdefs [	/bracketlefttp		[201 500]	/bracketleftbt		[201 500]	/bracketrighttp		[-81 380]	/bracketrightbt		[-83 380]	/braceleftbt		[203 490]	/bracketrightex		[220 -125 500 0]	/radical		[0 0 550 0]	/radicalex		[-50 0 500 0]	/parenleftex		[-20 -170 0 0]	/integral		[100 -50 500 0]	/infinity		[10 -75 730 0]] def/S1defs [	/underscore		[0 80 500 0]	/endash			[7 90 650 0]] def%% Tries to round clipping path dimensions, as stored in array pagebbox, so they% match one of the known sizes in the papersizes array. Lower left coordinates% are always set to 0.%/roundpagebbox {    7 dict begin	/papersizes [8.5 inch 11 inch 14 inch 17 inch] def	/mappapersize {		/val exch def		/slop .5 inch def		/diff slop def		/j 0 def		0 1 papersizes length 1 sub {			/i exch def			papersizes i get val sub abs			dup diff le {/diff exch def /j i def} {pop} ifelse		} for		diff slop lt {papersizes j get} {val} ifelse	} def	pagebbox 0 0 put	pagebbox 1 0 put	pagebbox dup 2 get mappapersize 2 exch put	pagebbox dup 3 get mappapersize 3 exch put    end} bind def%%EndProlog%%BeginSetupmark/linewidth 0.5 def/xoffset 0 def/yoffset 0 def/#copies 1 store/magnification 1 def%%FormsPerPage: 1/formsperpage 1 def/landscape false def/resolution 720 defsetup2 setdecoding%%EndSetup%%Page: 1 1/saveobj save defmark1 pagesetup12 B f(Rc \320 A Shell for Plan 9 and UNIX Systems)9 2230 1 1765 1230 t10 I f(Tom Duff)1 381 1 2689 1470 t10 R f(AT&T Bell Laboratories)2 993 1 2383 1650 t(Murray Hill, New Jersey 07974)4 1267 1 2246 1770 t10 I f(ABSTRACT)2643 2150 w(Rc)1330 2410 w10 R f( also runs on a variety of traditional sys-)8 1641( It)1 115( interpreter for Plan 9.)4 900(is a command)2 561 4 1463 2410 t( provides similar facilities to Bourne's)5 1580( It)1 120( SunOS and the Tenth Edition.)5 1273(tems, including)1 627 4 1080 2530 t10 I f(/bin/sh)1080 2650 w10 R f( paper intro-)2 497( This)1 229(, with some small additions and mostly less idiosyncratic syntax.)9 2601 3 1353 2650 t(duces)1080 2770 w10 I f(rc)1335 2770 w10 R f( why it varies)3 547('s highlights with numerous examples, and discusses its design and)9 2715 2 1418 2770 t(from Bourne's.)1 610 1 1080 2890 t10 B f(1. Introduction)1 670 1 720 3250 t10 R f( new)1 208( porting the Bourne shell to an incompatible)7 1875( As)1 177(Plan 9 needs a command-programming language.)5 2060 4 720 3406 t( new command interpreter, called)4 1350(environment seemed a daunting task, I chose to write a)9 2232 2 720 3526 t10 I f(rc)4330 3526 w10 R f(because it runs)2 599 1 4441 3526 t( could hardly resist trying to)5 1220( tinkering with perfection is a dangerous business, I)8 2197(commands. Although)1 903 3 720 3646 t( Thus)1 250(`improve' on Bourne's design.)3 1226 2 720 3766 t10 I f(rc)2221 3766 w10 R f(is similar in spirit but different in detail from Bourne's shell.)10 2424 1 2329 3766 t(The bulk of this paper describes)5 1318 1 720 3922 t10 I f(rc)2071 3922 w10 R f( features with many small examples and a few larger ones.)10 2426('s principal)1 460 2 2154 3922 t(We close with a discussion of the principles guiding)8 2143 1 720 4042 t10 I f(rc)2895 4042 w10 R f( it differs from Bourne's design.)5 1317('s design and why)3 745 2 2978 4042 t( features, as individual details)4 1198(The descriptive sections include little discussion of the rationale for particular)10 3122 2 720 4162 t( skip to the discussion at the end before)8 1632( impatient reader may wish to)5 1230( The)1 213(are hard to justify in isolation.)5 1245 4 720 4282 t(skimming the expository parts of the paper.)6 1740 1 720 4402 t10 B f( commands)1 486(2. Simple)1 420 2 720 4642 t10 R f(For the simplest uses)3 881 1 720 4798 t10 I f(rc)1639 4798 w10 R f( all of the following behave as)6 1293( Thus)1 263(has syntax familiar to Bourne-shell users.)5 1724 3 1760 4798 t(expected:)720 4918 w9 CW f(date)1008 5088 w(con alice)1 486 1 1008 5198 t(who >user.names)1 810 1 1008 5308 t(who >>user.names)1 864 1 1008 5418 t(wc <file)1 432 1 1008 5528 t(echo [a-f]*.c)1 702 1 1008 5638 t(who | wc)2 432 1 1008 5748 t(who; date)1 486 1 1008 5858 t(cc *.c &)2 432 1 1008 5968 t(cyntax *.c && cc -g -o cmd *.c)7 1620 1 1008 6078 t(rm -r junk || echo rm failed!)6 1566 1 1008 6188 t10 B f(3. Quotation)1 559 1 720 6488 t10 R f(An argument that contains a space or one of)8 1813 1 720 6644 t10 I f(rc)2565 6644 w10 R f( in apostrophes)2 621('s other syntax characters must be enclosed)6 1771 2 2648 6644 t(\()720 6764 w10 CW f(')753 6764 w10 R f(\):)813 6764 w9 CW f(rm 'odd file name')3 972 1 1008 6934 t10 R f(An apostrophe in a quoted argument must be doubled:)8 2170 1 720 7114 tcleartomarkshowpagesaveobj restore%%EndPage: 1 1%%Page: 2 2/saveobj save defmark2 pagesetup10 R f(- 2 -)2 166 1 2797 480 t9 CW f(echo 'How''s your father?')3 1404 1 1008 830 t10 B f(4. Variables)1 536 1 720 1130 t10 I f(Rc)720 1286 w10 R f( by typing, for)3 602( may be given values)4 879( Variables)1 441(provides variables whose values are lists of arguments.)7 2259 4 859 1286 t(example:)720 1406 w9 CW f(path=\(. /bin /usr/bin\))2 1188 1 1008 1576 t(user=td)1008 1686 w(tty=/dev/tty8)1008 1796 w10 R f(The parentheses indicate that the value assigned to)7 2049 1 720 1976 t10 CW f(path)2798 1976 w10 R f( strings. The variables)3 897(is a list of three)4 632 2 3067 1976 t10 CW f(user)4626 1976 w10 R f(and)4896 1976 w10 CW f(tty)720 2096 w10 R f(are assigned lists containing a single string.)6 1735 1 925 2096 t(The value of a variable can be substituted into a command by preceding its name with a)16 3505 1 720 2252 t10 CW f($)4250 2252 w10 R f(, like this:)2 398 1 4310 2252 t9 CW f(echo $path)1 540 1 1008 2422 t10 R f(If)720 2602 w10 CW f(path)811 2602 w10 R f(had been set as above, this would be equivalent to)9 1997 1 1076 2602 t9 CW f(echo . /bin /usr/bin)3 1080 1 1008 2772 t10 R f(Variables may be subscripted by numbers or lists of numbers, like this:)11 2842 1 720 2952 t9 CW f(echo $path\(2\))1 702 1 1008 3122 t(echo $path\(3 2 1\))3 918 1 1008 3232 t10 R f(These are equivalent to)3 928 1 720 3412 t9 CW f(echo /bin)1 486 1 1008 3582 t(echo /usr/bin /bin .)3 1080 1 1008 3692 t10 R f( the subscript)2 555( Otherwise,)1 496(There can be no space separating the variable's name from the left parenthesis.)12 3269 3 720 3872 t(would be considered a separate parenthesized list.)6 1992 1 720 3992 t(The number of strings in a variable can be determined by the)11 2431 1 720 4148 t10 CW f($#)3176 4148 w10 R f( example,)1 388(operator. For)1 546 2 3321 4148 t9 CW f(echo $#path)1 594 1 1008 4318 t10 R f(would print the number of entries in)6 1443 1 720 4498 t10 CW f($path)2188 4498 w10 R f(.)2488 4498 w(The following two assignments are subtly different:)6 2070 1 720 4654 t9 CW f(empty=\(\))1008 4824 w(null='')1008 4934 w10 R f(The first sets)2 538 1 720 5114 t10 CW f(empty)1294 5114 w10 R f( second sets)2 501( The)1 217( list containing no strings.)4 1085(to a)1 158 4 1630 5114 t10 CW f(null)3628 5114 w10 R f(to a list containing a single)5 1135 1 3905 5114 t(string, but the string contains no characters.)6 1742 1 720 5234 t( indistinguishable\),)1 775(Although these may seem like more or less the same thing \(in Bourne's shell, they are)15 3545 2 720 5390 t( other things)2 500( Among)1 350(they behave differently in almost all circumstances.)6 2060 3 720 5510 t9 CW f(echo $#empty)1 648 1 1008 5680 t10 R f(prints 0, whereas)2 679 1 720 5860 t9 CW f(echo $#null)1 594 1 1008 6030 t10 R f(prints 1.)1 328 1 720 6210 t(All variables that have never been set have the value)9 2097 1 720 6366 t10 CW f(\(\))2842 6366 w10 R f(.)2962 6366 w10 B f(5. Arguments)1 602 1 720 6606 t10 R f(When)720 6762 w10 I f(rc)983 6762 w10 R f( from a file, the file has access to the arguments supplied on)12 2405(is reading its input)3 742 2 1091 6762 t10 I f(rc)4264 6762 w10 R f('s command line.)2 693 1 4347 6762 t(The variable)1 504 1 720 6882 t10 CW f($*)1252 6882 w10 R f( names)1 282( The)1 207( it.)1 108(initially has the list of arguments assigned to)7 1807 4 1400 6882 t10 CW f($1)3831 6882 w10 R f(,)3951 6882 w10 CW f($2)4003 6882 w10 R f(, etc. are synonyms for)4 917 1 4123 6882 t10 CW f

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -