IMD 1.18: 8/08/2017 9:45:40 XENIX DEV.SYS/UTILITIES#4 SN 00245 2.3F0 (ACS-8600) 4 OF 9   0 ( ) *!+",#-$.%/ &0 'usr/lib/uucp/uucico 4711 4 4 WVWv vW~WoW~W]vh UWVWUWVWUWVWUWVW~WSWf WW蘑-W"$WHtF$W tW+W蟐F+W菃6#WPeF=t&+W諏F$W tW+WbDW V&W+WlWV&W脁>|tPWW?j>|EP&WW!jWtP tZW6#W`F=t+WSuܿ-W䊃#Wp^FWPWuWWt 6#WSWEa6#W0` 135452 3142671160 7653 ؈UWVMWzƈUWV~WtWv貆Nf~W tWv藆F=}?WWWnvWWn6L&WF+WRSt>|WWWYx+Wb>|WWW4xW W#Wix>|WtP t)kW+W tWWHW uD>|W4WWi=Ct(=Hu=Ru<=Suq=XuqF>|WWWks~t1+Wp WWa626D#Wc_8Ru+W8BtÿWWtW~nW+W tWv@8UWVW"$Wك"UWV~= tG=u=tGUWVׇdžJȅb0>|v#WWWw#WnUt6#WRWe+W#W^uWW]WWR6#WRWBe>|64V>|LWHWWfigWNuVW]WW~t2NuoWvW#WNRT >|WWWW7a_>|#WWWr>|>4tWWWWr>|6WWr>|6#WWrWWm~tLWv6DWAOHuWHWQu2Lt>|tPWWmtXufƆWW{wWWeWW#Wg~WCW#WCW1LW~WmP`W~WL#WT+W+FWhYu*WHWx t\T&@hBi+JNuM~t?WWWhvWWh6L&WWhW>|6#WWlr>|#WWWSr-W]"$W诇u64SF+W9F~tWWF`! #܃Swu\# P衆UWVLwFFL$WWV} WWB WW4D,WWKLD5W2DH9D|ʍWWWmWWc[H@WWWmHڀ?-uhR=Qt:=gt=xt 踂=蚂F뽿#W}h=u)Fjv6WDWIu.WHW tWHW thWHW tF~uDWKWW#W)WW#W5b~W64F>|P1WWqWW`WWU WWG~u #WIcF WW& WW WW  W W W W WW WWғ WWē WW趓WWl6L&WWlWXVTRPNWWmR#Wႃ#W= ~@2W#WWl#WWd6#WRWd+W{#W`F;Fu6#WRWc_b>626D#WpfWWRdb6#WRWLWWOHNvW~;WvW ?u;WP>uH}WXW: tvW:vW#WWZJWW#Wa-W聈6#SWOW _>|vYWWCq"$W詆u06#eWOW^6#W]F=uOWnW#W赒PQF#W#W~t?-WWWzv6WWz6L&EWWzW ƆW#W躐WEWWxl6L&PWWflWxRPNLZWWl fWWjZ>|#WnWWltStNc+W~u/CW6#Wf^F=u dW~u1+W&>4u%#Wgt&WWc+W#WCW3W~Wt'WXW tvWWUIPvWWWgWxFWXW t>|WWWgu+W~u+W龊UWVWW}WWr+WLS N`>4tF$W tW+WxF>|6#kW>#>#R=rt3=stn=xu~uaWz'=du׋~}>~}W-4NF~^_?-t^_vW2vW5?vWyW#WNt%WzWZVRDWHVV&W݁WV&Wdu5WvWu>4tWWWW WW~W6;W~WUu~u?W#W^c+W5>#tU>4uNLWNunWW,U~t?W WWfv)WWf6L&3WWfWoV'DWYtWp>|vwWWhp>|6J$WWOp>|F$PWW5p>|G$PWWpHW tW+W懃FG=Su~}WOW#WAz>#tF^_St+V뗋~}W豅=~uWnWTW.6duWWYDWV&W+WmtRtPvWlvWo>vWW#WMtWWBY[PGW6#誎6#6#>#>#+WP`$W!#WQWWu#W"Rt]WWbv~t?LW=WWnfv[WW]f6L&eWWKfW]6#P&FVoFtVWCW>|PWWo>#t4>4uW3PW6#肉6#6#憃>|vWWo~u*Nvdz`U裐6#W觏>4toFF$WtW+W-FJ$&J$##6#@ WxWrWoWzW66#DWAdWT'BP#WvWRtWW YDW 66b06WV&Wk WV&W"cuWWXv#W##=}9=tdWWb>#$>#6#Wd:kWWcb"$W草t WW贌0 ( ) *!+",#-$.%/ &0 'ts,~t?~WoWWevWWe6L&WWeWLWW8MH=@WWWe R RRwWR RReW6L& RRSWRevRvNtvT`&w@3 R$ RR W6CWtp WJtq Wx WOJt W W#WvWRT W WWY>| WW`R>|~WWWiR"$WgtA>|WWWBRWWp@ Wv j6 Mi1WWjWv vr W4WM\ 4Wv_,uUWVu@hBi~tWPWbt WUW+uWHWWue6L&WWceWuRPNLWWe WWgS>|WWWe>|P= RRV6L&I RRVRS R6TOF=u@d RU RRV6o RRV6L&} RRVRdžJt`V&Wy϶WvW~t? W WW7`v WW&`6L& WW`W&iiFtWO]W[W [~W'hFP~W6 skF~;t1>| WWWQ$WW?tƆWUWupWua>|W WW?[+FWPPWu)WUWuNtWWdPvW{vW"8vW#WWGt WSWGt+ WWEdWT;P#WvWKF޾'vFVRv=uGVӋ t? R RR7Vv⺟ RR&V6L& RRVR&^WW0v WW'NLWWqGH=@ W WW_H WW_6L& WW_W>|WX\>|<W+WWgQ+W6\W~WliF>|P=WW7Q~}0>|VWHWWQnW]WF?+WWtt>|W WWUWVF$!~Pv1t ~tF^u+UWVF$~~t WSWt*WWvWf8t%:WvW!zN;PvW zR#WYz#Wsz= ~@KW<WWV^ދVWVV*r@ R RRU6(R RRU6L& RRUR~6(r@R RRURRRW WWx_>|N WW__NvWuvW2vWF3t%( WvWuP}6PvWtR#W9h+WtWvh~W}jF+WgWY~uv>|vuWWP>|vWWP>|vFvF^[uFAtUWVF$}v^[8ul~}>@~}>B~}>N&~} >P&~}>R&~} >T&R&td#W^WWc6L&iWWcW>|#WsWWc66b06WV&Wc WV&W\u*U6L&)RRpURFvRv:Lt^vm^+ oUWVv"a3Rvkt+u#WSu= ~@9 W* WW^#WL WW^6L&W WW^WvW#Wa WwAt b WRWtWWzP~tvK~XUWV> ~6 g jUWVFv~uuF}WWO>iFs>|~P WWY+ۃF^tw>|~P WWYUWVfas>| R RRYWSWtWWQV&W+WeWV&WlzWSWt6#N&FBlFtF&Fk^9u_t67Rwjt%^7Q2uF-&F4uv^7ju v2tƃF^v Wd W>|#W WWd^ WvWVu WRWt W W+W_WvWnwF=uA&W~WIP1WWh,Wf"$W=euW~WgF+Wf~|W]XF&v\}>| R RRdYvVRv }c>|0 R& RR.YVRF|>|A R7 RRvWV&W]5J=tWWCWhtLWJtWWPWWX[>|WWbuUnUWV>|~u9WW]T>|~5GWWCTSW~u;ju vmvUWV.^wv~ W WW]vW WW]6L& WW]WW W WW^WRW)t 6#P&~rUWVFFn~utW~5GF=u>Kv,Wd0W%Ft-vd0W6F~5v&tF~tv5YvVRV] }VrUWV~G=urUWVF&F6(> trH R6%QF=u@Y RJ RRXdžJte϶WvWy>|WWWBbNugWWiP~t? W WWbv% WWbGF؊"%uFξ'^΋tVR7iu`^΋VWWRVRT>|VR\RRSvVR6FЃ>|PeFfFtWCWtUWV2>|FP WW1]6#v@u>| W WWXF~=t~uEI~u@~uu0>|vWWNWv< ~ u~qhUWV~?R6d RRsX6L&r RRaXRs& vlFVRv?t? R| RRXv亓 RRX6L& 6L&/ WWaWDWn{kYt{~t?H W9 WWavW WWa6L&a WWaWRR{S~u FVЋ8mUWVHFv~uuF=}/WyWhA>|WWWSlF]FP W~WJ]# W~WKb^:Vt>>|v, WW\vFP4 W~W\L W~W변~u>|vU WRRyNvRRhN6L& RRVNRh݃^^F?-uDF~>|,RRRN-RW<%RRWRVVTvcDVV'r@ R RRW&R RRW6L& RRWR&r@6#N&FjFtvW_5t%k WvWwN8PvWwvWV&W3J=tm Wo W&FuW~WDSW~Wj =}~5!0Fo~5W~W SWvW~WR>|~WWWW}\+MvUWV>|FP` WWV\>|vk WW>\6#vFPBuUWVumWvE3t&v 0 ( ) *!+",#-$.%/ &0 'F=tFvW~u-Rv %tG>|v.RRMvvF>|=tARFR;RFXYUWV~FU"E"t}+tE*؊E+FE+ފWNV}&uE&%u Vt~E&Fu Fuz>|v}WWHv6_FPvvbF~;t?WWWHvWWH6L&WWHWv v~}7~VWvF|=uGVWvF=tÃ~|>|v VV:~~U2Utd@VϊV*Ruq>[3ÉFQnV~પu1F%F؊V"t^WV0t*M&FFY>^UVURM~ttaORIR;*RXv^wZ;v}+ҋgUWV FF ~=;~u ~}~~|v^w3..=M"E)uE$<==<==)==)=^􊗐 U&RVW{uuVtXNƈF׃>|WWWjHWWvb-bUWV ~WtWv`F>|PWW#HFFVV~W tWv_2U2UVG*V* Vv^w>|^W*R,VV9vDF^W:Vtg>|FP<VV9>}F@V;vt;Q>VR^Q>[W>R^WV[WV^ߋVW>^GV FFV@t7^GV`^Y>^*FVF~=u~}?eWVWWLvpWWL6L&}WWLWۃ~WtWvdNfVVV>|vU+F꘹؊E)ËƀV@t@FPVWFNj؊VWN%E}t E! %E"WUWV ~ +E!F>|PWWGvWvaF=?WWWGvWWG6L& WWGWփVV~W tWvDPKVV(vvDP>}v4XVVG9~ u|vDPdVV 9v €tf^ F^ߋU+VWnF}FE)؊VVYߊPV tހOVߊPVt+~| Y>^UWWzL>|vWWbL>| F- PWW;L~W tWvdF=}?WWWLvWt uF Wo}uE! +}E&E!WIFt+9P+u LJP+F|FF+ߊPNtq.vZ_FWWv"aF=?(WWWPGv0WW?G6L&DWW-GW?փ>|vNWW G` ~uv拴 V;wtR^W[W*vvtv4^w~u>|fVsVVKvtvt~VU@VFF ~}v抄V"u~tM&~tM&VUF\UWV~FFWtE)؊WK6L&WWKWڃ+WtWvc+W tWvceUWVF1Wvau$+>}WW#OFF}Ƌ]^UFvO}uE$;Ft^F@tFt^FRvvv WK^"$W`uͿ1WWd>|WWWBK1Wv1uW8bW~WvccF=e>RR<WNVUWV~+҈U*U)U(E+VUWV~vFF~}fFfVVG*VV3VV9VwV1VNFF~狽 uvzWt~} | } Fv}WtFF^؊"%tq~u+_~W~WW)؊FE)N;vtЋߊPVu튔VVU,ߊVPVVQnߋV W>QUWVQUWV~VQvF} VVV)VVFV)QnQnu)ƈE)Y>^UVU@VMM&VVUހOV~t ~tWFZUWV|PWWJ+Wb>|v WWJ>|vWWJ,W&W8}dVV>|/~ |FPFXVUWV~+9P+u F|ڋ1VUWV~vGNuVUWV~+FuUUWV*>*|Wv5?F~Edv|~~}‹~9~|~9~~UWV~VVvFtRRE UtFFF"^W VFV*R^W^[3ӉV+VV0VFV0VFV0VFV>|V*RRR 7v ~u=t+tVVWWWU%8U}E-؊WߊPNu@N ƈE-ERu;Q[F@P~(|6W9WWfJ^VtF^~2s>}CW=WW+W5a>}vJWHWWJLFuWP~v|~~v~E@@v|v^W%[W$F)~uWLFt"؋~}?~v|FvRRvEށv.V7F^㋗ UVU EtM& ue'u e'M&@~u}FRV^PF=uRRR6vRR6=džlpnnnFll|džl^G.FFU9V}=VVU+VV؁~~^F^VFF@UV+Rvvv( VV)VRuqaUWVW"$Wy_cUWV>|SWKWWIvTWQ!u~WZW~WB~~~ ~F>|v~E$;F˃~u+FU^VW$v^W'[W&FF~}~狽P+u~v扼P+~}vFv.~u rVU%i~utRRDM~tG M&@M'@ǁ M&VU*Wu RR P7+7F737666}&tWw.nnFl^W;lWRpRPF^W;t&RRR,6vRR6^W&t .,[G^ߋVBPNWn~tVYUWV~FE(4ߊPNt"F@N%Mq.NQƈE(E*;u^WWxI>|vbWW`Iv6"v>|qWjWW7IwW_PrWvfWv_t|Wv _F~(|~(|v~rUWVvvu>~Fvt~vF?Fv^W'[W&^W&u^O&v4uZ^UWV~+҉VVVE)؊ }uWo U,VtE,E$ȺҋVVVV+V"u4ߊPVV0 ( ) *!+",#-$.%/ &0 'vOUWV~ u ~~~ ~~~~Fv^[FFF~9~|OUWVW`+W'KpOUWV`+WJW藶W>Wv>F=t?WWWJ'vWW9'6L&WW''W9~W~Wv u ()~}WTJ+VWWW!1 >|WWW0Wd +VWX|6 !WWf55OHFWWMFe WSL~+~Wvv|MF=u +W/L볃~&:W+WWv?+WvWWWM> dW1~Wi@F;Ft=u>|vWW&F@UWV$>}J>PW2W +(UWVFH> t~+~WvvH~+~Wv6+ F=}~~t ~~9~|~IUWV> t:WLW:WVW:WW:WWy:WWk:W W]:^tv`W~W!F+W~WXE2W*W~W+>|2W3WWT+#W+WW~WF=t믋02W/t0lUWV~W=5vBWW4l~~~~9~|+WK+kUWV>Ft9I>Fu-I~V^ڊ*RvQWW4^^&v2W6=t&~Wv?F=u?)WWWC&v3WW2&6L&EWW &W2~Wp?v܋~vvvI vv6+FIUWV(vW~W"0>2};~u~W>25&+~I#v#2t~W5UW|WgW8 dWF,B;UWV8t+W8Wy8Wo8WWM9WW?9WW19WW9~WFPvFP@Wv A+ >|v NWW*DUWVF PRYW tW6F~|ك~|@qWbWYNUWVW+WIBNUWV+WItMt@W6# F>|PhWW+4>|6#sWW4~~.+-+v~;~|;vs?vs?F=u?^WOWW%vhWW%6L&zWW%W踴v2W6F=WVf9IvW~W/W~W$FtvWPJ/vm%IUWV IUWVIUWV H>|+WWW /WW9WW9W W9+WWW58dW+:UWV,q:J8t+W7W7W7+WWW*WWWm*6L&WW[*WmWW"Fux~WWPH#vWW F=u@WW> u>~*6#6#+=uҿMUWV+W6ItM> t 6#w6++UWVKM+WHt?WWWq%vWW`%6L&WWN%W`v +EUWVF~狽+t F>9~|~ |?Wv'Wvr'|F=tFPmG>|+WWW.uWv!'u Wa9>8WW8WW8WW9WW8WW8W W8vWWWu +WWWWWW)WWW)6L&WW)WWW@0GW2W9"Fu{CWIW@FFvaWtQMV^[F^u䋞ڀ? uWI@@t+WWW$vWW$6L&WW$W䳃>9~|~Wv;@P4F=u?WWW$v|+WWWq.uWv&u W#9>|*+WWW3.WW@&WWWg7 dW*WQ+9UWV^u%_WvR+WPq!>u <>t6W2Wu$6(v9v)P^Wvp)v2fW+UWVvfFu^ C~uvZ?~5vL?+UWVvGvW+dUWV+WAHtL> t@WvvJ@Wv6+jF~^Wu+ WWx$6L&!WWf$Wxvv:~v扼+>UWVFU~狽+tE~t~+v:u)~%+W8GuWpG>| WW-%t=t+UWV+vvoE^+L9v2WUWV>4t%>4=t>44s>45v uWF44>4=t >450>4Fu^B~uv?^~}?+UWV^:Vu~BF^u+UWVv>FF~9~UWV7L+WGt=L+WKvWWW*~-vW;u+=~+5~Dž+F>9~|=UWV~Wv=}+~u~uw=UWVvt v=|>L&t>L&uvv<Duu7 EPE>|+RRR*-vvEP7@VRF>4F~ |Կ W4>4Wv vt+9>4=t Wv4u>454vWvs8UWVv vr N^?/uFFGBUWV^RF^VF[;u ~uB~t+UWVnA~uFp~uFz>|vtv+WWWIK+VW}WW2 >|WWW1WY!+X=UWV$Wv:F=}-=W~Wv<vl:vv;} v<v<+UWVF|vRR,F%u =u+u vWF׋FUWV~oF^=/t;=~t9#W~WB(W~WbBFuvvWv u+98~UWV6~~ȉ~ʿWvFƅu8+Wv~Wvuv^4WW'?Ft6#?6#?+W>+Wv?F=t?WWW'vWW'6L&WW'VW!+UWV!K+WFt'K+WJvWWF=|șvvWWG~~5vvvt*F~~5c<F~9~| ~W0=u~W~WWW+W0}0u@WWWWWW6L&WWW蠝=u~tvUWVF~~ ^FVڀ? tڀ? tڀ? u^t7^F^~?F^R!~u|VD7V!vWy#UWV^GvRR["FRRJ"FRR<"FVR W>~UWV!W,5W 2-UWV>|WWNWW:Wvvz+F=uG^V>|)~RtX+WmF=t@?W0WW6HWW6L&YWWWϫ F+F>^t~5v2tW~W%vv.,2vW0S0{(UWVd'v,W6!W~W{ ~W''UWV'tVڀ? tڀ? tڀ? uF1UWVvWW4W=t+1>4tFF4VVR^F[t F~~^#9D7tuuFvR"vR!vR!F#UWV~W^Wvv"UWV~VVN~@W~~XW[WW^:Lu>|cW_WW~},-P8^tEFWvv*=u->|,^t~uvv2tFF>9~|>9~|^u>>~u~}~~~vcWtF^v<W61W~WI AW~Wg2=u+M+W2v2dW4Wu2~W)'2*WGUWV.VVF.F>tWvF=u?WWW6vWW%6L&WWW%F~-M| * W Ћ|^ƈF u΃} V9Vu+ ^FV"UWV~vL| F Vv`FVڀ?~ȋPeWWh^? u^+UWV,LV^[F^u䋞uv=d~~}~v~5lt+F~=uv6Iuv؊F}_WJWW vlW~Dž4F΃~|~Wvu~W~Wbtڍ~W-vƉF~W-vƉF~~v^[FF~9~GFu׋FM"UWV~W$+PPREPC Eu5eϊUte"UWV~v F~u28VVL| * WQ(@PWv+>|WhWW++UWV>tvv6|+ PRWuWW 5WhWu?5+W u>~ u$ѿWW1@P+uӍWC1W`W9>|a(tWWԃ(֋,*+0.~| XrWW>|XPRWW &nnnv^~t~W_u64W~W>}\vu>uD+`">狽4t>4'>9>VЉV|GNuFV9VrȋF!UWV~v F~u9?VVL|*G V*PGrNuۊT u FV9 FuE W4F~ }Uv)PJW:WrW +WrWO(=t*FvvvZvQ"WjZWrW ^?,W~5=t v~51[v|~u0=~ ^_G^u ~onX&UWV~+R6$F}JRVRv$Fvp#~~+ ^ހ? tF;v|^VRWK"+ҋ%UWV|+>>뼋>9>~4v,/UWVF~~5v+t F~9~|ދ~9~|Wv+@P%VrFT!UWV"Pvv^_u~>džWa0u ^G^GW+GW*vDu9}Bt5v!uS%UWV~t9|u2%UWV>uWW/ 6(n%UWV>t6FuFO/vv+^F^~?UWV  /F<PRWu3W W Ft4W W FuvLUWV~WvW[ UWV~WvvB UWV~FA~~FFGuvVvvVh UWV~vv vvtWvl@*UWV>t6WrWo'*UWV~W)~WFW}WF=tJ#W=?׋FWWtq"+MUWV> tX+WF=t@WWWO%UWV~=:tG=u=tG+%UWV>uVVu+6V05Vt>27W4+.W6W,vWW u~WWJWW F=}FƆ~'~FWv*t v썾FFGFu= u%= u= u=%t^O}M^7[*IGF=%tF=*tvGFFF#WWP~uuu}GWWv vWvv)UWV)UWVg)~uZƆ4,W(dž2v6WWt6L&WWbWt F+F#v~5@/u ~E3FF>9~|+UWV~Wv>47WW67WuW87:7<7WV>>7WI>@7W<>B7= tG=u27i$UWVVW F~~~W-~W Fuuu}GWvWOWv4vWW u.v썾W[ v0 ( ) *!+",#-$.%/ &0 'F FFGF^"uۃ~uF0u~luGFF#~huFGF~[u W4^"tV VV~5vVEP'FEVF5V9Vt M VUWV~Uu8Ut/+։V~$5EvVEPuFE~[u?F8^#Fu1tVGN~!L| * VЉV~uƒ~t~~ VvE^ ^ t;+R UWV QRR^GPR FVQRR^GPR FV~|~sQFVn^FT8v<PR=u=u=tR%8+=tS=u~=tmR=uH=ulP R= ui=uM=um=F~uVRvvvvv t ~tF~u~tv^O|^7[* vЉV t׃ t҃ t̓u;Ft M +ҋUWV W;> rUWV~UtDU@u;WkEP }Ut uA~t~ctGH+UWV~F=^uFG+~tF|Gց]t~t FFuOvv [F<PRvv ^ƙ<Fƙ^7FPRFVpPR_ `8~|0~r(FV;VuFG=du=ou=uu=xuO R=u=uC=u8U868+68;68};+҉V> 8uډV6868vR}vЉVV9Vud~uYvvpVUWVP~ct ~st~[u%vv vv~t^7+RU tEeEBUWV~u+^+t+^=at=rtU=wuVv[tRRv*F}UWVv~Wv^W t+UWVW~Wv t+UWVFB~~F~W~Wv=|;Fw6Vx)FVF۾F|~sHPWFVN~~6^8~>b8V7=nu8+ +6F96~8^BvV68 UWV>8u>8t>8t 808vUWV~ǙPR6868`ǙPR6868s88 +FVFF~et~fuFF ~ouF ~xuF~FF^ O|^ 7[* v Ћ t؃ tӃ>L&u VvlFR+PRv tR+Rv F~}aEVUtM^?ruMM׋dUWVuN| ^+F FP+P8F3UWV~~u3}u-E V+Utu95wu95t;UWV~F^7Fd8T8 UWV:8VGFu^G p:8GFGFGFG^^ƆGFGFu=tW } 8փ0 8փW8.UWV684+868>8UWV88688(|s"8-8 t΃-ufFƈG^ O|^ 7[* v ЋN{~tFV؃FVuv VK^+uAN^ O|)^~RW ~t|V RWw +UWV ;> r+Uu9܋_UWV" 9L&} UtMUt U@tVEuM}uUt܊El7EMu5UtVV5EPEGFn^7Wn^dRW~n^dRWhn^dRWR^ d|E2E0^W dRW+68>8ރ68>8UWV>8u=68>888UWV>8u=68>888(|s"8-868>8 ڊ*%.t~ u~tF1v KЋN}}"u~ua|f~ A|FF~u FV/~ u FVL&㋿~t/vH t VvRR0RRW PWRmR3RR[wUWVF~t1WM}%}uMUt eM Et*lUWV~}tUt uevuuMu5EUWV~:8 UWVFun mUWV~G~ |F 0 GF 0G~ UWVFnFPAu+68>8PUWV~+6 8=*u 8G88(=0|=9Gƹ Ë 8UWV~UWV~UWVFV҉FVFVVFv0| 90a| fW7ƙFVvvetEt~t~ t F8W tvW vo /~t~9~v)~ ~~F܇WW Fv4 < UWVW8W V8V8>8=%tG=u9>8t+R68R+8R68 =u 887888 G=-uG 8=0uG8W VBVN}׋; UWVv) UWVVV>>f8tUj8t%5tV;wV~UWV~v8v *PGN^ O|^ ڋF  v v F~}P=-u̓~ 0uNj^ O|^ ڊ*G뫋^ ~u~uFƈG^ O|^ 7[* v AЋ+t-t0}i9~aƈG^ O|v ^~tV; UWV~+v"=99Gƹ ËFGG= t= t=+t=-t=0}ƒ~t֋y UWVv P` U8> 8 8=.uGW8> 8G+һ.^RTRz Rpd Rf6 R\6 8688R8R;r=;w;>t+j8>j8~F j8+Rj8;vŋj8Ru.j8V9j8롋j8RVڊ*G^ O}v *PG:N}(^ O|^ ڋF  v v N~uUWV~UtMeUt(u+G^ ^ vj.Rz+RVRvfPRVRv^V6FV^G5z5zBzxzxzxzxzxzxzxzxzxzxzxzxzWVVR <PRFPR PR^G[Y+ӉFVVR|FwF/| Jt| Ku\ ㋗&V\ ㋗(VvVV8 6888*8[t88 888u8x888uq888u^RU8^߉;v h8׃ UWV~>55UWVvVփV>f8uf8fVVFvVREPFEUuIu P tME^,^,렺RY։UtڀM+҉VV"+։Vxzzz(zNUWV~v ^ ~~cu ~0uuFF~suFL| * VЉVڊ#Ft~uF~cFvVIF~t8;~ ;~u.||(;~| ;~u|}FVVRCD UWV~v:|u +EE R R R6 8688R8R+H6 8> 8t8BRR8R8R"#88?8"@V=u0 ( ) *!+",#-$.%/ &0 '8>V9Vv;r~V9Vuߋ׃;uցvV;VuVV[96v6wUWVvDtV@i > 4ARG COUNT - %d errno=%d %s %s %s %s %s %sAERROR - (%s) strlen(User) <= 10User - %s errno=%d %s %s %s %sREQUESTUsWP!H܋_ø 2,& ܋O_@܋O_)sL&܍O_V6#;i > 3ARG COUNT - %d errno=%d msg - %s W_FILE1 - %s /AERROR - (%s) strlen(User) <= 10User - %s errno=%d NLOCAL UUCP D/lib/uucp/L.sys/usr/lib/uucp/L.sys.cr/usr/lib/uucp/L-devices/usr/lib/uucp/L-dialcodesBAD SYSTEMWRONG TIMESYSTEM LOCKEDNOD+ƺFvto;tkv~VBVV9VsVVv^[FFVNu;s+V;r F+ƺer - %s LOCAL UUCP DENIEDSEND ACCESSrrCAN'T READ DATAFAILEDLOCAL UUCP DENIEDRCV ACCESSLOCAL UNIX DENIEDRCV ACCESS%s^sL&܋_r#tãL&ã^0+øø6z%t nUVW~ vNENIEDRCV PERMISSIONchkpth ok Rmtname - %s rNCAN'T OPENRCV DENIEDAERROR - (%s) ret != -1STAT FAILED %serrno=%d %s %oY DEVICEDIAL FAILEDLOGIN FAILEDBAD SEQUENCEAERROR - (%s) ret == 0BAD UID ret %derrno=%d %.7sMyname = %s unknown flag %sNj؋h8UWV~Wv}+UWV~ >l8~>n8FnFPvwUWV n8VV+VV/TM.%05d.%03dwCAN'T CREATE TMFAILEDwrktype - %c, fileno - %d PROCESS: msg - %s %s RQSTCMPT:FAILEDSUCCEEDEDREQUESTf^_^]s L&Ó:*sL&Ë܋_W+ø܋_p##tظrp#܋_؉rmesg - '%c' got %s FAILexpected '%c' got FAILBAD READgot %s expected '%c' got %.25sBAD READgot %.25s wmesg '%c'%.25s AUDITaAUDIThereSLAVE msg=%s/nmsg-%s,%.7ssys-%s LCKCBCALLBACK Role %d CALLBACKREQUIREDCALL BACKBADSEQPREVIOUSBA;VwNF+nFVЉVV~v+v,V)VvWvWl8Ft=}d~;~rZVVVvHVVVvWailedsucceeded%s HUP:YAERROR - (%s) role == MASTERrole - %derrno=%d chkYNNNXUUCP PATH DENIED%s %sY%s SNDFILE:p#ãL&Ë܋_SXsL&ãp#+ø܋O_w0r#r##t tۍ0[r u L&UPSQRVW file %s, system %s, copy %s Nprotocol %s Protocol %s Proto started %c Proto start-fail %c , `  % DSEQOKBAD SEQHANDSHAKE FAILEDBADSEQSYSTEM STATUSCAN NOT CALL%c.%.7schkNO WORK    call to %s LOCKEDFAILEDSUCCEVV~,Vvl8Ft=~;~tVWv+v+v;vw;~uA^+^V+V;|vVVRVVvvVREMOTE DENIEDRCV REQUESTAERROR - (%s) role == MASTERrole - %derrno=%d AERROR - (%s) role == MASTERrole - %derrno=%d AF-Pr#__^ZY[X] Ӓ܋_#tehknqtwgdial %s calledfinds %s calledgetto %s calledlogin %s calledrAERROR - (%s) fn != NULLCAN'T OPEN %EDED%.7s -Q%d %smsg-%s BAD SEQHANDSHAKE FAILEDOKHANDSHAKE FAILED Rmtname %s, my Role %s, MASTERSLAVESpool - %s Ifn VVWV)VvV@V)Vv76UWVn8V~vVGVFNu UWVn8V~vVVF^GERROR - (%s) role == SLAVErole - %derrno=%d AERROR - (%s) i > 4ARG COUNT - %d errno=%d %s %s %s %sREQUESTEDmsg - %s WGË܋_#ø r ܋_ t ãL&[;#s bP;r&#f^_]USWVF y;V u>Rȋvserrno=%d AERROR - (%s) nr == 3BAD LINE %serrno=%d AERROR - (%s) lb < Devbuff + MAXDCHTOO LONG %serrno=%d AERROR - (%s- %d, Ofn - %d, Loginuser - %s startupFAILEDSTARTUPTALKINGret from cntrl - %d CONVERSATIONOOOOOsend OO %d,OOOOO Ifn ^FVFNuUWVv+6">"UWV90PRmNWAW6"6"@[Y6">"k^_FILE2 - %s NUUCP DENIEDSEND PERMISSIONNUNIX DENIEDSEND PERMISSION/AERROR - (%s) strlen(User) <= 10User - %s errno=%~ } ރV+~yރƋ׍f^_[]øPv~ y Vރ+V y ^ V;| 9~ v+~) pd < Devs + MAXDEVTOO MANY DEVICES %derrno=%d AERROR - (%s) pd > DevsBAD FILE %serrno=%d rAERROR - (%s) fn != NULLC- %d, ret ioctl - %d tty.flags %o,tty.ispeed %d, tty.ospeed %d, ret ioctl - %d     exit code %d SIGNAL %dCAUGHTAEwgNO+Ë^wFg_^UWVv tWv UWVvtWvUWV~v~GuOGFd chkpth ok Rmtname - %s %s/TM.%05d.%03dwNCAN'T OPENSEND DENIEDYNYFAILEDSUCCEEDEDCOPY%omode - %o %s RCVFILE:REM F+USWVv ~Ǚ+Fȋƙ+F ȋ+эf^_[]USWVF y;V u.ȋvF y+ yڋ™f^_[]AN'T OPEN %serrno=%d AERROR - (%s) nr == 2BAD LINE %serrno=%d AERROR - (%s) lc < Codebuff + MAXCCHTOO LONG %serrno=%d RROR - (%s) ret >= 0RETURN FROM STTY %derrno=%d gGI\HJpI"HhiuFUWV~vF:uGu+N؊+UWV~v~GFuFUWV~+FGueUWVOTE DENIEDRCV REQUESTAERROR - (%s) role == MASTERrole - %derrno=%d AERROR - (%s) role == MASTERrole - %derrno=%d /NYËv~ yރ+V y^ ;| 9~ v +~ +FyЋǍf^_[]UVvN^##^sLAERROR - (%s) pc < Dialcodes + MAXCODEMANY DEVICES %derrno=%d ACU0call: no. %s for sys %s ACU%s%sDial %s dcr returne*** TOP *** - role=%d, wrktype %c, X %sREQUESTAERROR - (%s) WB#WW."GUWVWH#WW)UWV#WP#WWWUWVL&"WPUWVL&"FAILEDSUCCEEDEDCOPYfailedsucceeded%omode - %o AERROR - (%s) role == SLAVErole - %derrno=%d REQUESTEDAERROR - (%s) &]N\altos86l/usr/lib/uucp/usr/spool/uucp/usr 0 ( ) *!+",#-$.%/ &0 'd as %d AVAILABLE DEVICENONO AVAILABLE DEVICE %s /dev/%s/dev/%s%s%s-<dc - %s, acu - %s DN write %s timeoutDIALUP DNLSYSTAT OPEN FAIL %serrno=%d %d %d %D %s %s %s/%s.%.7sSTST%s/%s.%.7sSTSTr%d%d%DCALL IN PROGRESS %s MAX RECALLSNO Co bp NULL %s AERROR - (%s) ret != -1PKGETPKT CAN't READ %dsend %o AERROR - (%s) ret == HDRSIZPKXSTART ret %dAERROR - (deviceIllegal seekRead-only file systemToo many linksBroken pipeArgument too largeResult too largeStructure needs cleaninuucp/uucicoUUCICO-r1/dev/null/dev/null/dev/null/usr/lib/uucp/uuxqtUUXQT/dev/null/dev/null/dev/null%s -r %susr/lib/uu writeTIMEOUTACU write %s errorDIALUP ACU writeFAILEDACU write ok %s dcf is %d Line open %s failedDIALUP LINE openFAALLMAX RECALL COUNT %d RETRY TIME NOT REACHEDNO CALLRETRY TIME (%d) NOT REACHED /etc/systemid/etc/passwdrr/bin/s%s) ret == pk->p_rsize + HDRSIZPKXSTART ret %dalarm %d AERROR - (%s) ret > 0PKCGET READ %dgen err at %o, (%o), pkon - %gWould deadlockNot a semaphoreNot availableUnknown socketSocket exists  cp/uucp/bin/shsh-crget%s/%sgetr/usr/lib/uucpAERROR - (%s) ret == 0INIT USERFILE %derrno=%d /..//usr/libILEDForked %d Wait got %d Status %o DEVICENOT AVAILABLE/dev/%srWrong time to call %s WRONG TIME TO CALLAERROR - (%s) hsh-cd Ofn - %d sent data %D bytes %D secs%s received data %D bytes %D secs%s uuclean deleted file %s mail %sw%sxcp calledAAAAAABBBBBB atof:fltrd: Floating Point Not Present /uucp/USERFILErcAERROR - (%s) ret == 0INIT USERFILE %derrno=%d rAERROR - (%s) fp != NULLBAD DIRECTRY %s errno=%d nf > 4TOO FEW LOG FIELDS %derrno=%d start in send mode%s wanted <%s> --%s failokLOGINFAILEDAERROR - (%s) speed >= 0(null)^.^.rwchildr f1 okw f2 ok stat=%o child stat=%o /mkdir %smkdir - %s %c.%.7s%c%.4sfile - %s LCK.SEQLAERROR - (%s) p8wToo many open filesNot a typewriterText file busyFile too largeNo space left on /usr/spool/uucp/LCK.SQ/usr/lib/uucp/SQFILEr/usr/lib/uucp/SQTMPw/usr/lib/uucp/SQTMP%s%d%s %d %d/%d-%d:%d /usr/spool/uucBAD SPEED %derrno=%d Speed: want %d use %o ps %d AERROR - (%s) ret >= 0RETURN FROM STTY %derrno=%d "">REMOT Unknown error: M:/Day Mon 00 00:00:00 1900 n < SLOCKTRIESCAN NOT GET %sLCK.SEQLerrno=%d /usr/spool/uucp/SEQFr%4d/usr/spool/uucp/SEQFwAERROR - (%s) fp != NULLCAdeviceIllegal seekRead-only file systemToo many linksBroken pipeArgument too largeResult too largeStructure needs cleaninp/LCK.SQ/usr/lib/uucp/SQTMP/usr/lib/uucp/SQTMP/usr/spool/uucp/LCK.SQ/usr/lib/uucp/SQFILE/usr/lib/uucp/SQTMP/usr/lib/uucp/SE returned %s<kr - %d lost line kr - %d, fn - %d LOGINLOST LINE%c^%c<%s>>FAIL> sent <BREAK%1d%s,%d EOT>SunMonTueWedThuFriSatJanFebMarAprMayJunJulAugSepOctNovDecf8f8  0 @ X b | !+!7!I!X!h!w!!!!!!!!""N NOT OPEN %s/usr/spool/uucp/SEQFerrno=%d /usr/spool/uucp/SEQF/usr/spool/uucp/SEQFw/usr/spool/uucp/SEQF%s%04dLCK.SEQLusr/lib/uucp/uuclean 711 3 3 QFILE/usr/lib/uucp/SQTMP/usr/spool/uucp/LCK.SQ/usr/lib/uucp/SQTMP/usr/spool/uucp/LCK.SQimsg %s<%c^%c%s <%comsg-<%s    %s>AERROR - (%s) nw == nsBAD WRITE %serrno=%d > ioctl ret %d ioctl ret %d AERROR - (%s) )"5"H"Y"r""""")Error 0Not ownerNo such file or directoryNo such processInterrupted system callI/O errorNo such device/dev/null/dev/nullshio - %s AERROR - (%s) f == 0BAD OPEN fileno %derrno=%d AERROR - (%s) f == 1BAD OPEN fileno %derrno 17002 3142671160 7740 >/usr/spool/uucp/LCK.LOGret > 0BAD WRITE genbrk %derrno=%d @AERROR - (%s) ret > 0BAD WRITE genbrk %derrno=%d sent BREAK nulls - %d SuMoTuWe or addressArg list too longExec format errorBad file numberNo childrenNo more processesNot enough corePermission denied=%d /bin/shsh-cstatus %d LTMP.%dAERROR - (%s) ret != -1LOCK PROBLEM - %serrno=%d AERROR - (%s) ret != -1LOCK PRO/usr/spool/uucp/LOGFILEa/usr/spool/uucp/LCK.LOG/usr/spool/uucp/LCK.LOG%s/LOG.%05d.%1d/usr/spool/uucpw%s %s (%d/%d-%d:%02ThFrSaWkAny%d-%d @not cntl %o alloc change not implemented srj not implemented r short %d want %d rcoBad addressBlock device requiredDevice or directory busyFile existsCross-device linkNo such deviceNot a directoryIs a dirBLEM - %serrno=%d AERROR - (%s) ret == 0LOCK PROBLEM - %serrno=%d AERROR - (%s) i < MAXLOCKSTOO MANY LOCKS %derrno=%d d) %s (%s) /usr/spool/uucp/SYSLOGa%s %s (%d/%d-%d:%02d) %s %s/%s.%.7sSTSTr%dw error on %s AERROR - (%s) fp != NULunt = %d xcount = %d  @tries = %d rec h->cntl %o bad header %o,h->ccntl %o state - %o bad header %ectoryInvalid argumentFile table overflowToo many open filesNot a typewriterText file busyFile too largeNo space left on AERROR - (%s) p != NULLCAN NOT ALLOCATE FOR %serrno=%d %s.%sLCK.%s.%sLCK./dev/null/dev/null/dev/null-s%.7s/usr/lib/ 0 ( ) *!+",#-$.%/ &0 ' 2܃Swu\2 PUWV:Fv~=mtQ=ntS=ptu=xu~uWX 64 62 _ 4 2 u=tW } 0 փ0 0 փW0  UWV6@ 4+@ 64 >2 UWV@ @ 64 2VBt5v uSUWV~t9|u2UWV>FuHW8WF 6FpUWV>Ft6MM׋PUWV~RW~t|VRWuUWVb ;>r+Uu9܋_UWVFB~~F~W~WvN| ^+F FP+PFUWV~UtMUt U@tc^_?-t^_G=du~}>iFbPR^GP:PRFV;~}t0~}W~ (|s"0 -0 64 >2 ރ64 >2 UWV>@ u=64 >2 @ @  UWV>@ u=64 >2 @ @ (|sF FQUWV~=:tG=u=tG-UWV>FuJV8V_Fu+6FV^Vt>` WUWV~+v"=99Gƹ ËFGG= t= t=+t=-t=0}ƒ~t֋yUWVVV>V EuM}uUt܊E EMu5UtVV5EP EM}%}uMUt eM E}W=NF~~[>|WWrWi6)W6Fu6WjW|~W"0 -0 64 >2 ރ64 >2 < UWV~+6: =*u: G@ @  =0|=9Gƹ Ë: UWV~>b WW d WuW f h j DWV>l WI>n W<>p = tG=u` kUWV>D tUH t%5tV;wV;r=;w;>t+H >H ~F H +RmH t*lUWV~V@ VB >. =%tG=u9>. t+R6B R+. R6.  =u8 < 0 . > G~Wu~W~W=u>|o~WWrW[~ȁ@tNv~+v~;~|=;vr6>|~WWrW UWV~ UWV~ UWV~v8v *PGN^ O|^ ڋF  v v F~}P=-u̓~ 0uNj^ O|^VR}+^?ruVV^?ruVV*FuHW^?ruR+RVV+RvWRTRLR ;vŋH RRu.H V9H 롋H RVU8^߉;v F ׃pUWV~>=-uG8 =0uG> W 6 >: : =.uGW< >: G+һ. ^RTRz Rpd Rf6 R~W~t v̍~W9~WvtRv+WUWVF$vFPtfF ڊ*G뫋^ ڊ*G^ O}v *PG:N}(^ O|^ ڋF  v v N~uUWV~UR~u|Vr VYvWUWV^Gv RR]FRRLFRR>FVR55VUWVvVփV>D uD D >V9Vv;r~V9Vuߋ׃;uցvV;Vu\6: 6< 0 R@ R> 60 0 @ *@ [t0 > @ . @ u. Z. 0 0 uq0>$9~|+UWV>$}v$$P.UWVvWWLW=t+>LtFFNVVR^F[tMeUt(VVFvVREPFEUuIju qPvtMEFF렺R։U9r tuuFvR vRvRFUWV~VVN~-M| * W[ЋVV[96v6UWVvDtV@D+ƺFvto;tkv~VBVV9VsVVv^ 0 < u^RR R R6: 6< 0 R@ R+H6: >: t< BRR0 R@ R"#@ @ ?t F~~^GUWV^RF^VF[;u ~u~t+UWV(vW~W>\};~u~tڀM+҉VV"+։VV~5vVEPFEVF5V9Vt M V UWV~Uu8Ut/+։V|^ƈF u΃} V9Vu+ ^FVUWV~W +PPREPEu5eϊUtepUWV~v [FFVNu;s+V;r F+ƺNj؋F UWV~Wv,}+UWVv tWv@ " 3 X n =u=u=u=tR%6 +=tS=u~=tmR=uH=ulP R= W>\5&+Pv\t~W5UWVf vW~W;#W~WFtv%WPv=UW~$5EvVEP;Ft M +ҋUWVb W;>rUWV~UtDU@u;WkEPF~u28VVL| * VЉV|GNuFV9VrȋFUWV~v F~u9?VVL|*G UWVvtWvUWV~vF:uGu+N؊+UWV~v~GFuFo ui=uM=um=uFG=du=ou=uu=xuO R=u=uC=u0 U0 60 +6. ;66 };+VvFu^~uv"~5v+UWVvFu^x~uv^~}Ut uU tEeE.UWV~u+^+t+^=at=rtU=wuVv[tV*PGNuۊT u FV9VrFUWV Pvvv UWV~} u +3=wuCDVT=at=ruL}+܋O_@܋O_)sF܍O_V62;^sF܋_r#tãFãH+҉V>8 uډV6> 6B vV6.  UWV>2 u>4 t>< t 0 00 v UWV~ǙPR64 62 L ǙPR}?+UWV~+R6(F}JRVRvFv~~+ ^ހ? tF;v|^VRW_+ҋUWRRv(F}>Fu VvlFR+PRvtR+RvF~}aEVUtM^?ruudL֋QR+PRvhLUWVv~WvT^W t+ UWVjW~Wv%p t+ 0 ( ) *!+",#-$.%/ &0 'ø6\UVW~ vN^_^]s FÓ(*sFË܋_W+ø܋_#tظr DEBUG# %s STARTr%s directory unreadable stat on %s failed unlink file %s uuclean deleted file %s mail %sw%s*/etc/systemid/etc/passwdrr/bin/shsh-c(null)HH,Wt +W3>}@W4W W)>|2WAW W(MW2W!8=uA^WOW W(2Wroot, / , /usr /tmp /usr/lib/uucp/L.sys/usr/lib/uucp/L.sys.cr/usr/lib/uucp/L-devices/usr/lib/uucp/L-dialcodesunknown flag %s܋_؉ãFË܋_SXsFã+Ë܋O_w0  #t tۍ0[r u FUPSystemid/etc/passwdrr/bin/shsh-c(null)HHD D J jW W(6 xW W(W W(W<WW;W:W;WWW(~8s1>| DEBUG# %s STARTr%s directory unreadable stat on %s failed unlink file %s uuclean deleted file %s mail %sw%s*/etc/sQRVWF-P __^ZY[X] Ӓ܋_#D D J p/usr/spool/uucp/usr/lib/uucp/L.sys/usr/lib/uucp/L.sys.cr/usr/lib/uucp/L-devices/usr/lib/uucp/L-dialcodesunknown flag %sWW W'(>|:WW W (>|WW W'>|(WW W'>|WW W'WOystemid/etc/passwdrr/bin/shsh-c(null)HHtGË܋_#ø r ܋_ t ãF[;.s bP;r&.f^_]USWVF y;V u>Rusr/lib/uucp/uuxqt 4711 4 4  DEBUG# %s STARTr%s directory unreadable stat on %s failed unlink file %s uuclean deleted file %s mail %sw%s*/etc/sWWDW WW;W W(W;(W;(ƉhFF+=It$=Ot:=Uuxz W(WWD D J ȋv~ } ރV+~yރƋ׍f^_[]øPv~ y Vރ+V y ^ V;| 9~ v 47704 3142671160 7534 ystemid/etc/passwdrr/bin/shsh-c(null)HH)Wc ^WW)WM W=W:WW)W- Ɔ:~uWWt :WK 8W(WHuusr/lib/uucp/L-dialcodes 644 3 3 +~ F+USWVv ~Ǚ+Fȋƙ+F ȋ+эf^_[]USWVF y;V u.ȋvF y+ yڋ™fD D J h(=CtR*WW:W5:= uW:؍Fj``[``uዞ 13 3142671160 10343 ^_[]Ëv~ yރ+V y^ ;| 9~ v +~ +FyЋǍf^_[]UVvN^#0^usr/lib/uucp/USERFILE 644 3 3  jWhnhtj;tj^tj|tj&uPF~u(WW W0& WW<>}jWsF]&4altos86DXo/usr/lib/u @Ct ܃Swu\t PQ5UWVAdžbWWD `=t.u?`u 24 3142671160 7443 W W%jW~WFuj~u jW j``[``u(W!W W% Wucp/usr/spool/uucp/usr/lib/uucp/L.sys/usr/lib/uucp/L.sys.cr/usr/lib/uucp/L-devices/usr/lib/uucp/L-dialcodesunknown flag %s?`uuWK*W W *x v U~}Wm5=6.^_?-u0^_G=xtƋ~u(W>|(W(W W%2W0Ws9(WWW(W d>|PHW W$6592Winwats 800 usr /tmp /usr/lib/uucp/L.sys/usr/lib/uucp/L.sys.cr/usr/lib/uucp/L-devices/usr/lib/uucp/L-dialcodesunknown flag %s DEBUG# %s STARTr%s directory unreadable stat on %s failed unlink file %s uuclean deleted file %s mail %sw%s*/etc/sW W*NF~Ń>|WW W)6=6 W<?>fW WP:>| W!W W=)PR 0 ( ) *!+",#-$.%/ &0 'duWWW6=uAhWYW W$WtW Wo$6 W W]$WwdW6A$6i-Wv*F=t?]WNW WvdW W6 wW WW~W~Wv u vc++WvWWvW46vWW(uv(Y6UWV16Wv]FtFtWWWWw=}W~WQWW~W}+'UWVd'%t+Wi%W_%WU%+WW%WW% ~Wv0F=}~@t+T1UWV-130v2W-/W00uS+12WW~W2WWW"Wy$"W2W 9ƆEWWW"WL$"WW8W:W+7uWW tW9* dW{ ~W',F;Ft=u>|vW WtF=,UWV$>}$*PWWvW6=WWWW"Wp"W5"WW3 =t@BW3W W KW W6 WW WWWW%WWB&WW7&WW)&W W&^tvW~WF+W~WWWW$ dW >|2WW W W+WW~WF=t믋02W/t0lUWV~W=~WFPvFP:WWIWOWWCW WWk4=uAWW Wd#WW WQ#6 W W?#WYt&~Wvy+F=u?WW W vW W6 W WW~W.+v܋~+v~;~|;vsW/5vWW#t*v'Q5UWV^t+85F$H>|vaW WJ>|~5jW 'UWV$t+W$W$W$WW'%WW%W'W %WWq%WWf%WWX%Wv  >|v W Wa0UWVF PRW tWP$F~|ك~|@WW WEW W W3WW7W P(W:WWW4" 4%,Wq9%W2W8=uA6W'W W"2WB+v1+F=u?WW WvW W~6 W WlWvW6F=t?WW W7W0~5vz1t F~=u~=uvv}1UWV 4>|+WrW W}WvWvW WJ%+WEW1W!$dWcW&UWV,/&$$t+W#W#W#+WKWx$WUWj$6 $W W!W;CW.WFux~WEWPv^WIWMF=u@oW`W WWzW WW W"6 PW W"W8W(W uD8+2W82W~Qbt {W=+W\v(W W&6 :W WW.v +EUWVF~狽 t F>9~|~ |?SWDW WvV2=ti2P+3>|+WW WuuWvMu W'(>|+WW W7W_W\$WW$WW$WW$W W$vrWiWW;+WWWWWS# dWW6 W WWWW-0WWeFu9/WW,FFvWvPWv69(FuWZW)WPdt(WcW]W"WU""WW6Wh8MUWV+Wv,8UWV>`W W6 rW WW>9~|~Wv'@PK#F=u?W|W WOvW W>6 uWvu W'>|*+WW WWWlWWW+W'%UWVFVڀ? tڀ? tڀ? t^^u+C%Vڀ?>tڀ?|vW W,WFvv&~v扼 )UWVFU~狽 tE~t~ v+&u)~ H)~ 3uW.3>|W W%t=t+UWV+vvI1|> t> uBRFt2Fv^[FF~9~u^~^?(tVڀ? tڀ? tۋڀ?t͋ڀ?|tƋڊtVڀ?;tڀ? t.~uv(+^~}?+UWV^:Vu~I.F^u+UWVv+FF~9~r N^?/uFFW W+!v~W tƃ>|WW W!vt76*+UWV7WvF=t}>#~Dž F>9~|f)UWV~Wv(}+~u~u5)UWVvt v()UWV$vv<0uu70P1>|+RR Rvv0P&@VR_2>|vR RFvڊ[FFUWVVڀ?(uL)WBRFt9F~9~u^^+lv^[Fvv ؿ!WvF.UWV^RF^VF[;u ~u-~t+UWVn-~uF~uF>|vW Wf+F|WW W +>|WW W Fu>xWWWxW~WxW6=u vq)vܿWv&F=}(W~Wv(v&vv&} vq(vf(+UWVFG~~5vvv%u =u+u v2׋U2UWV~-2^=/t;=~t9 W~W.W~Wx.v~Wk.~Wv.tދFvF^F[t F~|Fvv #UWVvWW(W=t+#>(tFF*Vt6v '+6x ++W++Wv+F=t?*WW Wnv1W W]6 DW WKWeW*WWuvP)6UWV6WvFuJgFuAWWWW =|#WWWvW t*F~~5!(F~9~|U(F~~=u+UWVvWW~W~WF(UWVvW2~G~~~Vڀ?/tvڊ[FF^u݋^~W~W~Wt6~WZ.v~W-~WvUWV 0 ( ) *!+",#-$.%/ &0 'VR^F[t F~~^GUWV>tvv6:# PRWu( W W5FuE* W4qevuuMu5EUWV~VV>=%tG=u9>t+R6R+R6 =u8VVL| * VЉV|GNuFV9VrȋFGUWV~v F~u9?VVL|*G V*PG ËUWV~UWV~UWV~UWV~v8v *PGN^ O|^ ڋF  v v F~7ƙFVvvetEt~t~ t~u~uFƈG^ O|^ 7[* v AЋ+t-t0}iF~ }Uv Pj WZ WWn +WWe =t*FvvvZvB Wjz WWuRWW` G=-uG=0uGW >=.uGW>G+һ..^RTRzNuۊT u FV9VrFUWVPvvUWV~Wv~ W[UWV~WvvBUWV~FA~~}P=-u̓~ 0uNj^ O|^ ڊ*G뫋^ ڊ*G^ O}v *PG:N}(^ O|^ ڋF  v v N9~aƈG^ O|v ^~tV;u+G^ ^ vj.)+RVRvPRVRv^V, +W6W vv6$UWV~W!~W{Fz W W| Wvc ~uuu}GW WvE vv Wv Rpd Rf6 R\66RR 6*[t uv FFGuvVvvV`UWV~vFFGFu= u%= u= u=%t^O}M^7[*~uUWV~UtMeUt(VVFvVREPFEUuI u P` tME 6FV^G(((()()()()()()()()()()()()()(((FUWV~v ^ ~~cu ~0uuFF~suFL| 2 !UWV>t6KWW!UWV~WQ!~WF W WF=tJz W W WP ~uuuqu^RR R R66RR+H6>tBRRIGF=%tF=*tvGFFFF FFGF^ uۃ~uF0u~luGFF#~huF 렺R։UtڀM+҉VV"+։VV~5vVEPFEVF5V9Vt M VUWV~U* VЉVڊ #Ft~uF~cuFE~[u?F8^ #Fu1tVGN~!L| * VЉV~u}GW Wv v Wv vT!UWV~+R6 F}JRVRvFv~~+ ^RR"#?".../Q/=u=u=u=tR%+=tS=u~=tmRGF~[u W4^ tV VF~uVRvvvvv t ~tF~u~tv^O|u8Ut/+։V~$5EvVEP ;Ft M +ҋ UWV~ W;> r UWV~UtDU@uƒ~t~~ VvE^ ^ t;~t~ctG@+UWV~F=^uFG+~t  F|ހ? tF;v|^VRW+ҋ UWVBt5vMuS UWV~t9|u2 UWV> u W=uH=ulP R= ui=uM=um=uFG=du=ou=uu=xuO R=u=uC=uU^7[* vЉV t׃ t҃ t̓uvR}vЉVV9Vud~uYvvpVUWVPu;WkEP }Ut uU tEeE: UWV~u+^+t+^=at=rGց]t~t F F uOUWVv~Wv^W t+UWV W~Wv  W 6 j UWV> t6  K UWV~=:tG=u=tG' UWV> u V V) u6+6;6};+҉V>uډV66vV6 UWV>u>t>t 0vUWV~~ct ~st~[u%vv vv~t^7+R +FVFF~et~fuFF ~ouF ~xuF~FFtU=wuVv[tRRv> F}> u VvlFR+PRv tR+Rv F~}aEt+xUWVFB~~F~W~WvuN| ^+F FP+P8F+UWV~~u3}u-E +6 V8Vt>:W><WW{>WuWh@BD WV>FWI>HW<PR66XǙPR66ku=tW } փ0 փW&UWV64+6> U^ O|^ 7[* v Ћ t؃ tӃ t΃-ufFƈG^ O|^ 7[* v ЋN{~tFV؃FVUtM^?ruMM׋\ UWV~RW ~t|V RW # UWV~ ;> r+UV+Utu95wu95t;UWV~UtMUt U@tVEuM}uUt܊EL>J= tG=u:eUWV~WWvvEUWV~VVN~-M| * W= Ћ|^ƈFWV6(|s"-6>ރ6>UWV>u=6>UWV>u=6Vuv VK^+uAN^ O|)^ ڊ*%.t~ u~tF1v KЋN}} u~ua|u 9܋_UWVF~t1W` FWtvW v9  ~t~9~v)~ ~~FEMu5UtVV5EPEM}%}uMUt eM Et*lUWV~}tUt u u΃} V9Vu+ ^FVUWV~W+PPREPEu5eϊUteUWV~v F~u2>(|s"-6>ރ6>HUWV~+6=*uG =0|=9Gƹ f~ A|FF~u FV/~ u FVFV҉FVFVVFv0| 90a| fW0 ( ) *!+",#-$.%/ &0 '6WWJ Fv UWVWW]N UWV~+v"=99Gƹ ËFGG= t= t=+t=-XQTprocess %s xfile - %s rAERROR - (%s) xfp != NULLCAN'T OPEN %serrno=%d /dev/null/dev/null%.7s%s%s%s%s%sfin - %s> >FtUJt%5tV;wV;r=;w;> t+J>J~F J+RBAD OPEN fileno %derrno=%d AERROR - (%s) f == 1BAD OPEN fileno %derrno=%d /bin/shsh-cstatus %d LTMP.%dAERROR - (J #tظrJ ܋_؉J ã Ë܋_SXs ãJ +ø.܋O_w0L L #t tۍ@t=0}ƒ~t֋ UWVv P UWVVRi <PRFPR_ PR^G[Y+ӉFVVR|F, fout - %s, sysout - %s, user - %s cmd - %s PATH=/bin:/usr/bin; export PATH;%s XQT DENIEDbad command %s %s XQTcmd %s J;vŋJRhu.JV9J롋JRVU  8^߉ ;v H ׃UWV~%s) ret != -1LOCK PROBLEM - %serrno=%d AERROR - (%s) ret != -1LOCK PROBLEM - %serrno=%d AERROR - (%s) ret == 0LOCK PRO0[r u  UPSQRVWF-@PL __^ZY[X]wF/| Jt| Ku\ ㋗ V\ ㋗ VvVVFvVIF~t8;~ ;~u.||(;~| ;~u|}FVVRC/usr/spool/uucp/.XQTDIRexit cmd - %d aAERROR - (%s) dfp != NULLCAN'T OPEN %serrno=%d exit status %d%s/%s/usr/spool/uucp> 55xUWVvVփV>FuFF> V9Vv;r~V 9Vuߋ׃;uցvV;VuBLEM - %serrno=%d AERROR - (%s) i < MAXLOCKSTOO MANY LOCKS %derrno=%d AERROR - (%s) p != NULLCAN NOT ALLOCATE FOR %serr Ӓ܋_#tGË܋_#ø r ܋_ t ã [;p s bP;r&D UWV~v:|u +EE + UWV QRR^GPR FVQRR^GPR /.XFDDIR%s/%s/usr/spool/uucp/.XFDDIR/dev/nullwAERROR - (%s) fp != NULLOPEN %serrno=%d S %s %s %s - %s 0666 rAERROR - VV[96 v6 UWVvDtV@D+ƺFvto;tkv~VBVV9VsVVvno=%d %s.%sLCK.%s.%sLCK./dev/null/dev/null/dev/null-s%.7s/usr/lib/uucp/uucicoUUCICO-r1/dev/null/dev/null/dev/nullp f^_]USWVF y;V u>Rȋv~ } ރV+~yރƋ׍f^_[]øPv~ y Vރ+V FV~|~sQFVn^F4v<PRvv' [F<PRvv6 ^ƙ<Fƙ^7F(%s) xfp != NULLCAN'T OPEN %serrno=%d %s%s/%s/usr/spool/uucp/.XFDDIRrAERROR - (%s) pdir != NULLGTXFILE CAN'T OPEN %s^[FFVNu;s+V;r F+ƺNj؋H8UWV~Wvf}+^/usr/lib/uucp/uuxqtUUXQT/dev/null/dev/null/dev/null%s -r %susr/lib/uucp/uucp/bin/shsh-cy ^ V;| 9~ v+~ F+USWVv ~Ǚ+Fȋƙ+F ȋ+эf^_[]USWVF y;V u.ȋvPRFVpPR @~|0~r(FV;V=|;Fw6Vx)FVF۾F|~sHPWFVN~~6>~>Berrno=%d file - %s is x file rcouldn't open%s %sr%s%s%s/%s/usr/spool/uucp/.XQTDIRr%s%s%s/%s/usr/spool/uucp/.XQTDwgNO+Ë^wFg_^UWVv tWvUWVvtWvUWV~v~GuOGF/usr/spool/uucp/LCK.LOG/usr/spool/uucp/LOGFILEa/usr/sF y+ yڋ™f^_[]Ëv~ yރ+V y^ ;| 9~ v +~ +FyЋV7=nu" + + F9 ~" ^BF^7FD45UWV@ GFu^G Z IRAERROR - (%s) ret == 0LINK RET-%derrno=%d cmd %s, ptr %s xcp calledrwchildr f1 okw f2 ok stat=%o child stat=%uF{UWV~vF:uGu+ZN؊+UWV~v~GFuF)UWV~+FGu UWVpool/uucp/LCK.LOG/usr/spool/uucp/LCK.LOG%s/LOG.%05d.%1d/usr/spool/uucpw%s %s (%d/%d-%d:%02d) %s (%s) /usr/spool/uucp/SYSf^_[]UVvN^#r ^s ]2@altos86Pd{GFGFGFG^^p GFGFGFn^7Wn^dRW~n^dRWhn^o /mkdir %smkdir - %s %c.%.7s%c%.4sfile - %s LCK.SEQLAERROR - (%s) n < SLOCKTRIESCAN NOT GET %sLCK.SEQLerrno=%d /uW WW"UWVW" WWUWV#W* WWWUWV "WPUWV "LOGa%s %s (%d/%d-%d:%02d) %s /etc/systemid/etc/passwdrr/usr/lib/uucp/usr/spool/uucp/usr/lib/uucp/L.sys/usr/lib/uucp/L.sys.cr/usr/lib/uucp/L-devices/usr/lib/uucp/L-dialcodesmaidRWR^ d|E2E0^W dRW+JUWVFun0mUWV~G~ |F 0sr/spool/uucp/SEQFr%4d/usr/spool/uucp/SEQFwAERROR - (%s) fp != NULLCAN NOT OPEN %s/usr/spool/uucp/SEQFerrno=%d /usr/spWxPt!܋_ø ܍O_V6t ;^s r#tã ã+(null)lrmailwholprrnewsuusenduucpsetting to %d %d uucp account is missing. unknown flag %s ** %s ** STARTUser - %s LCK. GF 0GUWVFnFPAu+VBVN}׋UWVvUWVVVool/uucp/SEQF/usr/spool/uucp/SEQFw/usr/spool/uucp/SEQF%s%04dLCK.SEQL/dev/null/dev/nullshio - %s AERROR - (%s) f == 0ø6^%X RUVW~ vN^_^]s Ó ܋_0 ( ) *!+",#-$.%/ &0 '  360 3142671160 6762 **(usr/lib/font/ftCE 644 3 3 M:/Day Mon 00 00:00:00 1900 SunMonTueWedThuFriSatJanFebMarAprMayJunJulAugSepOctNovDecFF  *2*<*F*\*f*p*z*3)8    ڛ R˔TRQ $$ 360 3142671160 7063  AAAAAABBBBBB atof:fltrd: Flousr/lib/font/ftC 644 3 3    ating Point Not Present L(null)  $ $ݚ UʕVVT$$$"" 360 3142671160 6756  AAAAAABBBBBB**usr/lib/crontab 644 3 3    ****2*<*F*P*3f)8p t     ښ T̔SST$  216 3142671160 6724  AAAAAABBBBBB**usr/lib/font/ftCK 644 3 3   ****2*<*F*P*3f)8p t    ґ NȎOO  N  $$ 360 3142671160 7071  AAAAAABBBBBB**usr/lib/font/ftCI 644 3 3    ****2*<*F*P*3f)8p t 0,10,20,30,40,50 * * * * /etc/dmesg - >>/usr/adm/messages 0,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/lib/atrun 20 1 * * * /b 360 3142671160 7067  AAAAAABBBBBB**usr/lib/font/ftG 644 3 3 in/calendar - ****2*<*F*P*3f)8p tt9> 0 ( ) *!+",#-$.%/ &0 '    ܝ S͕TTT$! 360 3142671160 6764  AAAAAABBBBBB**usr/lib/font/ftGI 644 3 3   ****2*<*F*P*3f)8p t    ޚ W˖ WWU$ && 360 3142671160 7073  AAAAAABBBBBB**usr/lib/font/ftCW 644 3 3    ****2*<*F*P*3f)8p t   $ $ۛ QɓQR P $$ 360 3142671160 7105  AAAAAABBBBBB**usr/lib/font/ftCS 644 3 3   ****2*<*F*P*3f)8p t   $ $ݚ Vʔ VV S$$$"" 360 3142671160 7101  AAAAAABBBBBB**usr/lib/font/ftGR 644 3 3    ****2*<*F*P*3f)8p t ٙYٙYYY 360 3142671160 7104  AAAAAABBBBBB**usr/lib/font/ftGM 644 3 3   ****2*<*F*P*3f)8p t    ۛ UΖ TTT $$  360 3142671160 7077  AAAAAABBBBBB**usr/lib/font/ftI 644 3 3    ****2*<*F*P*3f)8p t 0 ( ) *!+",#-$.%/ &0 '    ޝ UҕUUX&" 360 3142671160 7074  AAAAAABBBBBB**usr/lib/font/ftR 644 3 3    ****2*<*F*P*3f)8p t     ݚ T̖ VTU$ "" 360 3142671160 6775  AAAAAABBBBBB**usr/lib/font/ftL 644 3 3    ****2*<*F*P*3f)8p t     ݙ S˔ UST$!!  360 3142671160 6767  AAAAAABBBBBB**usr/lib/font/ftLI 644 3 3    ****2*<*F*P*3f)8p t   $  $ۛ Rɔ SSR $$  360 3142671160 7100  AAAAAABBBBBB**usr/lib/font/ftPI 644 3 3   ****2*<*F*P*3f)8p t     ܘ UɓUU R $ 360 3142671160 7104  AAAAAABBBBBB**usr/lib/font/ftPB 644 3 3   ****2*<*F*P*3f)8p t   $  $ܘ VɔVV R $$!! 360 3142671160 7075  AAAAAABBBBBB**usr/lib/font/ftPA 644 3 3   ****2*<*F*P*3f)8p t 0 ( ) *!+",#-$.%/ &0 '    ۙ P̐RPS$ 360 3142671160 7107  AAAAAABBBBBB**usr/lib/font/ftBC 644 3 3    ****2*<*F*P*3f)8p t     ۗ UʔUUT $  360 3142671160 7060  AAAAAABBBBBB**usr/lib/font/ftS 644 3 3    ****2*<*F*P*3f)8p t     ژ SʒSS R $ 360 3142671160 6776  AAAAAABBBBBB**usr/lib/font/ftSB 644 3 3   ****2*<*F*P*3f)8p t    ѐ  Mnj MM  L  $  360 3142671160 7100  AAAAAABBBBBB**usr/lib/font/ftUD 644 3 3    ****2*<*F*P*3f)8p t  $$$ 360 3142671160 7104  AAAAAABBBBBB**usr/lib/font/ftSM 644 3 3  WW YUVR$$$$$$$$$$$$$$$"**)   ****2*<*F*P*3f)8p t       ݛ UʕUUV $ %% 360 3142671160 7113  AAAAAABBBBBB**usr/lib/font/ftSI 644 3 3    ****2*<*F*P*3f)8p t 0 ( ) *!+",#-$.%/ &0 '      ۓ TɒTT R$ Here is a short C program that prints out a line containing "hello". Type it in and compile it. Call it anything you want but AAAAAABBBBBB**ash is \\ Compile it, test it, then type ready. #once #create Ref A tab is \t A backspace is \b A quote is \" A backslash is \\usr/lib/learn/C.a 644 3 3     don't rename the output. When done, type "ready". main() { printf("hello\n"); } #once #create Ref hello #user a.out >x #cmp x****2*<*F*P*3f)8p t  #user a.out >x #cmp x Ref #succeed One solution: main() { printf("A tab is \\t\n"); printf("A backspace is \\b\n"); printf( 143602 3142671160 7065  AAAAAABBBBBB** Ref #log #next 1.1b 10 L1.1b +#print (Section 1.1) Now write a C program that prints two lines, the first ofusr/lib/font/ftB 644 3 3 "A quote is \\\"\n"); printf("A backslash is \\\\\n"); } #fail Watch out for those backslashes. #log #next 1.1e 10 L1.1e****2*<*F*P*3f)8p t  which says "hello" and the second "goodbye". Don't forget those \n delimiters. Compile and test it. When satisfied, type "rea 360 3142671160 6755  #print What will be printed by the following printf statement? printf("\"#@\""); Type "answer XXX", where XXX iusr/lib/font/ftXM 644 3 3 dy". #once #create Ref hello goodbye #user a.out >test #cmp test Ref #succeed Here is one possible solution to compare against ys the set of characters that will be printed. #copyin #user #uncopyin #match "#@" #log #next 1.1f 10 tL1.1f  eL0#next 0.1a 10 L0.1aU #print This script is loosely based on the material in "The  360 3142671160 7120 ours. main() { printf("hello\n"); printf("goodbye\n"); } You could also combine the two messages into one call to printf, li#print (Section 1.2) Write a program to print the value of the character 'X' in octal. Compile it and run it. Then type ready. C Programming Language", by Brian Kernighan and Dennis Ritchie (Prentice-Hall, 1978). You may find it helpful to have that at hake printf("hello\ngoodbye\n"); but this is harder to read at a glance. #log #next 1.1c 10 tL1.1c #print (  $   $ݜ R̗ TSS$$!!#user a.out >test grep 130 test >/dev/null #succeed A possible solution: main() { printf("%o\n", 'X'); } #log #next 2.1a 10 L1nd. Some of the lessons will indicate the section that they are based on. Do you have a copy at hand? Answer yes or no. #copyiSection 1.1) The program in Ref.c has an error in it. Find it, fix it, and run it. Then type ready. #once #create Ref.c main() {   0G w#print The lessons from this point on are from the old C script. They have not been cleaned up as much an #user #uncopyin #match yes Fine. #fail It might help, but it's not critical. #log #next 1.1a 10 L1.1a #pri    ݙ W̖ WWV &!!!"" printf("hello\"); } #once #create Ref hello #user a.out >x #cmp x Ref #log #next 1.1d 10 fL1.1d #print (Se AAAAAABBBBBB**s they could, so some are not very illuminating, and the code they illustrate is not always the best. You're welcome to try themnt (Section 1.1) The way you compile a C program is to say cc name.c where name.c is the name of the file the program is on.    ction 1.1) Write a program which prints these four lines, exactly as shown: A tab is \t A backspace is \b A quote is \" A backsl****2*<*F*P*3f)8p t 0 ( ) *!+",#-$.%/ &0 ' nonetheless, but be warned. If you want to proceed, type yes; otherwise, type bye. #copyin #user #uncopyin #match yes #next 11ain station south orange maplewood millburn short hills summit chatham madison convent station morristown new providence murray ill read digits from the standard input, convert them to binary, and return an integer value. Write a program which reads an in5.1a 10 L14.2a8F #print Using the "getnum" routine on "getnum.o", write a program that reads a list of positiveber is >100 and <=1000 huge if the number is >1000. Type "ready" when you're done. #once cp %s/getnum.o . #once cp %s/getnum.c .1a 10 11.2a 5 sL11.1a P #print With your 'cc' command you can give the name of an object file to be loaded withill berkeley heights gillette stirling millington lyons basking ridge bernardsville far hills peapack gladstone #user a.out te numbers and prints their sum. Stop reading numbers when "getnum" returns a negative or zero value. Compile and test your progr. #once #create Ref 1001 1000 999 101 100 1 #once #create Ref1 huge big big big small small #user a.out test #cmp Ref1 tesh your program. For example cc x.c y.o will load the previously compiled program 'y' along with the program 'x' to be compilef >x1 a.out x2 grep 348 x1 >/dev/null && grep 45 x2 >/dev/null #succeed #include /* One way: */ main() { intst grep 376 test >/dev/null #succeed /* One way: */ main() { printf("%o\n", getnum()); } #log #next 11.1a 10 L12.1aam; then type "ready". #once #create Ref 5 43 293 400 75 832 903 33 #once cp %s/getnum.o . #user a.out xxx grep 2584 xxx >t #succeed /* One way:*/ main() { int n; while ((n = getnum()) >= 0) if (n > 0 && n <= 100) printf("small\n"); else id now. The file "getnum.o" contains a subroutine "getnum" which reads an integer and returns its value. Write a program which r nchar, nspace; char c; nchar = nspace = 0; while ((c = getchar()) != EOF) { nchar++; if (c == ' ' || c == '\t' || c ==  P C#print Write a program which reads two numbers and prints the larger one in decimal. Use the same "getnum" subroutine./dev/null #succeed /* Read numbers and count */ main() { int s, n; s = 0; while ((n=getnum()) > 0) s += n; printf("Sum isf (n > 100 && n <= 1000) printf("big\n"); else if (n > 1000) printf("huge\n"); } /* Notice that in principle n could beads a number and decides whether or not it is a multiple of 23. If so print "yes" and otherwise print "no". Compile and test; '\n') nspace++; } printf("spaces = %d, chars = %d\n", nspace, nchar); } #log #next 14.1a 10 14.2a 5 L14.1aP  Compile, test and type "ready" as usual. #once #create Ref1 14039 89 #once #create Ref2 20022 23001 #once cp %s/getnum.o . #us %d\n", s); } #log #next 14.2b 5 15.1a 10 L14.2b #print Write a program which counts the number of five lettee negative, so we need the last case to say else if (n > 1000) instead of just falling into it with a bare else Also it'then type "ready". #once #create Ref1 23000 #once #create Ref2 23001 #once cp %s/getnum.o . #user a.out z1 a.out z#print Using the familar "getnum.o" routine write a program that reads numbers one per line and determines for each if it iser a.out x1 a.out x2 grep 14039 x1 >/dev/null && grep 23001 x2 >/dev/null #succeed /* One way: */ main() { int nr words in its input (define a word as anything between blanks, tabs or newlines). Compile and run it, then type "ready". Note s a good idea to indent the else-if's exactly the way they are here; otherwise you'll lose track of what's going on. **/ #log 2 grep yes z1 >/dev/null && grep no z2 >/dev/null #succeed /* One way: */ main() { if (getnum()%23 == 0) printf("yes\n"); e prime. Print "prime" for a prime number and "composite" for a non-prime number. Compile, test, and type "ready". #once #create 1, n2; n1 = getnum(); n2 = getnum(); printf("%d\n", n1 > n2 ? n1 : n2); } /* You could also use something like if (n1 > nthat all that is wanted is the total number of five letter words - nothing was said about distinct words. Just count the number#next 13.1a 10 nL13.1aP #print Write a program which reads its input and counts the number of characters and tlse printf("no\n"); } #log #next 12.1a 10 L11.2a#print With your 'cc' command you can give the name of an Ref 10039 17947 #once #create Ref1 prime composite #once cp %s/getnum.o . #user a.out x1 #cmp x1 Ref1 #succeed /* A slow b2) printf("%d\n", n1); else printf("%d\n", n2); */ #log #next 12.1b 10 rL12.1bP '#print The function getn of times exactly five characters appear between spaces. #once #create Ref This is a passage of text which contains exactly twelhe number of spaces (where a space is either a blank or a tab or a newline). Print both numbers. Compile, test, and type "readyobject file to be loaded with your program. For example cc x.c y.o will load the previously compiled program 'y' along with tut sure prime-tester */ main() { int p, i, comp; while ((p = getnum()) >= 0) { comp = 0; for (i = 2; i*i <= p; i++) ifum actually returns -1 when it encounters end of file. (The source is in getnum.c if you're interested.) Write, compile and run ve words of five letters. Words may appear at the start or at the final part of a line. Other words show up in the middle. Avo". #once #create Ref hoboken harrison newark roseville avenue grove street east orange brick church orange highland avenue mounthe program 'x' to be compiled now. There is a file in this directory named "getnum.o" that contains a subroutine "getnum" that w (p%i == 0) { comp = 1; break; } if (comp) printf("composite\n"); else printf("prime\n"); } } #log #next 1a program that reads numbers one per line with getnum and, for each, prints: small if the number is >0 and <=100 big if the num0 ( ) *!+",#-$.%/ &0 'id counting seven or eight letters but every five must be noted. #user a.out xxx grep 12 xxx >/dev/null #succeed /* one waurn short hills new providence murray hill berkeley heights bernardsville far hills peapack gladstone #once #create badin hobokeld be at the end). Thus the line cat food should come out as doof tac Compile it and run it, then type "ready". #once #create ReNature's God entitle them, a decent respect to the opinions of mankind requires that they should declare the causes which impel e highland avenue east orange brick church orange highland avenue mountain station south orange maplewood millburn short hills sy to count five letter words */ #include main() { int since, wdnum, c; since = 0; while ((c=getchar()) != EOF) n harrison newark roseville avenue grove street east orange brick church orange highland avenue mountain station south orange maf1 This is odd. This is even. #once #create Ref2 .ddo si sihT .neve si sihT #once cp %s/getline.o . #user a.out x1 #cmpthem to the separation. We hold these truths to be self evident, that all men are created equal, that they are endowed by theiummit chatham madison convent station morristown summit chatham madison convent station morristown summit chatham madison conven{ if (c == ' ' || c == '\t' || c == '\n') { if (since == 5) wdnum++; since = 0; } else since++; } printf("%plewood millburn short hills summit chatham madison convent station morristown new providence murray hill berkeley heights gille x1 Ref2 #succeed /* one way to do this */ #include main() { char line[500]; int n; while ((n = getline(line, 5r creator with certain unalienable rights, that among these are life, liberty, and the pursuit of happiness. That to secure thet station morristown new providence murray hill berkeley heights gillette stirling millingon lyons basking ridgexxxxxxxxxxxxxxxd\n", wdnum); } #log #next 15.1a 10 L15.1aP #print Write a program that reads in lines one at a time, and printte stirling millington lyons basking ridge bernardsville far hills peapack gladstone #once cp %s/getline.o . #user a.out 0) { for (n -= 2; n >= 0; n--) putchar(line[n]); putchar('\n'); } } #log #next 17.1a 10 16.2a 5 L16.2ase rights, governments are instituted among men, deriving their just powers from the consent of the governed. That whenever anyxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx bernardsville far hills peapack gladstone #user a.out xxx #cmp Ref xxx #succeed /* a way to find lines with 'p' */ #include main() { char line[500]; int k; while (P #print Write a program which reads a file with lines of up to 200 characters and shortens them to 60 characters by thr form of government becomes destructive of these ends, it is the right of the people to alter or to abolish it, and to institute>xxx #cmp Ref xxx #succeed /* one way to do this */ #include main() { char line[61]; int c, k; k = 0; while ((getline.o. Compile and run it, then type "ready". #once #create Ref1 this line contains an odd number of letters! this line, howgetline(line, 500) > 0) for (k = 0; line[k] != '\0'; k++) if (line[k] == 'p') { printf("%s", line); break; } } #owing away any characters past the first 60. Compile and test it; then type "ready". #once #create Ref hoboken harrison newark r new government, laying its foundation on such principles and organizing its powers in such form, as to them shall seem most likc = getchar()) != EOF) { if (c == '\n') { line[k] = 0; printf("%s\n", line); k = 0; } else if (k < 60) line[k+ever, contains an even number of letters! #once #create Ref2 this line contains an odd number of letters! #once cp %s/getline.o log #next 16.2c 5 17.1a 10 sL16.2cP #print Write a program to read its input and find the word in it with the oseville avenue grove street east orange brick church orange highland avenue east orange mountain station south orange maplewooely to effect their safety and happiness. #user a.out xxx grep unalienable xxx >/dev/null #succeed /* a way to find a word+] = c; } } /* Note that this version works regardless of how long the lines are. If you use getline, is the same thing true?. #user a.out x1 #cmp x1 Ref2 #succeed /* It's certainly easiest with getline: */ #include main() { char lmost vowels (instances of a,e,i,o, or u). Print out that word. Compile and test your program, then type ready. #once #create Refd millburn short hills summit chatham madison convent station morristown summit cha new providence murray hill berkeley heights  with lots of vowels */ #include main() { char bigword[100], thisword[100]; int nvow, maxvow, c, k; maxvow = k ? */ #log #next 16.2b 10 L16.2bFF #print Write a program which copies all lines containng the letter 'p' from ine[500]; int n; while ((n = getline(line, 500)) > 0) if (n % 2 == 1) printf("%s", line); } #log #next 15.1b 10 L15.1b When in the course of human events, it becomes necessary for one people to dissolve the political bands which have connected th gillette stirling millingon lyons basking ridgexxxxxxxxxxxxx bernardsville far hills peapack gladstone #once #create badin hobo= 0; while ((c = getchar()) != EOF) { if (c == '\n' || c == ' ') { if (nvow > maxvow) { copy(thisword, bigword, k); its input to its output. Compile and test it; then type "ready". #once #create Ref mountain station south orange maplewood millbAF ]#print Write a program that reads in lines, and prints each out in reverse order (except that the newline shouem with another, and to assume among the powers of the earth the separate and equal station to which the laws of Nature and of ken harrison newark roseville avenue grove street east orange brick church orange highland avenue east orange brick church orang0 ( ) *!+",#-$.%/ &0 ' maxvow = nvow; } nvow = k = 0; } else { thisword[k++] = c; switch (c) { case 'a': case 'e': case 'i': case 'o 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765 10946 17711 #user a.out >xxx separation. We hold these truths to be self evident, that all men are created equal, that they are endowed by their creator wig #next 19.1a 10 yL19.1a$ #print Write a subroutine which counts the number of times it has been called and rehts, that among these are life, liberty, 11 and the pursuit of happiness. That to secure these rights, 12 governments are ins': case 'u': nvow++; } } } printf("the word %s had %d vowels\n", bigword, maxvow); } copy(a, b, n) char a[], b[]; { #cmp xxx Ref #succeed /* one way */ main() { int f1, f2, t, count; f1 = 1; f2 = 1; for (count = 0; count < 20; count++) { th certain unalienable rights, that among these are life, liberty, and the pursuit of happiness. That to secure these rights, gturns that count each time. Name it "count()". Write it on a file named "count.c". Compile and test it; type "ready" when haptituted among men, deriving their just 13 powers from the consent of the governed. That whenever 14 any form of government be int i; for(i = 0; i < n; i++) b[i] = a[i]; b[i] = 0; } #log #next 17.1a 10 rL17.1aP  #print Write in a pr t = f1+f2; f1 = f2; f2 = t; printf("%5d\n", t); } } #log #next 18.1a 10 L18.1aP #print There is nothovernments are instituted among men, deriving their just powers from the consent of the governed. That whenever any form of govpy. #once #create Ref 23080 #once #create tzaqc.c main() { int i; for (i = 0; i < 23079; i++) count(); printf("%d\n", countcomes destructive of these ends, 15 it is the right of the people to alter or to abolish it, and 16 to institute new governmenogram which reads its input and writes it out line numbered, with a three-digit line number (starting at one) followed by a singing to force you to write a main program on each file; just as I supplied "getnum" on a separate file, you can put different rouernment becomes destructive of these ends, it is the right of the people to alter or to abolish it, and to institute new governm()); } #user cc tzaqc.c count.o a.out >value #cmp value Ref #succeed /* one way */ count() { static int n = 0; return(++n); t, laying its foundation on such 17 principles and organizing its powers in such form, as to them 18 shall seem most likely tole space and then by the original line. Note: the printf format specification %3d will print a three digit number. You might trytines on different files. Write a function "length(s)" which if given a character array argument "s" returns the length of thatent, laying its foundation on such principles and organizing its powers in such form, as to them shall seem most likely to effec} #log #next 30.1a 10 20.1a 5 L2.1a #print (Section 1.2) The file Ref.c contains a copy of a program to conv effect their safety and happiness. #user a.out xxx #cmp xxx reffed #succeed #include main() { char s[200] the function fgets (part of the standard library). fgets(buf, size, stdin) reads from the terminal ("stdin") up to size charac string. Put this on a file named "length.c", and leave the object file in "length.o". Write the main program for testing this st their safety and happiness. #once #create reffed 1 When in the course of human events, it becomes 2 necessary for one peopert Fahrenheit to Celsius. Modify it to print this heading at the top: Fahrenheit-Celsius Conversion F: C: Type ready when; int k; k = 0; while (fgets(s, 200, stdin) != NULL) printf("%3d %s", ++k, s); } #log #next 18.1a 10 17.1c 5 gL17.1cters into buf. It returns NULL on end of file. Compile and test your program; then type "ready". #once #create Ref When in theomewhere else. Type "ready" when you have compiled and tested your program and are happy with it. #once #create Ref This file cle to dissolve the political bands which have 3 connected them with another, and to assume among the 4 powers of the earth  you're satisfied. #once #create Ref Fahrenheit-Celsius Conversion F: C: 0 -17.8 20 -6.7 40 4.4 60 15.6  #print Print the 20 Fibonacci numbers beginning with 2 (the sequence is 2,3,5,8,... where each number is the sum o course of human events, it becomes necessary for one people to dissolve the political bands which have connected them with anotontains several lines of quite different lengths. You should get all of them exactly r right. #once #create answer 60 0 14 19 1the separate and equal station to which 5 the laws of Nature and of Nature's God entitle them, a decent 6 respect to the opi 80 26.7 100 37.8 120 48.9 140 60.0 160 71.1 180 82.2 200 93.3 220 104.4 240 115.6 260 126.7 280 137f the immediately preceding pair of numbers. Start with the pair 1,1). Print each number on a separate line as a five digit numbher, and to assume among the powers of the earth the separate and equal station to which the laws of Nature and of Nature's God 6 #once #create tzaqc.c main() { char s[200]; while (gets(s)) printf("%d\n", length(s)); } #user cc tzaqc.c length.c a.outnions of mankind requires that they should 7 declare the causes which impel them to the separation. 8 We hold these truths.8 300 148.9 #once #create Ref.c /* print Fahrenheit-Celsius table for f = 0, 20, ..., 300 */ main() { int lower, upper, ster (remember %3d in printf? %5d does five digits). Compile and test your program; then type "ready". #once #create Ref 2  entitle them, a decent respect to the opinions of mankind requires that they should declare the causes which impel them to the  value #cmp value answer #succeed /* one way */ length(s) char *s; { int k; for (k=0; s[k]; k++) ; return(k); } #lo to be self evident, that all men 9 are created equal, that they are endowed by their creator 10 with certain unalienable rig0 ( ) *!+",#-$.%/ &0 'ep; float fahr, celsius; lower = 0; /* lower limit of temperature table */ upper = 300; /* upper limit */ step = 20; /* ste #create Ref 300 148.9 250 121.1 200 93.3 150 65.6 100 37.8 50 10.0 0 -17.8 #once #create Ref.c /* print Faopyin #match %3.1f #fail Look again - it's %% #log #next 2.1e 10 gL2.1e #print Is there any difference betweo a null-terminated string, and the second is a character 'c' which is to be searched for in the string 's'. If the character 're to find it - it is only marginally more code than a bubble sort and much faster (n**1.5 vs. n**2) in time. */ shellsortp size */ fahr = lower; while (fahr <= upper) { celsius = (5.0/9.0) * (fahr-32.0); printf("%4.0f %6.1f\n", fahr, celsius)hrenheit-Celsius table for f = 0, 20, ..., 300 */ main() { int lower, upper, step; float fahr, celsius; lower = 0; /* loween printf("%s", s); and printf(s); Answer yes or no. #copyin #user #uncopyin #match yes #fail Consider the string "50%c' does not appear in the string return 0; otherwise return a pointer to the position of 'c' in the string. Name the program "lo(v, n) /* sort v[0]...v[n-1] into increasing order */ int v[], n; { int gap, i, j, temp; for (gap = n/2; gap > 0; gap ; fahr = fahr + step; } } #user a.out >x #cmp Ref x #fail Make sure you get the spacing right. #log #next 2.1b 10 7L2.1br limit of temperature table */ upper = 300; /* upper limit */ step = 20; /* step size */ fahr = lower; while (fahr <= uppe of the answers are wrong." #log #next 3.1a 10 L20.1aP 0#print Write a program to read a list of positive numbcn.c"; as usual, compile and test it and then type "ready". #once #create Ref 0 19 0 25 0 #once #create tzaqc.c char *alpha "abc/= 2) for (i = gap; i < n; i++) for (j=i-gap; j>=0 && v[j]>v[j+gap]; j-=gap) { temp = v[j];  #print (Section 1.2) Write a C program that prints a number which is the sum of three numbers: 23, 197, and the r) { celsius = (5.0/9.0) * (fahr-32.0); printf("%4.0f %6.1f\n", fahr, celsius); fahr = fahr + step; } } #user a.out >x #cers and sort them into ascending order. Print the sorted list of numbers one per line as five digit numbers (%5d in printf). Stdefghijklmnopqrstuvwxyz"; main() { extern char *locn(); printf("%d\n", locn(alpha, '+')); printf("%d\n",locn(alpha, 't')-alph v[j] = v[j+gap]; v[j+gap] = temp; } } printlist(list, n) int list[], n; { int i; product of 23 and 197. Again, compile and test it. Please do the computation with the program - if you do it by hand, I'll givmp Ref x #succeed Here's our solution: main() /* Fahrenheit-Celsius 300 ... 0 by 50 */ { int lower, upper, step; float fahr; op reading numbers when getnum returns -1. Compile and test your program; then type "ready". #once #create Ref 1 3 4a); printf("%d\n",locn(alpha, 'a')-alpha); printf("%d\n",locn(alpha, 'z')-alpha); printf("%d\n",locn("", 'z')); } #user cc tzfor(i=0; itest grep 4751 test >/dev/null #succeed /* Here is one possible so lower = 0; /* lower limit of temperature table */ upper = 300; /* upper limit */ step = 50; /* step size */ for (fahr = up 9 11 12 13 14 15 16 17 20 34 71 200 225 250 275 300 4095 7111 16384 #once cp %s/gaqc.c locn.o a.out >value #cmp value Ref #succeed /* Try this: */ char * locn (s, c) char *s; { for( ; *s; s++) if (*s == croblem but can not be recommended for large jobs. sortlist() { int i, j, k; for(i=0; i0; j--) lution */ main() { printf("%d\n", 23 + 197 + 23*197); } #log #next 2.1c 10 7L2.1c #print (Section 1.2) Whaper; fahr >= lower; fahr = fahr - step) printf("%4.0f %6.1f\n", fahr, (5.0/9.0) * (fahr-32.0)); } #log #next 3.1b 10 rL3.1betnum.o . #once #create input 4 20 3 200 16384 4095 71 11 12 13 14 15 16 17 34 9 7111 300 275 250 225 1 #user a.out xxx) return(s); return(0); } #log #next 31.1a 10 L31.1aP #print Write a function named "rev(s)" which reverseif (list[j-1] > list[j]) { k = list[j]; list[j] = list[j-1]; list[j-1] = k; } } ****/ #log #next 30.1a 10 L3.1at value is printed by this printf statement? printf("%.3f", 3.141592654); Type "answer XXX", where XXX is the value. #copyin   #print What is the value of i after this ___for statement executes? Type "answer N", where N is the value o #cmp xxx Ref #succeed main() { int n; int list[1000]; n = getlist(list); shellsort(list, n); printlist(list, n); } getlis the string "s" in place. Name the file that contains the function "rev.c". When you're satisfied, type "ready". #once #create  c#print (Section 1.3) The file Ref.c contains a copy of a program to convert Fahrenheit to Celsius that print#user #uncopyin #match 3.142 #fail Remember about rounding? #log #next 2.1d 10 L2.1d #print What value is pf i. for (i = 0; i < 10; i = i + 3) ; #copyin #user #uncopyin #match 12 #log #next 4.1a 10 pL30.1aP st(list) int list[]; { int n; n = 0; while ((list[n]=getnum()) >= 0) n++; return(n); } /* this is a shell sort, strippedRef cbax0987654321 #once #create tzaqc.c main(){ char *s1, *s2, *s3, *s4; s1 = "abc"; s2 = "x"; s3 = ""; s4 = "1234567890";s from 0 to 300 degrees in steps of 20. Modify it to print from 300 down to 0 in steps of 50. Type ready when you're done. #oncerinted by this printf statement? printf("%%3.1f", 3.141592654); Type "answer XXX", where XXX is the value. #copyin #user #unc#print Write a subroutine named "locn(s,c)" which expects two arguments: the first is a pointer to characters 's' which points t down to process a list of integers only. Although you probably don't know how to write this offhand, you should know whe0 ( ) *!+",#-$.%/ &0 ' rev(s1); rev(s2); rev(s3); rev(s4); printf(s1); printf(s2); printf(s3); printf(s4); printf("\n"); } #user cc tzaqc.c r its argument and prints one of the following messages: n message (follow it by a newline) 1 ? 2 syntax ernd test it as usual. Then type "ready". #user a.out abc bcd efg rpq b bbvd >xxx grep 3 xxx >/dev/null #succeed /* a possible stself. Loop anding x and x-1 until you get zero. Program either algorithm. Compile and test it. Leave it on a file bitct.c andn is odd return x*power(x,n-1). 3. if n is even return the square of power(x,n/2). You may assume than x and n are integersev.o a.out >value #cmp value Ref #succeed /* One way:*/ rev (s) char *s; { char *p; int t; for (p=s; *p; p++) ; for (p-ror 3 bad syntax error 4 fatal error 5 I give up. anything else eh? Leave the routine on errmess.c, compolution */ main(argc, argv) char *argv[]; { int i, k; for(i=k=0; i=0. If n is negative return 0 for an answer. Put your routine on a file "power.c". Compile it and test it; then type "ready-; p > s; p--, s++) { t = *p; *p = *s; *s = t; } } #log #next 32.1a 10 L32.1aP #print Write a program iled and tested as usual. Then type "ready". #once #create Ref eh? eh? I give up. fatal error bad syntax error syntax error ? #, k); } #log #next 37.1a 10 L35.1a' #print Write a program which prints the number of vowels (instances of 'a' goodct(x)) return(1); x=16384; if (bitct(x) != goodct(x)) return(1); x = -1; if (bitct(x) != goodct(x)) return(1);". #once #create tzaqc.c main() { if (power(-1,-1) != 0) return(1); if (power(-3,2) != 9) return(1); if (power(2,12) !=  pair(a,b) which accepts as arguments two pointers to integers and swaps the integers if necessary so that the first argument ponce #create tzaqc.c main() { errmess (23069); errmess (-2000); errmess (5); errmess (4); errmess (3); errmess (2); errme, 'e', 'i', 'o', and 'u') in the input. #once #create Ref hoboken harrison newark roseville avenue grove street east orange bric x= -200; if (bitct(x) != goodct(x)) return(1); return(0); } goodct(x) { int k, i; for(k=i=0; i<16; i++) { k =+ (x&14096) return(1); if (power(3,5) != 243) return(1); if (power(-5, 5) != -3125) return(1); if (power(7,3) != 343) oints to the larger one; that is int x,y; x = 9; y = 15; pair( &x, &y); results in x being 15 and y 9. Leave the program onss (1); } #user cc tzaqc.c errmess.o a.out >xxx #cmp Ref xxx #succeed /* a possible solution */ char *message[] = { "eh?", "?k church orange highland avenue mountain station south orange maplewood millburn short hills summit chatham madison convent stat); x= x>>1; } return(k); } #user cc tzaqc.c bitct.o a.out #succeed /* a possible solution */ bitct(x) { int k, i; for(ireturn(1); if (power(7,4) != 2401) return(1); if (power(3,7) != 2187) return(1); if (power(2,10) != 1024) return(1); file "pair.c"; compile, test it, and type "ready". #once #create tzaqc.c main() { int x,y; y=200; x = 0; pair(&y, &x); if", "syntax error", "bad syntax error", "fatal error", "I give up.", }; errmess(n) { if (n < 0 || n > 5) n = 0; printf("ion morristown new providence murray hill berkeley heights gillette stirling millington lyons basking ridge bernardsville far hi=k=0; i<16; i++) { if (x&1) k++; x >>= 1; } return(k); } /* by the way, if you really care about this problem a table l return(0); } #user cc tzaqc.c power.o a.out #succeed /* a possible solution */ power(x, n) { int k; if (n < 0) return(0) (x != 0 || y != 200) return(1); pair(&x,&y); if (x != 200 || y != 0) return(1); x = 30; y = 23097; pair(&x,&y); if %s\n", message[n]); } #log #next 41.1a 10 L41.1aP #print The problem is to produce a function bitct(x) which lls peapack gladstone #user a.out xxx grep 109 xxx >/dev/null #succeed /* a possible solution */ #include maookup by whole bytes is faster */ #log #next 42.1a 10 L42.1aP #print Write a function inprod(a,b,n) that com; if (n == 0) return(1); if (n%2 == 1) return(x * power(x, n-1)); k = power(x, n/2); return(k*k); } #log #next 40.1a 10 (x != 23097 || y != 30) return(1); return(0); } #user cc tzaqc.c pair.o a.out #succeed pair(a, b) int *a, *b; { int t; examines the bits in x, returning a count of the number of 1-bits. There are various ways of doing this job: here are two. (1) in() { int k, c; k = 0; while ((c = getchar()) != EOF) switch (c) { case 'a': case 'e':case 'i': case 'o': case 'u': putes the inner product of two integer vectors a and b which are n items long. Name the file "inprod.c" and compile and test itL4.1a$ #print Does the # of a "#define" statement absolutely have to go in column 1? Answer yes or no. #copyif (*a <= *b) { t = *a; *a = *b; *b = t; } } #log #next 33.1a 10 L33.1aP #print Write a main program wha sane way. Shift the word x right 16 times (you are on UNIX) and check the rightmost bit each time, counting the number of timk++; break; } printf("%d\n", k); } #log #next 37.1a 10 L37.1aP (#print Let's try a recursive function. ; then type ready. You may assume that the result and all intermediate values fit in a 16-bit integer, not usually a safe assumpin #user #uncopyin #match yes #log #next 5.1a 10 (L40.1a() ^#print Write a subroutine errmess(n) which looks atich counts the number of command-line arguments it has which begin with the letter 'b'. Print the result in decimal. Compile aes it is '1'. (2) a machine-independent (sort of) way. The logical bitwise AND of x and x-1 contains one fewer one bit than x iWrite a subroutine power(x,n) which computes x to the power n by the following algorithm: 1. if n is zero return 1. 2. if 0 ( ) *!+",#-$.%/ &0 'tion. #once #create tzaqc.c main() { int x[100], y[100]; int k; for(k=0; k<100; k++) { x[k] = k%10; y[k] = (k*k)%3;  solution: main() { printf("%o\n", getchar()); } Remember that you can use a function value almost any place that you couldt(a), b) > eps) exit(1); a = 0.; b = 0.; if (reldif(cubrt(a), b) > eps) exit(1); a = 1e6; b = 1e2; if (reldif(cubrt(nce #create Ref This is some junk that contains blanks tabs and newlines. #user a.out test1 a.out test2 gre) { y = myexp(x); if (reldif(x, log(y)) >1.e-5) return(1); } return(0); } exp() { printf("Cheat! you called the system ro } if (inprod(x,y,100) != xprod(x,y,100)) return(1); return(0); } xprod(x,y,n) int *x, *y; { int k, sum; for(sum=k=0; k< use a variable like x. Thus many times there's no need for extra variables. #log #next 5.1c 10 5.2b 5 L5.1c+ a), b) > eps) exit(1); exit(0); } #user cc tzaqc.c cubrt.o reldif.c a.out #succeed /* one way */ double cubrt(x) double x; { p 13 test1 >/dev/null && grep 0 test2 >/dev/null #succeed One possible solution: #include main() { int n, c; n utine\n"); return(1.2); } #user cc tzaqc.c myexp.o reldif.c a.out #succeed /* one way */ double myexp(x) double x; { double tern; k++) sum=+ *x++ * *y++; return(sum); } #user cc tzaqc.c inprod.o a.out #succeed /* one way */ inprod(a, b, n) int *a, *b`#print (Section 1.5) Write a program which reads one character from its input; if that character is ? it prints "yes", otherwi /* Newton's method: x <- x - (x**3-a)/(3*x*x) */ double y, yn, dabs(); y = 0.; yn = x; while (dabs(y-yn) > y*1.e-8) { = 0; while ((c = getchar()) != EOF) if (c == ' ' || c == '\t' || c == '\n') n++; printf("%d\n", n); } This program won'tm, sum, dabs(); int n; term = sum = 1.0; n = 1; while (dabs(term) > dabs(sum)/1.e8) { term = term * x / n++; sum += te; { int s; s = 0; while (n--) s += *a++ * *b++; /* none of the spaces in the line above are necessary but would you rese it prints "no". Compile it, test it, and then type ready. #once #create Ref1 ? is here #once #create Ref2 no ? at beginning #y = yn; yn = y - (y*y*y-x)/(3*y*y); } return(yn); } double dabs(x) double x; { return(x>0 ? x : -x); } #log #next 50.1a 10 work on huge files, because an int isn't big enough. #log #next 5.1e 10 5.2e 5 L5.1e, #print Write a programrm; } return(sum); } double dabs(x) double x; { return(x>0 ? x : -x); } #log #next 50.1a 10 L5.1a* y#printally want to read s+=*a++**b++; and try to parse it? Even clearer than what I have, but slower, would be for(iuser a.out test1 a.out test2 grep yes test1 >/dev/null && grep no test2 >/dev/null #succeed This is one possible s 43.1b 5 >L43.1b* #print Write a subroutine myexp(x) which expects a floating argument x and returns the float that counts the number of vowels in its input (excluding 'y'). Don't forget to define the value of EOF at the beginning of yo (Section 1.5) Write a program that copies exactly three characters from its input to its output. When compiled and tested, type=0; iz2 #cmp z2 Ref #succeed /* Here is one possiblbrt(x) that returns the cube root of a floating point number. Put it on a file named "cubrt.c"; compile and test it, then type " programs should be done so you make the structure clear, like the code above. #log #next 5.1d 10 L5.1dL T#pri3 4 e = 1 + x + x /2! + x /3! + x /4! + ... Name your routine myexp(), not exp(). You can test it, then, by comparing user a.out test grep 28 test >/dev/null #succeed Here is one solution. #include main() { int nv, c; nv = e solution */ main() { putchar(getchar()); putchar(getchar()); putchar(getchar()); } #log #next 5.1b 10 5.2a 5 eL5.1bready". (If you don't know how to compute cube roots, try Newton's method). #once #create reldif.c double reldif(a,b) double a,nt Write a program that counts the blanks, tabs, and newlines in its input, and prints the total. Don't forget to define the vait with the system routine as well as by comparing it with tables. Leave it on file myexp.c, and then type "ready". #once #crea0; while ((c = getchar()) != EOF) if (c=='a' || c=='e' || c=='i' || c=='o' || c=='u' || c=='A' || c=='E' || c=='I' || c=='* #print (Section 1.5) Write a program that will read the first character from its input and print it out in octal. b; { double c,d; if (a==0. && b==0.) return(0.); c = a>0 ? a : -a; d = b>0 ? b : -b; c = c>d ? c : d; return( (a-b)/c ); } #oncelue of EOF at the beginning of your program. The best way is to add #include as the first line of your program. Thte reldif.c double reldif(a,b) double a,b; { double c,d; if (a==0. && b==0.) return(0.); c = a>0 ? a : -a; d = b>0 ? b : -b; c O' || c=='U') nv++; printf("%d\n", nv); } #fail Did you remember capital letters? #log #next 5.1f 10 L5.1f- Compile it, test it, and then type ready. #once #create Ref + #user a.out test grep 53 test >/dev/null #succeed A possible #create tzaqc.c main() { double cubrt(); double reldif(); double a, b, eps; a = 8.; b = 2.; eps = 1e-5; if (reldif(cubre must____ be in column 1. (See page 143 of the C book.) You may also have to say cc name.c -lS to compile the program. #o= c>d ? c : d; return( (a-b)/c ); } #once #create tzaqc.c main() { double x,y, log(), myexp(), reldif(); for(x=1.; x<5.; x=+ 0.20 ( ) *!+",#-$.%/ &0 '#print (Section 1.5) Write a program to replace each tab by the three-character sequence >, backspace, -, which prints as - /* One way: */ #include main() { int c; while ((c = getchar()) != EOF) { putchar(c); putchar(c); } } #logequal to 100 in numeric value. Compile it as usual and then type "ready". #once #create Ref1 u is a big letter #once #create Ref ``My cat mind is made up.'' Something cat in my tone struck him; and when he glanced at cat my eye and read what was written th.c -lS to compile it. #once #create Ref hoboken harrison newark roseville avenue grove street east orange brick church orange h>. The program should also replace each backspace by the analogous sequence <-. Compile it, test it, then type ready. #once #c #next 5.1e 5 5.3e 2 vL5.3e2{#print Write a program which copies its input to its output. Compile and test i2 B is a small letter #user a.out test1 a.out test2 grep high test1 >/dev/null && grep low test2 >/dev/null #succere, his face paled perceptibly. cat He hesitated a moment, then said: ``Speak.'' I cat answered, with perfect calmness: ``I caighland avenue mountain station south orange maplewood millburn short hills summit chatham madison convent station morristown nereate Ref This contain s a back space and a tab. #once #create Ref1 This contain <-s a back <-space and a>-tab. #user a.outt. Then type ready. #once #create Ref hoboken harrison newark roseville avenue grove street east orange brick church orange hieed One way: main() { if (getchar() > 100) printf("high\n"); else printf("low\n"); } #log #next 5.1b 10 aL5.2bt WILL ASCEND THE RIFFELBERG.'' If cat I had shot my poor friend he could not have fallen from his cat chair more suddenly. If w providence murray hill berkeley heights gillette stirling millington lyons basking ridge bernardsville far hills peapack glads test #cmp test Ref1 #log #next 5.1g 10 L5.1gu n#print Write a program to copy its input to its output, ghland avenue mountain station south orange maplewood millburn short hills summit chatham madison convent station morristown new0 E#print (Section 1.5) Write a program which reads a character from its input and tests whether that character is largerI had been his father he could cat not have pleaded harder to get me to give up my purpose. cat But I turned a deaf ear to all tone #once #create Answer hhoobbookkeenn hhaarrrriissoonn nneewwaarrkk rroosseevviillllee aavveennuuee ggrroovvee ssttrreereplacing each string of one or more blanks by a single blank. #once #create Ref This has lines with several blank providence murray hill berkeley heights gillette stirling millington lyons basking ridge bernardsville far hills peapack gladst than 100 in numeric value. If so, read two more characters, and print the value of the second of them in octal. Compile and the said. When he perceived cat at last that nothing could alter my determination, he cat ceased to urge, and for a while the deeett eeaasstt oorraannggee bbrriicckk cchhuurrcchh oorraannggee hhiigghhllaanndd aavveennuuee mmoouunnttaaiinn ssttaatts including some in funny places. #once #create Ref1 #once #create Answer This has lines with several blankone #user a.out xxx #cmp Ref xxx #succeed /* One way: */ #include main() { int c; while ((c = getchar()) est your program, then type "ready". #once #create Ref1 u V has value 126 #once #create Ref2 . V should not be processed #user aep silence was broken only by cat his sobs. I sat in marble resolution, with my eyes cat fixed upon vacancy, for in spirit I waiioonn ssoouutthh oorraannggee mmaapplleewwoooodd mmiillllbbuurrnn sshhoorrtt hhiillllss ssuummmmiitt cchhaatthhaamm mms including some in funny places. #user a.out test a.out >test #cmp test Answer #succeed One way: #include <!= EOF) putchar(c); } #log #next 5.1e 10 oL50.1aP #print (Everything) Write a program that reads an input fi.out test1 a.out test2 grep 126 test1 >/dev/null && cmp -s test2 /dev/null #succeed One way: main() { if (getchas already wrestling cat with the perils of the mountains, and my friend sat gazing cat at me in adoring admiration through his taaddiissoonn ccoonnvveenntt ssttaattiioonn mmoorrrriissttoowwnn nneeww pprroovviiddeennccee mmuurrrraayy hhiillll bbeerrstdio.h> main() { int c; for (c = getchar(); c != EOF; ) { putchar(c); if (c == ' ') while ((c = getchar()) == ' ') le and prints out the most frequently appearing word in it. Although you don't need to know this, I'll tell you that not more thr() > 100) { getchar(); printf("%o\n", getchar()); } } #log #next 5.1c 10 L5.2e+#print (Section 1.5) Wears. At last cat he threw himself upon me in a loving embrace and exclaimed cat in broken tones: ``Your cat Harris will never kkeelleeyy hheeiigghhttss ggiilllleettttee ssttiirrlliinngg mmiilllliinnggttoonn llyyoonnss bbaasskkiinngg rriiddggee bb ; else c = getchar(); } } #log #next 9.1a 10 L5.2a/ #print Write a program which reads a character fan 500 distinct words appear in the file. By the way, the file has been distorted so that the most frequent word is NOT 'the' - rite a program which copies its input to its output doubling each character (i.e. each input character is written twice on the odesert you. We will die together!'' I cat cheered the noble fellow with praises, and soon his fears were cat forgotten and he weerrnnaarrddssvviillllee ffaarr hhiillllss ppeeaappaacckk ggllaaddssttoonnee #user a.out xxx #cmp Answer xxx #succeedrom its input and prints "high" if that character is larger than 100 in numeric value (decimal) and "low" if it is less than or don't try to cheat. Compile and test your program. #once #create Ref I cat sat silent some time, then turned to Harris and said:utput). Compile and test it. Then type ready. Don't forget #include at the beginning of your program, and cc x0 ( ) *!+",#-$.%/ &0 'as eager for the adventure. He wanted cat to summon the guides at once and leave at two in the cat morning, as he supposed the ; while (--lim > 0 && (c=getchar()) != EOF && c != '\n') s[i++] = c; if (c == '\n') s[i++] = c; s[i] = '\0'; return(i); rsons, including the cat mules; or 205, including the cows. It cat was full four o'clock in the afternoon before my cavalcade wa = n*10 + c - '0'; if (c == EOF) return(-1); return(n); } getnum.o lw 05 E(*s++ + k + k<<5) & 077777; k = k%SIZE; k2 = (k >> 3) %SIZE; if (k2 == 0) k2 = 17; for (i=0; ixxx  60 3142671160 7421 n"); exit(); } comp(s,t) char *s, *t; { int c,d; while ( (c= *s++) == (d= *t++)) if (c==0) return('='); return(c>d? '>': '4 p.m. on the morrow; meantime cat he could notify the guides, and also let the public know cat of the attempt which we proposed_getline"~getlinecsv slimL1|L2grep cat xxx >/dev/null #succeed # define SIZE 499 # define CSIZE 2500 struct word {char *spell; int occur;} wordv[SIZE]; ch<'); } #log #next L9.1aP J#print (Section 1.9 -- read 1.6-1.8 too.) Write a program that removes trailing blan to make. I cat went to bed, but not to sleep. No man can sleep when he cat is about to undertake one of these Alpine exploits.ciL4 L5P__iob L10000$L10001,__filbuf L6hL3xcretar cspace[CSIZE]; char *cstore cspace; main () { char nword[25], *cp, *wd; int k, max; struct word *p; while (getword(nword) != ks and tabs from each line of input, and deletes entirely blank lines. To make your job easier, you can use the function getlin I tossed cat feverishly all night long, and was glad enough when I cat heard the clock strike half past eleven and knew it was getnum.cy #include getnum() { int c, n; n = 0; while ((c=getchar()) >= '0' && c <= '9') 0) { p = wordv+ hshsearch(nword); if (p->occur != 0) p->occur++; else { p->spell = cstore; p->occur = 1; cp = nwor files editor morefiles macros eqn C u%@w)e; its source is in getline.c. Type read when you are done. #once #create Ref This file contains some trailing blanks time cat to get up for dinner. I rose, jaded and rusty, and went to cat the noon meal, where I found myself the center of inte n = n*10 + c - '0'; if (c == EOF) return(-1); return(n); } getnum.o lw 05 Ed; while (*cstore++ = *cp++); } } max=0; wd =""; for(p=wordv; poccur>max) { max=p->occur; w_getnum"~getnumcsv L1fL2c and tabs and some empty lines. #once #create Ref1 This file contains some trailing blanks and tabs and some empty rest and curiosity; cat for the news was already abroad. It is not easy cat to eat calmly when you are a lion, but it is very p  5%0%9 AWp Ameu%@w)d = p->spell; } printf("The word '%s' occurred %d times\n", wd, max); } getword(s) char *s; { int c; while ((c=getchar()) =nL4 __iob L10000L10001&__filbuf L5NL6\L3bcret lines. #once cp %s/getline.c . #user a.out test #cmp test Ref1 #succeed No answer yet - sorry. #log #next 10 10 getline.cleasant, cat nevertheless. As cat usual, at Zermatt, when a great ascent is about to be undertaken, cat everybody, native and fo_getnum"~getnumcsv L1fL2c= ' ' || c == '\n'); if (c==0) return(0); *s++ = c; while ( (c = getchar()) != '\n' && c != ' ') if (c == 0) return(0) = n*10 + c - '0'; if (c == EOF) return(-1); return(n); } getnum.o lw 05  #include getline(s, lim) /* get line into s, return length */ char s[]; int lim; { int c, i; i = 0reign, laid aside his own cat projects and took up a good position to observe the start. cat The expedition consisted of 198 penL4 __iob L10000L10001&__filbuf L5NL6\L3bcret ; else *s++ = c; *s = 0; return(1); } hshsearch (s) char *s; { int k, k2, i; char *p; p = s; k =0; while (*s) k = 0 ( ) *!+",#-$.%/ &0 'usr/lib/learn/Xinfo 644 3 3 oy McMillan 89 #create file New York Mets Managers Casey Stengel Wes Westrum Gil Hodges Yogi Berra Roy McMillan #copyout #p lesson. Please report troubles to your local guru, or to Brian Kernighan, MH 6021, 2C-518. er, but after you have the "files" c Univac Control Data Honeywell #copyout #pipe ed file #user #unpipe #uncopyout tail -5 .ocopy >X1 #cmp X1 Ref #log #next 10.3c 2amed for a state. #create do2 Change the name of that file to 'iowa'. #user test ! -r ohio && test -r iowa #log #next 2.1a 1 2.2 1534 3142671160 7504 ipe ed file #user #unpipe #uncopyout tail -4 .ocopy >X1 #cmp X1 Ref #fail I hope you realized the addresses had to be $-2,$p tourse and know the basics of "editor", try anything you like. You can always leave learn by typing "bye" (and a RETURN). You ca 10.2c 5 10.1b 10 L10.2c7C n#print And you can also use other kinds of addresses with the "$" address. For exampa 10 tL10.1aJ 6#print Often, what you want to do is print an entire file, and often you don't know exactly how o get the last three lines. #cmp X1 Ref #log #next 11.1a 10 11.2a 5 L10.2aL e#print Often you want to refer to usr/lib/learn/editor.a 644 3 3 le, you can use ".", or combinations with ".", as addresses. Consider printing from the current line to the end of the file - whlong it is. There is a special abbreviation for this purpose: the character $ refers to the last line in the file, and so 1,$pthe last line of a file, and you don't know how long it is. There is a special address, "$" for this purpose. "$" refers to the  641270 3142671160 10175 at would the "p" command look like? Type "answer COMMAND" where "COMMAND" is that command. #copyin #user #uncopyin #match .,$p # prints all of a file. Here's a new file. Print it out using the editor command 1,$p. Then do the usual w, q, and ready. #creafiles - basic file handling commands editor - text editor; must know about files first. morefiles - more on file manipulations aend of a file. Thus $p prints the last line of a file and 1,$p prints all of a file. Here's another file. Print all of it,log #next 10.1b 3 10.3a 0 L10.3aN H#print Often you want to refer to the last line of the file. You don't havete Ref 1,$p w q #create file New York Mets Managers Casey Stengel Wes Westrum Gil Hodges Yogi Berra Roy McMillan #copyin #pnd other useful stuff macros - "-ms" macros for BTL memos & papers; must know editor eqn - typing mathematics; must know edito and then type the usual w, q, and ready. Your commands should look like 1,$p w q ready #create Ref 1,$p w q #create fil to know the number of lines in the file to do that; there is a special address, "$", that always refers to the last line. So yipe ed file #user #unpipe #uncopyin tail -3 .copy >X1 #cmp X1 Ref #log #next 10.1b 10 L10.1b@3 #print You can or C - writing programs in the C language; must know editor This is probably the proper order, but after you have the "files" ce New York Mets Managers Casey Stengel Wes Westrum Gil Hodges Yogi Berra Roy McMillan #copyin #pipe ed file #user #unpipe #eL09 #next 1.1a 10 L1.1a8 A#print This program will try to help you learn how to use thou can print the last line of a file with $p; try that, then type w, q and ready as usual. #create Ref This is the end of the fif course combine the various sorts of line addresses we have been using. Suppose the last line is line 6; then $ is line 6, and ourse and know the basics of "editor", try anything you like. You can always leave learn by typing "bye" (and a RETURN). You cauncopyin tail -3 .copy >X1 #cmp X1 Ref #log #next 10.1b 10 10.2b 5 sL10.2bM #print You can of course use "$" we editor. You should really know, before starting this, how to use files and how to type. There is a "learn files" procedure to le and the line you should print. 95 #create file don't print this line or this one This is the end of the file and the line y$-1 is line 5. Thus $-1 is the next to last line, and 1,$-1p prints all but the last line of a file. Again, I'll put you inn stop it from typing by pushing interrupt (or break or rubout or delete, depending on your terminal). If it won't accept your ith other addresses. For example, print from the third line of this file through the end; then leave with the usual w, q, and reteach you about files. Just to review, the current directory contains some files whose name begins with "do"; they describe someou should print. #copyout #pipe ed file #user #unpipe #uncopyout tail -2 .ocopy >X1 #cmp X1 Ref #log #next 10.3b 5 10.3c 10 L10. the editor: print the last three lines of the file. End with the usual w, q, and ready. #create Ref Gil Hodges Yogi Berra Ranswer, and you know____ you're right, answer "no" when it asks whether you want to try again, and it will go on to the nextady. #create Ref IBM Sperry Rand Univac Control Data Honeywell 80 #create file Burroughts National Cash Register IBM Sperry Randthing you should do. Find out what, do that, and then type "ready". #create ohio #create do1 There is a file in this directory n0 ( ) *!+",#-$.%/ &0 '3bO #print You can print an entire file making use of the fact that "$" refers to the last line. The command "file45". Print the last line of it, and then exit as above. #create Ref This file contains nothing of great importance and youncopyin #match .,$p #log #next 10.3e 5 10.1b 10 L10.3eX1 #cmp X1 Ref #log #n editor. Then type "ready". #create Ref 2 cups sifted all-purpose flour 1 tablespoon double-acting baking powder 1/2 teaspoon saagers Casey Stengel Wes Westrum Gil Hodges Yogi Berra Roy McMillan #copyin #pipe ed file #user #unpipe #uncopyin tail -3 .ced for was this line, the last line. #copyout #pipe #user #unpipe #uncopyout grep last .ocopy >X1 tail -1 Ref >X2 #cmp X1 X2 #loU #print How would you print from the first line of a file to the next to last line (thus printing all but the lext 12.1a 10 12.2a 5 cL12.1a ^#print Each 'w' command typed so far has written the edited material back on thelt 1/4 cup butter 3/4 cup milk 119 #create trenton 2 cups sifted all-purpose flour 1 tablespoon double-acting baking powder 1/2 opy >X1 #cmp X1 Ref #log #next 10.2b 10 L10.3c(z #print Don't forget the use of arithmetic combinations with thg #next 11.2b 10 12.2a 5 L11.2bX #print You can clearly print a whole file with e filename 1,$p w q ast line of something)? I'll put you in the editor - do that and then type the usual w, q and ready. #create Ref Boroughs Man same file that it came from originally. This can be changed by giving a filename on the 'w' command: w camden will write the teaspoon salt 1/4 cup butter 3/4 cup milk #copyout #user #uncopyout tail -6 .ocopy >X1 #cmp X1 Ref #log #next 12.1a 10 12.2a 5 e "p" command. For example, the current line is "." and the next line is ".+1"; do you see how to print the current line and thwhich prints a file, just as "cat filename" does. Print the file "stuff" using the editor. Then type "ready". #create Ref Actuahattan Brooklyn Queens the Bronx Staten Island 92 #create file Boroughs Manhattan Brooklyn Queens the Bronx Stcurrent editor buffer on file 'camden'. What does the following sequence of commands do? ed old w new q As you can seeL11.2a #print So far I have always put you into the editor. How do you get there yourself? The main command e next line with one command? Think of it as "print from this line to the next line". Type "answer COMMAND" where COMMAND is wlly this file is a very short file and prints quickly. 60 #create stuff Actually this file is a very short file and prints quickaten Island Don't print this line! #copyout #pipe ed file #user #unpipe #uncopyout tail -7 .ocopy >X1 #cmp X1 Ref #log #next 10., it picks up file 'old', and writes it on file 'new'. It has the same effect as cp old new does. This directory contains ainterpreter (the shell) recognizes ed as the name of the editor. (On some systems, it is also called "e", which is a useful ahat your line with "p" will look like. #copyin #user #uncopyin #match .,.+1p #match .,+p #match .,+1p #match .,.1p #log #next 10ly. #copyout #pipe #user #unpipe #uncopyout tail -3 .ocopy >X2 #cmp X2 Ref #log #next 11.2c 10 cL11.2cY #print1b 5 cL11.1a #print By now you are probably wondering how you get into the editor if someone else doesn't put file with a name beginning with 'h'. Make a copy of that file named 'norman'. Check the copy by listing the old and new filesbbreviation.) You can also say ed file1 which put you in the editor with the current file "file1". So, for example, you can p.3d 5 10.1b 10 L10.3dC #print Suppose you wanted to print from the current line to the end of the file? What You can of course execute other shell commands before going into the editor. For example, in this directory there is a file na you there. The main command interpreter (the shell) recognizes ed as the name of the editor. (On some systems, it's also ca with 'cat' before you type 'ready'. #create harry Four score and seven years ago our fathers brought forth on this continent a rint the last line of a file with ed NAME $p w q where NAME is the name of the file. In this directory is a file named 's the command for that? Again, type "answer COMMAND" where COMMAND is what your line with "p" will look like. #copyin #user #umed for a New Jersey city. Find out what file it is; then print it with "cat" and with the editor to check the listings are thelled "e", which is a useful abbreviation.) You can give a file name, which becomes the current file. Thus ed NAME in response0 ( ) *!+",#-$.%/ &0 'new nation, conceived in liberty and dedicated to the proposition that all men are created equal. #user #cmp harry norman #log #in the current file. Suppose you want to know how long the file is, i.e. what the number of the last line is. The command $= picks up file 'old', and writes it on file 'new'. It has the same effect as cp old new does. In this directory there is a e 'roger', print the next to last line, and then use '.=' to find out what it is. Don't forget to exit from the editor with w, eck by printing the files, either in the editor or with the "cat" command, that they are the same. Then type "ready". #create hanext 12.1b 10 L12.1b[ #print This directory still has both files named 'harry' and 'norman' in it. You checke will tell you that. So you can find the length of the file "data" by saying ed data $= w q Try that; then check by lisfile named "old". Copy that file to file "new" with the editor, using the commands given above. Check by printing both files wiand then q. Then finish by typing "answer N" where N is what you found, as usual. #create roger this is a short file containingrry Pushkin Tolstoy Dostoevsky Chekhov Gorky Pasternak Solzhenitsyn #user #cmp harry norman #log #next 12.1b 10 L13.1ad that they were the same with 'cat'. Now, for an easier time, try 'diff'. If it doesn't report any differences, you can be suting the file with "cat" to see how long it is. Then type "ready". #create data This is the file which you should find the numbth "cat" that they are the same. Type "ready" when done. #create Ref Four score and seven years ago our fathers brought forth on five lines of which this line is next to last indeed #copyin #user #uncopyin #match 4 #log #next 15.1a 10 15.2a 5 L14.2aF 2#print Remember we said that you didn't have to know the number of the last line, because '$' could always be used forre the files are the same. #create harry Four score and seven years ago our fathers brought forth on this continent a new nationer of lines in by typing "$=" in the editor and see that it has exactly nine lines in it when printed. #copyout #pipe #user #unp this continent a new nation, conceived in liberty and dedicated to the proposition that all men are created equal. #create old  #print You can also use the "=" command to find out what the 'current' line is. Since the current line is named ' that. What if you want to know how long the file is? Well, the editor command $= will tell you what '$' is set to, i.e. the, conceived in liberty and dedicated to the proposition that all men are created equal. #create norman Four score and seven yearipe #uncopyout grep 9 .ocopy >/dev/null #log #next 13.2b 5 L13.2bG 8#print How many lines are there in file "hFour score and seven years ago our fathers brought forth on this continent a new nation, conceived in liberty and dedicated to t.', the appropriate command is .= and so if you say 3p .= the second command will print '3'. Since you should not beli number of lines in the file. You can find the number of lines in any file, then, by editing it and then typing "$=". (You thens ago our fathers brought forth on this continent a new nation, conceived in liberty and dedicated to the proposition that all menry"? When you find out, leave the editor, and then type "answer N" where N is the number of lines in file "henry". #create henhe proposition that all men are created equal. #user #cmp old new #log #next 12.2b 5 vL12.2bF 9#print Now use teve what I tell you without checking it, edit file "doubt" and type the two commands above, which first print line 3 (and incide must leave the editor with the usual w,q). How many lines are there in file 'henry'? You may want to check by listing the fileen are created equal. Type "ready" when you're done experimenting. #copyin #user #uncopyin grep diff .copy >/dev/null #log #nextry Murray Hill Holmdel Whippany Madison Piscataway Chester Warren #copyin #pipe #user #unpipe #uncopyin #match 7 #log #next 14.1he editor to copy file "first" to file "second". Then type "ready". #create Ref Bell Telephone Laboratories 600 Mountain Avenuentally set "." to that line) and then ask what number "." is. Then type w, q, ready. #create doubt you didn't have to print thi with "cat" as well as by using "$=" in the editor. Don't forget to leave the editor with the usual 'w', 'q'; eventually, type  13.1a 10 13.2a 5 L12.2a )#print Each 'w' command typed so far has written the edited material back on the sama 10 14.2a 5 L14.1a #print You can also use the "=" command to find out what the 'current' line is. Since t Murray Hill, New Jersey 07974 #create first Bell Telephone Laboratories 600 Mountain Avenue Murray Hill, New Jersey 07974 s line you didn't have to print this line to err is human, to really foul things up takes a computer you didn't have to print th"answer N" where N is the number of lines. #create henry Murray Hill Holmdel Whippany Madison Piscataway Chester Warren #copyin e file that it came from originally. This can be changed by giving a filename on the 'w' command: w camden will write the currhe current line is referred to as '.', do you see that .= is the appropriate command to print the current line number? So if #user #cmp Ref second #log #next 12.2c 5 cL12.2c^ #print Again, you can type various commands before entering is line you didn't have to print this line #copyout #user #uncopyout grep 3 .ocopy >/dev/null #log #next 14.2b 5 sL14.2b#pipe #user #unpipe #uncopyin #match 7 #log #next 14.1a 10 L13.2a e#print Remember that "$" is the last line ent editor buffer on file 'camden'. What does the following sequence of commands do? ed old w new q As you can see, ityou go through a sequence like 3p .= the second command will print '3'. That's not very exciting, so why don't you edit filthe editor. This directory contains a file whose name begins with the letter 'h'. Make a copy of that file named "norman". Ch0 ( ) *!+",#-$.%/ &0 'd #print You can use all kinds of addresses with "=" so that you can find the number of the last line with $= for etes a file named 'opera'. ed opera a abduction from the seraglio - mozart aida - verdi alcina - handel anna bolena -s" to check that you did it right. Then type "ready". #create Ref franklin delano roosevelt #user #cmp pres Ref #log #next 15.1b#next 16.1a 10 oL16.1a #print When you are typing after an 'append' command, the editor is no longer listenin #create Ref The Hon. Brendan Byrne #user #cmp gov Ref #log #next 15.1b 10 eL15.2ccz W#print Note that every setxample. There is a file 'monteverdi' in this directory: find out the number of the next to last line. Then exit from the editor donizetti . w q Try this as shown. Then type "ready". (Notice the warning that "opera" doesn't exist when you start.) #c 10 L15.1bH :#print You can of course put several lines between the 'a' and the '.' to type in lots of text at g for its ordinary commands. Between 'a' and '.' none of your usual 'p', 'w', or 'q' commands are recognized. The only thing t of lines to be appended ends with the character '.' alone on a line. This is essential to get back to editor command level. W with w, q and type "answer N" where N is the number of the next to last line. #create monteverdi madrigals magnificat a 6 vreate Ref abduction from the seraglio - mozart aida - verdi alcina - handel anna bolena - donizetti #user #cmp opera Ref #log #none time. Here is a set of lines: type them in and name the file "fruit". Type "ready" when done. Input is ... #create Ref apphat will make the editor wake up is to type '.' alone on a line. So to type in text, then print it, you must go through a sequehenever you have been appending, and you later type a 'p' or 'w' command and the editor appears not to respond, check that you roci mass a 4 voci motets l'orfeo psalms #copyin #user #uncopyin #match 5 #log #next 15.1a 10 15.2a 5 hL15.1aŗext 15.2c 5 L15.3dk #print Use the editor to make a file named 'pres' and containing the single line franklinle peach pear plum nectarine orange #print Ref #user #cmp Ref fruit #log #next 16.1a 10 L15.2aҗ #print So far nce like ed file a input text . 1,$p w q and you must not type the "1,$p" until you have typed the '.'. Do you unemember to type the '.' to stop appending. This is a very common error even among experienced users. Suppose you type in, appe |#print So far you only know how to copy and print existing files in the editor, and not how to get started from scratch. delano roosevelt and then type "ready". #create Ref franklin delano roosevelt #user #cmp pres Ref #log #next 15.3e 5 L15.3eyou have learned how to copy and print existing files, and now you probably want to know how to add new text to a file. The "a"derstand? Will the sequence ed junk a input line $= . w q print the number of the last line typed in? If you donnding to a file, five lines; what must you type on the sixth line before typing 'w'? Type "answer X" where X is that character. The 'a' (append) command lets you type in new text. For example, the sequence ed file a this is a new line of text . k ^#print Remember that after typing the '.' which ends an append you can type ordinary commands at the editor.  (append) command lets you do that. For example, the sequence ed file a A man, a plan, a canal - Panama. . w q will't know, try it. Then type 'yes' or 'no'. #copyin #pipe #user #unpipe #uncopyin #match no #log #next 16.1b 10 16.2a 5 yL16.1b #copyin #user #uncopyin #match . #log #next 15.2d 5 15.3d 2 L15.2di 4#print As we mentioned, you can add sevew q will append the line this is a new line of text to the editor buffer, and then write it on "file". (If "file" doesn't alGo into the editor; append the line washington, d.c. and then print it with the 'p' command. Then write it on a file named "c append the line A man, a plan, a canal - Panama. to the editor buffer, and write it on file "file". (If "file" didn't exist an #print So far you've only appended to empty files. If the file you are appending to has something in it, you ral lines at once. Here is a set of lines; go into the editor, append them, write them on a file named "fruit", and then leave ready exist, the editor will warn you, but it's not an error.) Note that the material being added ends with the line that just city" and leave the editor and type "ready". #create Ref washington, d.c. #user #cmp city Ref #log #next 15.3f 5 L15.3flready, the editor will warn you. It's not an error, just a warning.) Try that. Then say "cat file" to check what was written,have to decide where you want the new material to be placed. You can give a line address with 'a', and the append command will pthe editor and type "ready". #create Ref apple peach pear plum nectarine orange #print Ref #user #cmp Ref fruit #log #next 16.1aontains a single '.' and that normal editor commands then resume. Following this pattern, make a file named "pres" that containI #print Now make a file named "towns" that contains the lines summit chatham westfield cranford madison and print it ou and then type "ready". #create Ref A man, a plan, a canal - Panama. #user #cmp file Ref #log #next 15.2b 5 15.3b 2 L15.2blace the new material after that line. For example, 3a input . places 'input' after line 3. What will be the line number  10 15.3e 5 L15.3bؗ #print You can put several lines betwen the 'a' and the '.', as in this example which creas the line franklin delano roosevelt and, after you have written it with a 'w' command, and done your 'q', try saying "cat pret to check you did it right. Then type "ready". #create Ref summit chatham westfield cranford madison #user #cmp towns Ref #log h #print Now make a file containing the line The Hon. Brendan Byrne and write it on file "gov". Then type "ready". 0 ( ) *!+",#-$.%/ &0 'of the input line? Type 'answer N', as usual. #pipe #copyin #user #uncopyin #unpipe #match 4 #log #next 16.1c 10 L16.1c of after it. For example, 3i is the same as 2a Try this sequence, which prints the editor buffer before and after the inseck connecticut hudson delaware susquehanna #create rivers penobscot androscoggin kennebec delaware susquehanna #user #cmp riversi' is the same as 'a' except for the position of the inserted material, what character must end every block of lines inserted wiL17.2dt #print And, finally, what is the last line you type to go to the shell from the editor? Again, respono *#print The current directory contains a file named 'hand'. The third line is missing: add the line middle finger rtion, to see what happens. ed cars 1,$p 3i lincoln chevrolet . 1,$p w q ready #create Ref ford mercury lincoln chevrolet buick Ref #log #next 16.2c 5 L16.2cq #print You can see that the 'a' command adds lines after the line addressed. th the 'i' command? Type "answer X" where X is that character. #copyin #user #uncopyin #match . #log #next 18.3b 5 18.2c 10 L18.d "answer X" where X is the command. #copyin #user #uncopyin #match q #log #next 18.1a 10 18.2a 5 L18.1au y#priafter line 2 of this file. Check what you're doing by printing the file with 1,$p before and after the change. Then rewrite t pontiac oldsmobile #create cars ford mercury buick pontiac oldsmobile #user #cmp cars Ref #log #next 18.2c 7 18.3a 3 L18.2cSo if you type 2a at the editor, what will be the line number of the first line that you added? Type "answer N" where N is th3by T#print Remembering that 'i' inserts one line before the 'a' command, so that after 3a the first input lnt Sometimes it is desirable to add text before a known line, rather than after it. For this purpose there is an 'i' (insert) che file with the usual w, q, and then type "ready". #create Ref thumb index finger middle finger ring finger little finger #creaz #print Again, remembering that "5i" is the same as "4a" what command is the same as .-1a to the editor? Respoe number it will have. #copyin #user #uncopyin #match 3 #log #next 16.1c 5 L17.2ar c#print You must always remine is number 4 while after 3i the first input line is number 3, what command using 'i' is the same as the command 5a to theommand that places the new material before the specified line. Otherwise, 'i' is exactly like 'a', so that 3i is the same as te hand thumb index finger ring finger little finger #create rhand thumb index finger ring finger little finger #pipe #user #unpnd "answer XX" where XX is that command. #copyin #user #uncopyin #match i #match .i #log #next 18.2d 2 18.2e 6 sL18.2dember what the computer is expecting from you: shell commands, editor commands, or input text after an 'append'. Suppose you  editor? Type "answer XX" where XX is that command. #copyin #user #uncopyin #match 6i #log #next 18.2c 5 L19.1az  2a Remember the address of the last line? Just before the last line of file 'airlines' insert the line twa and then rewrite ipe #cmp hand Ref #log #next 17.2a 5 18.1a 10 18.2a 7 L16.2a( #print So far you have always appended to an emp* #print What command will insert lines before the second line from the end of the file? Type "answer XXX" where XXX isare typing append text: what do you type to get back to where you can type editor commands? Type "answer X" where "X" is replac#print Now that you know how to add lines to a file, you will want to know how to get rid of them. The command 5d will dethe file with w, q, and type ready. #create Ref american braniff continental delta eastern national pan am twa united #create aity file, so that there was no problem about where the appended lines were placed in the file. If the file you're appending to a that command. #copyin #user #uncopyin #match $-2i #match $-3a #log #next 18.2e 5 L18.2ex l#print Just before ted by what you type. #copyin #user #uncopyin #match . #log #next 17.2b 5 nL17.2br #print What do you type to glete line 5 of a file. The command .d will delete the current line. In the file 'pres' either the 5th or 6th line is wrong. rlines american braniff continental delta eastern national pan am united #user #cmp airlines Ref #log #next 19.1a 10 L18.2already has lines in it, you can say where you want the new material to be placed by giving a line address with 'a', and you can he last line of file 'airlines' in this directory insert the line twa and then rewrite the file with w, q, and type "ready". #o from the editor command level to where you type input text? (The append command). Type "answer X" where X is what you type. # Print those lines and delete the bad one; then rewrite the corrected file. Then type 'ready'. #create Ref george washington joh3 f#print Once in a while you want to add text just before a certain line, rather than just after it. For this purcheck on this by printing the file. Try the following sequence and note what happens to the new lines that are added with the "3create Ref american braniff continental delta eastern national pan am twa united #create airlines american braniff continental dcopyin #user #uncopyin #match a #log #next 17.2c 5 tL17.2cz #print What command do you type to go from the shen adams thomas jefferson james madison james monroe john quincy adams andrew jackson martin van buren william henry harrison johpose there is a command 'i' (insert) which is just like 'a' except that the new material goes before the addressed line, insteada" command: ed rivers 1,$p 3a merrimack connecticut hudson . 1,$p w q ready #create Ref penobscot androscoggin kennebec merrimaelta eastern national pan am united #user #cmp airlines Ref #log #next 19.1a 10 19.2a 5 L18.3ay  #print Since 'll to the editor? Type "answer X" where X is the command name. #copyin #user #uncopyin #match e #match ed #log #next 17.2d 5 !0 ( ) *!+",#-$.%/ &0 'n tyler #create pres george washington john adams thomas jefferson james madison james monroe this is wrong Qwertyuiop john qui is a file "counties" in this directory. Try deleting the first five lines of the file. Then type "ready". #create Ref Morris Wath this command. Deleting one line at a time is always pretty safe. For example 5d will delete line 5 of a file. Try the fond then type "ready". #copyin #user #uncopyin #match management #log #next 3.1a 10 L20.1a #print You can nowile "howto" and write the shorter material on the file "new". Try that. Then say cat howto cat new to see the differences; tncy adams andrew jackson martin van buren william henry harrison john tyler #pipe #user #unpipe #cmp pres Ref #log #next 19.1b 1rren Union Somerset Hunterdon #create counties Bergen Passaic Sussex Hudson Essex Morris Warren Union Somerset Hunterdon #user #llowing sequence; note that I've used "cat" for a change. cat bmt ed bmt 5d w q cat bmt ready #create Ref 14th st 23rd st 28th  change a line of a file, using only the commands already taught, by deleting the old line and inserting a new one. This is not hen type "ready". #create Ref To use UNIX: 5. dial ext. 4321 6. type userid in response to login 7. type commands #create howto0 L19.1b{ #print Just as you can print several lines at once by giving a range of addresses with the 'p' commacmp counties Ref #log #next 20.1a 10 20.2a 5 L19.3bIN #print You can use any other kind of address you want wist 34th st times square 49th st 57th st #create bmt 14th st 23rd st 28th st 34th st 42nd st times square 49th st 57th st #user #a very convenient way to do that, so there is a command 'c' (change) which combines those operations. 5c input text here.  To use UNIX: 1. turn terminal power on 2. check terminal is in "line" mode 3. check duplex switch in "full" position 4. check bnd, you can delete several lines at once by giving two addresses. For example, 2,5d deletes lines 2, 3, 4 and 5 of the curreth 'd'; for example, .d will delete the current line. Remember the name of the last line? Pick up file "flower" and delete tcmp bmt Ref #log #next 19.3b 3 19.2c 8 L19.2cM m#print In this directory there is a file "pres" in which eithe . will delete line 5 and replace it by the lines input text here. Note that the text following 'c', just like the text afteraud rate at "300" 5. dial ext. 4321 6. type userid in response to login 7. type commands #user #cmp new Ref #log #next 19.2e 5 nt file. The command 1,.-1d deletes all lines up to but not including the current line. And 1,$d deletes EVERY line. (Ushe last line and rewrite the file. Then type "ready". #create Ref aster chrysanthemum daffodil marigold petunia rose tulip zinnr the 5th line or the 6th line does not belong. Edit the file, print the dubious lines, delete the bad one, and then rewrite th 'i' and 'a', must end with a line containing just one '.' and nothing else. This directory contains a file named 'short' with s20.1a 10 oL19.2ez 5#print Now, for comparison, use the "diff" command to check on the differences between "howte with extreme caution, obviously.) There is a file named 'counties' in this directory. Throw away the first five lines of it ania #create flower aster chrysanthemum daffodil marigold petunia rose tulip zinnia hummingbird #user #cmp flower Ref #log #next 1e file. Then type "ready". #create Ref george washington john adams thomas jefferson james madison james monroe john quincy adamix lines in it. Change the last line to read new version of last line and rewrite the file; then end with "ready". #create Reo" and "new". Try typing diff howto new and then "ready". #create howto To use UNIX: 1. turn terminal power on 2. check termind rewrite it. Then type 'ready' as usual. #create Ref Morris Warren Union Somerset Hunterdon #create counties Bergen Passaic Sus9.2c 10 L2.1a> J#print Now to check that you can type, a line will be typed at you: type it back in, and then s andrew jackson martin van buren william henry harrison john tyler #create pres george washington john adams thomas jefferson jf This is a short file which contains exactly six lines of text of which you are to change the last line new version of last linal is in "line" mode 3. check duplex switch in "full" position 4. check baud rate at "300" 5. dial ext. 4321 6. type userid in sex Hudson Essex Morris Warren Union Somerset Hunterdon #pipe #user #unpipe #cmp counties Ref #log #next 20.1a 10 20.2a 5 L19.2atype "ready". Type the line exactly as it is typed at you, including the colons that bracket it. : pack my box with five dozen ames madison james monroe this is wrong Qwertyuiop john quincy adams andrew jackson martin van buren william henry harrison johe #create short This is a short file which contains exactly six lines of text of which you are to change the last line this is tresponse to login 7. type commands #create new To use UNIX: 5. dial ext. 4321 6. type userid in response to login 7. type comma? #print To avoid just accumulating lines forever, you need some way of getting rid of them. The 'd' command liquor jugs : #copyin #user #uncopyin #match : pack my box with five dozen liquor jugs : #log #next 3.1a 10 L2.2a> n tyler #user #cmp pres Ref #log #next 19.2d 5 L19.2dz #print You can delete several lines at once by giving he last line. #pipe #user #unpipe #cmp Ref short #log #next 21.1a 10 gL20.2a #print You can now change a linends #copyin #user #uncopyin #match diff howto new #match diff new howto #log #next 19.2f L19.2f0N 9#print There(delete) removes lines you don't want. Since it also removes lines that you do want if you tell it to, you should be careful wi#print As an easier typing test, see if you can just get the word "management" in correctly. Type it in response to "$" aa range of addresses with the 'd' command. For example, the sequence ed howto 2,5d w q will delete lines 2 through 5 of the f"0 ( ) *!+",#-$.%/ &0 ' of a file by a slow procedure: delete the old version and insert the new one. For example, you could replace line 4 of a file  I'd suggest you not try to print all of it. Type "answer WORD" where WORD is the word on the last line of the file. #create liange several lines, and you need not replace lines with the same number of lines. You can put any amount of text between the 'cnd ascending ascent aside asked assailed assaulting assembled assist at attempt attended attention attracted avalanches away awfnewrr Ref #log #next 21.1a 10 L21.1aN ,#print Remember all the basic commands: 'e', 'a', 'w' and 'q'. Make a fiwith 4d 3a new version of line 4 . right? OK, try that. There is a file named "words" in this directory and line 4st aardvark adapt addition alert allege alphabet announce answer apple architect arrange avoid this is going to be very boring i' command and the closing '.', and you can remove any number of lines from the file by specifying a range of addresses. For exaul back badly baffled barometer barrier battered battle be beautiful because become bed been before began beginning behind beingle named 'test' that contains the following lines, exactly as presented below. Then type "ready". #create Ref maine new hampshi contains a mistyped word. Correct it and rewrite the file; then type "ready". #create Ref bear begin belief believe belt bend f you keep trying to print the whole file you should have said $p and I would suggest you hit delete now and try that instead i mple, 2,5c first second . would replace the FOUR lines 2,3,4 and 5 of the file with TWO new lines containing "firs believed beneficent better between big bitter black blue book both boughs brass break breast breath bridge bringing broke brokere vermont massachusetts rhode island connecticut #print Ref #user #cmp Ref test #log #next 21.1b 5 L21.1b T#p#create words bear begin belief beleive belt bend #user #cmp words Ref #log #next 20.2b 5 L20.2be #print Theream very patient and you are not going to like waiting for all of this to go on for ver ... ... .. ... year youth zebra #copyin #t" and "second". You can of course use more complicated addresses involving $ and . if you wish. This directory contains a filen brought burdens burst but by called calmly came can cannot caravan carpeted carried case catch caught caused cavalcade ceased rint In this directory there is a file 'fix'. It contains a mistyped line. Print the file; then change that line and rewrite t is an easier way to do that. You can just say 5c input text for new version . using the 'c' command ('c' stands for 'user #uncopyin #match zebra #log #next 21.1d 5 yL21.1dD  #print How long is file "text"? (That is, how many li "oldrr". Delete the last two lines and replace them by a line reading penn central and write the new version on a file namedcellar center certainly chair chance change chaplain cheered chief chilly church circumstance citizens civilization clear clearlhe file correctly. Then type "ready". #create Ref Bell System Companies include: American Telephone and Telegraph Company Longchange') which will delete the old version of the line and replace it. Note that the input text after 'c' ends with a '.' just nes does it have, or what is the line number of the last line.) Remember the "=" command? This file is also too long for you t "newrr". Then use "diff" to compare the old and new versions of the file. Eventually, type "ready". #create Ref maine central y climb climber clock closed clove coil cold column comfort command commanded commended concluded condition confronted consequen Lines Division Western Electric Company Bell Laboratories Teletype Corporation Associated Companies #create fix Bell System Comlike the text after the 'a' or 'i' commands. This directory contains a file named "lineup". Change the third line to read "nealo print out in full. Type "answer N" where N is the number of the last line. #create text a able about above absolutely accidentbangor and aroostook boston and maine grand trunk vermont central boston and albany new haven delaware and hudson new york, susqtly considerable considered consisted constantly consulting contrived convinced cord could country couple courage course cover cpanies include: American Telephone and Telegraph Company Long Lines Division Western Electric Company Bell Lxxxxtories Teletyp walk" and print the file before and after. Use a sequence like this, ending in ready: ed lineup 1,$p 3c neal walk . 1,$p w q s act add administered admiration adoring advancing adventure advised after afternoon afterward again against agent alacrity alluehanna, and western erie-lackawanna chessie system lehigh valley long island railroad penn central #create oldrr maine central overed cows crash crawling crept crippling crossed crowd crowded cruel crumbly crutches custom cut danger dangerous dark dead dee Corporation Associated Companies #user #cmp Ref fix #log #next 21.1c 5 21.1e 10 L21.1c #print This directorready #create Ref walt frazier earl monroe neal walk bill bradley spencer haywood #create lineup walt frazier earl monroe john  allow almost alone along alongside alp-climbers alpenstock alpine alps already also alter although am among an and animal animabangor and aroostook boston and maine grand trunk vermont central boston and albany new haven delaware and hudson new york, susqaf dear decided decked declared deep deeply defective demanded demoralization densely deployed descending describe desert deserty contains a file "list" which has a list of words in it. What word is on the last line of the file? The file is rather long -gianelli bill bradley spencer haywood #user #cmp lineup Ref #log #next 20.2c 5 aL20.2cm 4#print You can also chls another anxiety? any apparent applause appointed appreciation are argued armor-bearers around arrange arrived article as asceuehanna, and western erie-lackawanna chessie system lehigh valley long island railroad new york central pennsylvania #user #cmp #0 ( ) *!+",#-$.%/ &0 'ed despair despondency detachment detail detailing did die directly dirt disappear disappeared dismal disposition divert do doine -- a second 'q' will let you out). Generally it's wisest to leave the editor by typing w q rather than just 'q'. I'll put yold homes hook hook-rope hoping horns host hotel hotels hour hours how hurry huts huzza i ice-ax ice-axes idea if implement implthat you did it correctly. Then rewrite the file and type 'ready'. #create Ref george washington #create pres harry washington  reply; he asks what is relevant and replies to the point; he speaks of first things first and of last things last; of what he hg done donkey doom down draped dressed drooped dull dumb during eager ear ears earth earthquake easy eat edelweiss either elephaou in the editor; type those two commands to leave. Then type "ready". #create bpres Washington Adams Jefferson #create pres Waements imposing impressive impulse in inches including indignant ingratitude injured innocent inquiries? inquiring #copyin #user#user #cmp Ref pres #log #next 30.1b 10 L30.1b #print As with other commands, you can specify a line number ias not heard he says "I have not heard"; and he acknowledges what is true. and the opposites apply to the clod. #user #cmp abonts eleven eloquence embrace encounter end ended enough entered entirely established estimate even evening events ever every eveshington Adams Jefferson #pipe ed pres #user #unpipe #cmp pres bpres #succeed Note that the editor typed 27. This is the number #uncopyin tail -1 .copy >X1 %s/../lcount X2 #cmp X1 X2 #log #next 21.1e 6 L21.1e #print This directorn front of the 's' command. Thus 3s/x/a/ will change the first 'x' to an 'a' on the third line of the current file. Pick up t Ref #log #next 30.1a 10 30.2a 5 L3.1a,? #print The editor accepts commands one per line, just like the otherrybody examine exceeded excellent except excess exclaimed excursions executed exhaustion expected expedition experimenter explai of characters it wrote into the file. This is reassuring - it tells you the write was successful. The count of characters reay contains a file "abot" which has an extra line (one line was typed twice). Remove the extra line and rewrite the file; then tyfile 'town' and change the 'q' on the last line to a 'p'. Then rewrite the file and type 'ready'. #create Ref south orange mapl programs in UNIX; but its commands are unique to it. The only command present in every editing session is the last one, 'q' (qned explosion extreme eye eyes face faces fact fagged failed fainted fallen false far fast fastened faster fatal father fatigue d is also typed, which is why you got a '27' before your responses. #log #next 4.1a 10 4.2a 5 L30.1aO 0#print Ape "ready". This file is fairly short. #create Ref seven qualities characterize the clod and seven the wise man: the wise man dewood millburn short hills summit new providence #create town south orange maplewood millburn short hills summit new qrovidence uit) which returns to the normal command interpreting program. I'm going to put you in the editor. Type 'q' to leave, and thenfear feared fearful fears feature feel feet fell fellow fetch feverishly few fifteen filing find finer firmly first five five-polthough it is always possible to fix errors by retyping the entire erroneous line with the 'c' command, it is usually much fasteoes not speak before him that is greater than he in wisdom; he does not break into his fellow's speech; he is not in a rush to #user #cmp town Ref #log #next 31.1a 10 L30.2ap #print Changing a whole line with the 'c' command is a slow wa type "ready" when you get the '$' from the normal command handler. #create junk You're in the editor. #pipe ed - junk 1p #user und fixed flank foot for forest forgotten form forth forty-foot forward found four frantic free frequency fresh friend frightener to make small changes within a line. The editor allows this with the 's' (substitute) command. For example, s/abc/def/ wireply; he asks what is relevant and replies to the point; he speaks of first things first and of last things last; of what he hay to work when you only want to change a few letters. The 's' (substitute) command changes the letters within a line. For exam#unpipe #cmp junk junk #log #next 3.1b 5 tL3.1b> #print A particularly important editor command is 'w' (writed from front frozen full furthest fury gave gazing general gentle get give glad glanced gliding go going gone good got grace grall change a line previously reading xxx abc into one reading xxx def by replacing the string 'abc' in the line with the sts not heard he says "I have not heard"; and he acknowledges what is true. and the opposites apply to the clod. #create abot seple, the command s/abc/def/ will change a line reading xxxabc into one reading xxxdef by replacing the string 'abc' with '). This writes whatever you are working on, including everything you have typed in or changed, into a file, so that you can wornd gratifying great green ground grow growing guide guides guttered had half half-mile halt hampered hand hands happened harder ring 'def'. In this directory is a file 'pres' with one line that says 'harry' where it should say 'george'. Fix it using the sven qualities characterize the clod and seven the wise man: the wise man does not speak before him that is greater than he in wdef'. Try the following sequence which alters the first line of the file 'test' within this directory: ed test 1p s/months/yeak on it again later. If you try to quit from the editor without writing out your changes, the editor will complain (but only onchardly harris hat hate haunts have having he head hear heard heavens heavy held here hesitated high hill him himself his hoist hubstitute command to change 'harry' into 'george'. You should use the 'p' command to print the line before and after, checking isdom; he does not break into his fellow's speech; he is not in a rush to break into his fellow's speech; he is not in a rush to$0 ( ) *!+",#-$.%/ &0 'rs/ 1p w q ready #create Ref Four score and seven years ago our fathers brought forth ... #create test Four score and seven mont2b \#print This directory contains a file "animal" which has a mistyped line. Print the file, find the line,  whose second line says "xx" where it should say "ne". Edit the file, change those letters, and rewrite the file. Then type "rtories, produce more goods so that more people could earn wages to buy them. Soon even the supply of paper money would have beengs a&p finast qathmark #user #cmp nmark Ref #log #next 30.2h 5 L30.2hI #print The two files you were editing hs ago our fathers brought forth ... #user #cmp test Ref #log #next 30.2b 5 L30.2b #print In this directory ifix the error using the 's' command, and then rewrite the corrected file and type "ready". #create Ref cat dog raccoon groundhogeady". #create Ref idlewild newark laguardia #create airport idlewild xxwark laguardia #user #cmp airport Ref #log #next 30.2e 5n too smalp to take care of the needs of businees, had it not been for a new form of money. This was the "check-book dollar." are still around here. Use "diff" to see what the differences between them are and check that the correction was made properly. s a file 'pres' whose first line says 'harry' where it should say 'george'. Fix it using the substitute command to change 'harr mouse mole #create animal cat dog rakkoon groundhog mouse mole #user #cmp animal Ref #log #next 32.1a 10 31.2c 5 L31.2c uL30.2eFP O#print Now edit the file named "town" and change the 'q' on the last line to a 'p'. Rewrite the cor There are now from 25 to 30 billion dollars in paper money circulating in txe United States. But that is only one tenth of wh Then type "ready". #create markets shop-rite acme kings a&p finast qathmark #create nmark shop-rite acme kings a&p finast pathmy' into 'george'. You should use the 'p' command to print the line before and after, checking that the change took place. Then #print In this directory there is a file "checks" which contains 3 errors. Fix the spelling errors and rewrite the rected file and type 'ready'. #create Ref south orange maplewood millburn short hills summit new providence #create town south oat is needed to do business every year. The other 90 per cent is in the form of check-book dollars. #user #cmp checks Ref #log ark #copyin #user #uncopyin #match diff markets nmark #match diff nmark markets #log #next 31.1a 10 L31.1a }#p rewrite the file and type 'ready'. #create Ref george washington #create pres harry washington #user #cmp pres Ref #log #next 3file. Then type "ready". #create Ref The establishment of credit all over the civilized world made it possible to develop nerange maplewood millburn short hills summit new qrovidence #user #cmp town Ref #log #next 30.2f 5 31.1a 10 eL30.2f #next 32.1a 10 32.2a 5 oL32.1aiQ #print Just as you can specify files with an abbreviation, it is also possiblerint I hope you have been checking the effects of your substitutions by using the 'p' command before and after the changes. Thi0.1b 10 30.2c 5 L30.2c  #print As with other commands, you can specify a line number with the 's' command. Thw inventions, enlarge factories, produce more goods so that more people could earn wages to buy them. Soon even the supply of pG#print Now there is a file named "equipment" and on the next to last line is a word that contains 'nn' where it should hav, in the 's' command, to use an abbreviation for the string to be used for substitution. Unfortunately, the characters used to s is so often desired that you may type the 'p' on the same line, after the 's' command. Thus s/ab/cd/p changes 'ab' to 'cd' us 3s/x/a/ will change the first 'x' on line 3 to an 'a'. Here is a file "street" in which the fifth line has an 'r' where itaper money would have been too small to take care of the needs of business, had it not been for a new form of money. This was te 'mm'. Fix it and rewrite the file. Then type "ready". #create Ref screwdriver wrench saw hammer pliers #create equipment screindicate an abbreviation are quite different, and you must learn them separately for the editor and the file-name interpreter. (and prints the line after the change. In this directory there is a file named 'tree'. Try changing the fourth line, which now r should have an 'a'. Try the sequence ed street 5s/r/a/ 5p w q ready #create Ref first avenue second avenue third avenue lexinhe "check-book dollar." There are now from 25 to 30 billion dollars in paper money circulating in the United States. But thawdriver wrench saw hanner pliers #user #cmp equipment Ref #log #next 30.2g 5 1L30.2g X#print This directory coSorry about that, but that's the way the world is.) The symbol for 'any character' is '.'. Thus s/a./bc/p looks for an 'a' foeads spruxx to read spruce and then rewrite the file, and type 'ready'. #create Ref pine fir hemlock spruce birch beech higton avenue park avenue madison avenue #create street first avenue second avenue third avenue lexington avenue prrk avenue madist is only one tenth of what is needed to do business every year. The other 90 per cent is in the form of check-book dollars. #cntains a file named "markets" which has a 'q' on the last line where it should have a 'p'. Rewrite the corrected version on a nellowed by anything, and changes those characters into 'bc'. Thus the line what now would become whbc now after that commanckory maple #create tree pine fir hemlock spruxx birch beech hickory maple #user #cmp Ref tree #log #next 32.1a 10 31.2b 5 L31.on avenue #user #cmp street Ref #log #next 30.2d 5 L30.2d 3#print In this directory is a file named "airport"reate checks The establishment of credit all over the civilized world made it possible to develop new inventions, enlarge facw file named "nmark". Then type "ready". #create Ref shop-rite acme kings a&p finast pathmark #create markets shop-rite acme ki%0 ( ) *!+",#-$.%/ &0 'd. What will the word "floating" become after s/a./or/ is executed? Type "answer WORD" where WORD is the new version. #copyin d? Type "answer WORD" where WORD is the word changed by that command. #copyin #user #uncopyin #match time #log #next 33.1b 10 embol for 'any character' is '.' and this will match any single letter or other character in a line. For example, s/a./bc/ loohere in a pattern. Editor patterns, by the way, are called "regular expressions". For example, suppose you wanted to change ei2fQ #print Is the word "stop" changed by the command s/t./xx/p Type "yes" or "no". #copyin #user #uncopyin ##user #uncopyin #match flooring #log #next 32.1b 10 L32.1b |#print Note that the substitute command changes L33.1b, #print Write the command that will change either the word "that" or the word "than" into "this", and tks for an 'a' followed by anything, and changes those two letters into 'bc'. Try this sequence and note what happens. ed line ther the word "trick" or the word "track" to "stop". What command would you need? Do you see that s/tr[ia]ck/stop/p will domatch yes #log #next 32.2g 5 2L32.2g $#print One place where "." is useful is in changing letters that are harthe first instance of something that matches. Consider the line now is the time for all good men and the substitute command hen print the result. Type "answer COMMAND" on a line, where COMMAND is that string. (That is, COMMAND will be of the form p s/a./bc/p w q ready #create Ref me bcd you #create line me and you #user #cmp line Ref #log #next 32.2b 5 32.2c 10 iL32.2b that? Now figure out what command you would need to change either "bear" or "beat" into "best" and print the line after the chd to type, e.g. the # and @ characters. For example, the command s/a.b/xxx/ will change "a#b" to "xxx". There is a file name s/tim/TIM/ applied to it. Which word in the line will be altered by that command? Type "answer WORD" where WORD is the word ths/.../.../p where you have replaced the ... with the right stuff.) You can test this out by going into the editor and typing in  7#print Or, to take another example, the command s/h./ar/ would turn the word "that" into "tart": the '.' matchange. Type "answer COMMAND" where COMMAND is that line. #copyin #user #uncopyin #match s/bea[rt]/best/p #match s/bea[tr]/best/p d "goof" in this directory whose third line contains the word sp#xll which should be "spell". Change it and rewrite the file; at will be changed. #copyin #user #uncopyin #match time #log #next 32.1c 10 L32.1c #print Now, with the line a line that contains "that" and "than" and trying to change it. You should do that until you are sure you have the command righes the 'a'. What would that command change the word "what" into? Reply "answer WORD" where WORD is what the substitute command#match s/bea[rt]/best/ You forgot the "p" part. #match s/bea[tr]/best/ You forgot the "p" part. #log #next 33.2c 5 L33.2cthen type "ready". #create Ref whoever typed this either couldn't type or couldn't spell properly. #create goof whoever typed th now is the time for all good men and the command s/t../TIM/p what word will be changed? Again, type "answer WORD"; remembert. #copyin #user #uncopyin #match s/tha[nt]/this/p #match s/tha[tn]/this/p #match s/tha[nt]/this/gp #match s/tha[tn]/this/gp #lo would produce. #copyin #user #uncopyin #match wart #log #next 32.2c 5 tL32.2c #print What will the word "flo #print Suppose the current line is now is the time for all good men and you type the substitute command s/t[ijkis either couldn't type or couldn't sp#xll properly. #user #cmp goof Ref #log #next 32.1b 5 L33.1a  #print Whe that "." matches any character, and the first match is picked. #copyin #user #uncopyin #match the #log #next 33.1a 10 33.2a 5 g #next 34.1a 10 34.2a 5 pL33.2a #print When you want to match one of a few specific characters, and not anytating" become after the command s/a./or/ is executed? Type "answer WORD" where WORD is the new version. #copyin #user #uncopy]/xx/ what word is changed? Type "answer WORD" where WORD is the word changed in the line. #copyin #user #uncopyin #match timen you want to match one of a few specific characters, and not just any character, the pattern is similar to the pattern used in L32.2a #print Just as you can use abbreviations to specify a class of filenames, you can use abbreviationss ihing, the pattern is similar to that used in file names. That is, [abc] matches the letters 'a', 'b', or 'c', but nothing elsein #match flooring #log #next 32.2d 5 32.1b 10 WL32.2dQ #print Is the word "stop" changed by the command s/t #log #next 34.1a 10 33.1b 5 L34.1aS #print You can also specify "all characters except ..." using an expressfilenames. The patterns used with the editor, by the way, are called "regular expressions". The string [abc] matches 'a', 'n the editor to recognize strings in the substitute command. Unfortunately, the characters used in the editor are quite differe. Try this sequence and note what happens: ed lines 1,$p 1s/[123]/9/ 2s/[123]/9/ 1,$p w q ready #create Ref 599 948 #create lio/xx/p Type "yes" or "no". #copyin #user #uncopyin #match yes #log #next 32.2e 5 .L32.2eQ #print Is the word "ion of the form [^ab] which means "anything except an 'a' or 'b' character". Will s/ab[^cde]/xyz23/p change xbcabfgh Typb' or 'c'. So if the current line is now is the time for all good men and the command is s/t[ijk]/xx/ what word is changent from the ones used in the file-name handler to specify patterns. (Sorry about that, but that's the way the world is.) The synes 519 348 #user #cmp lines Ref #log #next 33.2b 5 L33.2b{ #print You can of course use the [] operators anywstop" changed by the command s/tp/xx/p Type "yes" or "no". #copyin #user #uncopyin #match no #log #next 32.2f 5 32.1b 10 nL32.&0 ( ) *!+",#-$.%/ &0 'e "yes" or "no". #copyin #user #uncopyin #match yes #log #next 34.1b 10 L34.1bS 3#print Will the command s/abclasses. Suppose, for example, we wanted a long string of either 'a' or 'b', followed by 'x'. Then we could write s/[ab]*x/hich is "anything but blank". Try the following commands: ed cut 1p 1s/p[^ ]/xxx/p w q ready #create Ref stop this comxxxter #c*b/.../ replaces anything of the forms axyzb, aaaaaab, a1234b, abbbb since it requires just an 'a' and a 'b' at the ends text Ref #log #next 36.1a 10 36.2a 5 cL35.2a{ s#print The '*' character is also used in the editor patterns (th[^cde]/xx/p change the line abcxyzabfxyz Type "yes" or "no". #copyin #user #uncopyin #match yes #fail Remember that the s/.../.../ In this directory is a file named "table". It has only one line. On that line, replace all the digits followed by a commareate cut stop this computer #user #cmp cut Ref #log #next 34.2f 5 oL34.2fIT #print Will s/ab[^cde]/xyz23/p chof the string, with anything at all in between. Or, to throw away everything on a line after the word "stop", you could try s/se regular expressions) but it has quite a different meaning from '*' as used in filenames. In the editor it means "any number o../ command will keep looking through the line for something to change, even if the beginning of the line doesn't match. #log #n with the letters "too big". For example, "123,000" should become "too big,000". Then rewrite the file and type "readY". #creatange xbcabfgh Type "yes" or "no". (Try it out first in the editor if you don't know.) #copyin #user #uncopyin #match yes #log #top.*/stop/ In this directory is a file "sentence". Delete everything after the word "last" on the second line of the file. #crf repetitions of the previous character." Thus a* might match "a" or "aa" or "aaa" or "aaaa" and so on. It might also match next 35.1a 10 35.2a 5 tL34.2a 4#print You can also specify "all characters except ..." using an expression of te Ref Heathrow too big,159 #create table Heathrow 17073,159 #user #cmp table Ref #log #next 35.2d 5 L35.2dWU \next 34.1b 10 L35.1a }#print The "*" character is also used in substitute commands, but it has a different meaeate Ref This file has a sentence in which this is the last #create sentence This file has a sentence in which this is the last othing, because "any number of repetitions" includes "zero"! Perhaps it will be clearer after you do the following example. Nothe form [^ab] which means "any character except the letters 'a' or 'b'. This is just like filename patterns again. Does [^ab#print A useful operation is to replace a string of several blanks by exactly one blank. Note that you can't just write s/ */ ning. Here it means "any number of repetitions of the previous character". (including zero!). Thus a* is any number of 'a' cword which should be left. #user #cmp sentence Ref #next 36.1a 10 36.2a 5 L36.1a ?#print So far all the speciae what happens to the two lines. Type ed file 1,2p 1s/xa*/xy/ 2s/xa*/xy/ 1,2p w q ready #create Ref abxy abxycd #create file ac] match the letter 'a'? Answer "yes" or "no". #copyin #user #uncopyin #match no #log #next 34.2b 5 L34.2b x#p/ because the " *" willl match any number of blanks including zero. Thus it will always match at the beginning of the line, evharacters, and [ab]* is any number of either 'a' or 'b' characters. So s/ab*/xy/ looks for an 'a' followed by any number of l characters in the substitute command have been used in the left-hand expression, the one that is looked for in the line as it bxaaa abxcd #user #cmp file Ref #log #next 35.2b 5 L35.2b% D#print Now suppose we wanted to delete the blanks rint Does [^abc] match the letter 'd'? Answer "yes" or "no". #copyin #user #uncopyin #match yes #log #next 34.2c 5 L34.2cen if there is no blank there. The normal sequence is s/ */ / which will only substitute for a string that has at least one bl'b' letters, and will change abbb cde into xy cde You can use '*' after anything, including for example blank. Thus s/exists before the change. None of these characters are meaningful in the right-hand expression; for example, s/ab/a./ turn "abafter the letter "t" in this line: here are a lot of blanks This line is on file "blank". Try the sequence ed blank  i#print Does [abc] match 'a'? Answer "yes" or "no"? #copyin #user #uncopyin #match yes #log #next 34.2d 5 L34.2dank in it. Try that command on the line in the file "line". Then rewrite the file "line" and type "ready". #create Ref here is aa */a/ removes all the blanks after the letter 'a'. In this directory there is a file 'text'. On the third line, remove the bl" into "a." just as if "." were an ordinary letter. But there is one character that is special on the right side of a substituti1p s/t */t/p w q ready #create Ref here are a lotof blanks #create blank here are a lot of blanks #user #cmp blank Ref # v#print Does [^abc] match the '*' character? Type "yes" or "no". #copyin #user #uncopyin #match yes #log #nex long space. #create line here is a long space. #user #cmp line Ref #log #next 35.2e 5 L35.2eU #print A vanks after the word 'the'. Then rewrite the file and type "ready". #create Ref This is the file for experimentation with the(suon, which is '&'. The ampersand is replaced by whatever text is being replaced. In s/the/&m/ the string "the" is turned intolog #next 35.2c 5 L35.2c :#print You can use '*' to look for a string of characters from one of the character t 34.2e 5 L34.2e #print Suppose you wanted to match all letters and punctuation marks. You could try [^ ] wery powerful construction is ".*", which matches any character (remember '.') repeated any number of times. For example s/a.bstitute) command. #create text This is the file for experimentation with the (substitute) command. #user #cmp '0 ( ) *!+",#-$.%/ &0 ' "them" because the '&' is replaced by "the". In this directory there is a file 'text'; on the third line, change the word 'dog' on a night like this every dog has his day dog gone #user #cmp cliche Ref #log #next 37.2b 5 L37.2b ,#print Nnted to replace the letter 'a' by an asterisk, for example, the obvious com and would work: s/a/*/p Try, in the file "data", r73* Interest *20* Gambling *5* Other *2* #create table Income Wages 73 Interest 20 Gambling 5 Other 2 #user #cmp  #print You can use a range of line numbers with the substitute command to change more than one line at once. F into 'dogs'; then rewrite the file and say "ready". #create Ref cat mouse dogs rat #create text cat mouse dog rat #user #cmp teow edit file "text" and change the "cat" on every line into "mouse". Then rewrite the file and type "ready". #create Ref domesteplacing the comma on the last line with a period. Then rewrite the file and type "ready". #create Ref Square Roots 1.00 1.00 table Ref #log #next 37.2e 5 1L37.2e #print Here is something a bit trickier. We want to add an extra space or example, 1,5s/dog/&s/ will change "dog" on each of the first five lines of the file into "dogs". Edit file "text" and changxt Ref #log #next 37.1a 10 37.2a 6 oL36.2a (#print So far all the special characters in the substitute commandic mouse alley mouse persian mouse angora mouse wildmouse #create text domestic cat alley cat persian cat angora cat wildcat #us2.00 1.42 3.00 1.73 4.00 2.00 You really shouldn't be printing all of this file - did you forget that '$' is the address of the after each word "lengthen". However, some of the instances of "lengthen" are followed by commas or right parentheses and we wane the word "cat" on every line into "mouse". Then rewrite the file and type "ready". #create Ref domestic mouse alley mouse pers are used to select the string to be replaced. There is one character used in the new string to be inserted. It is '&' which wheer #cmp text Ref #log #next 37.2c 5 L37.2c I#print How would you find a string of digits? Remember [1234567890last line of a file? Use that instead of printing everything. 5.00 2.23 6.00 2.45 7.00 2.65 8.00 2.83 #create data Square Rootst the sapace after the comma or right parenthesis in that case. That is, the desired transformations are: now nian mouse angora mouse wildmouse #create text domestic cat alley cat persian cat angora cat wildcat #user #cmp text Ref #log #nen used on the right hand side of a substitution, refers to the expression given on the left hand side. For example, the command ][1234567890]* as an expression? In this directory is a file "table" which contains some numbers. On every line of the file, f 1.00 1.00 2.00 1.42 3.00 1.73 4.00 2.00 You really shouldn't be printing all of this file - did you forget that '$' is the addrew lengthen xx lengthen xx lengthen, xx lengthen, xx lengthen) xx lengthen) xx lengthen), xx lengthen), xx Ixt 38.1a 10 38.2a 6 L37.2a #print A range of line numbers can be used with the substitute command as with the s/the/&m/ changes "the" into "them". Try that on file "text"; then rewrite the file and type "ready". #create Ref we went to ollow all numbers by the character '%'. It should only take one 's' command. Then rewrite the file and type "ready". #create Reess of the last line of a file? Use that instead of printing everything. 5.00 2.23 6.00 2.45 7.00 2.65 8.00 2,83 #user #cmp datat should only take one substitute command to do this. Remember that "*" matches zero or more instances of whatever precedes it.  print command. For example, $-4,$s/cat/&s/p will change "cat" into "cats" on the last five lines of a file. In this directosee them yesterday. #create text we went to see the yesterday. #user #cmp text Ref #log #next 36.2b 5 L36.2b f Budget Outlays Salaries 32% Equipment 40% Rent 13% (incl. utilities) Interest 9% Misc. 6% #create table Budg Ref #log #next 36.2d 5 L36.2d #print On line 4 of the file "attribute" is either the word "color" or the worTry those changes on the first six lines of the file "text" in this directory. Then rewrite the file and type "ready". #create ry there is a file "cliche" containing a number of instances of the word "dog"; change the instances of "dog" in the first five #print Now, in file 'pets', change the word 'dog' on the third line into 'dogs'. Then rewrite the file and type "ready". #createt Outlays Salaries 32 Equipment 40 Rent 13 (incl. utilities) Interest 9 Misc. 6 #user #cmp table Ref #log #next 3d "Color". With one command add an 's' to the end of the word. Check that you did it right; then rewrite the file and type "reRef To lengthen this is easy, whereas to lengthen, rather than to shorten, on the previous line is hard. (To lengthen) is anlines to "dogs". Then rewrite the file and type "ready". #create Ref dogs tired sick as a dogs dogs eared wouldn't send a dogs oe Ref cats hamsters dogs gerbils #create pets cats hamsters dog gerbils #user #cmp pets Ref #log #next 36.2c 5 oL36.2c7.2d 5 6L37.2d {#print There is another file named "table" in this directory. Find all numbers and surround thady". #create Ref size weight mass density shade hue quality age price lifetime Colors durability #create attribute size weight  infinitive. I said to him, (please lengthen), and he did so. Why not lengthen this word? Notice it is on line 7. #create texut on a night like this every dogs has his day dog gone #create cliche dog tired sick as a dog dog eared wouldn't send a dog out #print On the right side of a substitute, none of the other special characters mean anything unusual. Thus, if you waem with "*" characters (that is, "345" becomes "*345*". Then rewrite the file and type "ready". #create Ref Income Wages *mass density shade hue quality age price lifetime Color durability #user #cmp attribute Ref #log #next 37.1a 10 37.2a 6 L37.1a(0 ( ) *!+",#-$.%/ &0 't To lengthen this is easy, whereas to lengthen, rather than to shorten, on the previous line is hard. (To lengthen) is an infint Can you expect the normal command interpreter (called the 'shell') to recognize w Type yes or no. #copyin #user #uncopyin #ext"; whenever the letters "cat" begin a line, change them to "mouse; but leave other instances of "cat" unaltered. Do this on  = 1 saucer 2 cups = 1 pint 2 pints = 1 quart 1/2 pt = 1 saucer #user #cmp text Ref #log #next 40.1b 5 40.2b 10 L40.1bef #log #next 39.1a 10 eL39.1a #print Using the "^" character, you can easily put things at the beginnings ofnitive. I said to him, (please lengthen), and he did so. Why not lengthen this word? Notice it is on line 7. #user #cmp text Rmatch no #log #next 5.1a 10 L4.2a? i#print The editor and the 'shell' (the normal command interpreter) accept each line (it only takes one command, as you know). Then rewrite the file and type "ready". #create Ref mouse's paw alley cat mV #print You can also use '$' when you just want to add something to the end of a line. For example, s/$/./ puts a per lines. For example s/^/***/ puts "***" at the beginning of the line. Now edit the file "text" and put the symbol '=' at theef #log #next 37.2f 5 L37.2f _#print The file "paragraph" in this directory contains a number of commas followdifferent commands. The shell (which types '$' at you) understands "ls", "mv", "cp", "date" and so forth; the editor understandouse has nine lives let the cat out of the bag #create text cat's paw alley cat cat has nine lives let the cat out of the bag #uiod at the end of a line, without destroying anything in the line. In file 'decl' there should be a comma at the end of the thi beginning of lines 3 through 5. Then rewrite the file and type "ready". #create Ref beef pork =chicken =duck =turkey lamb fish ed by blanks. Please see to it that all commas are followed by exactly one blank. Then rewrite the file and type "ready". #creas such commands as 'w' or 'q'. Who knows about "diff"? Type "answer shell" or "answer editor". #copyin #user #uncopyin #match sser #cmp Ref text #log #next 39.1a 10 L38.2a, #print Sometimes you want to recognize a string of characters onrd line. Edit this file, put in the comma, and rewrite the file. Then type "ready". #create Ref When in the course of human ev#create text beef pork chicken duck turkey lamb fish #user #cmp text Ref #log #next 40.1a 10 L4.1a? j#print Yte Ref This text, although somewhat strained, is not really unintelligible. We have, you see to get enough commas, like this inhell #log #next 4.2b 5 4.1b 10 L4.2b& #print Who will recognize 'w'? Type "answer shell" or "answer editor".ly if they appear at the beginning of the line. The character '^' is used for this purpose. The command s/^ab/xy/ will changeents, it becomes necessary for one people to dissolve the political bands which have connected them with another, and to assume ou must recognize that the commands typed at the editor are distinct from the commands typed at the normal UNIX command interpreto it to give you some real practice. #create paragraph This text, although somewhat strained, is not really unintelligible.  #copyin #user #uncopyin #match editor #log #next 4.1b 5 5.1a 10 sL40.1a #print There is also a special chara "ab" to "xy" only if "ab" begins the line. Try the following and watch what it does. ed file 1,2p 1,2s/^ab/xy/ w q ready #creaamong the powers of the earth the separate and equal station to which the laws of Nature and of Nature's God entitle them ... #cter. In particular, neither program knows the commands recognized by the other one. So you must always remember when you are tWe have, you see to get enough commas,like this into it to give you some real practice. #user #cmp paragraph Ref #log #next 38cter which indicates the end of the line. It is '$'. So that s/ab$/xy/ changes 'ab' to 'xy' only if 'ab' ended the line. In te Ref xycd abcd #create file abcd abcd #user #cmp file Ref #log #next 38.2b 5 L38.2b #print In this dirreate decl When in the course of human events, it becomes necessary for one people to dissolve the political bands which have coalking to the normal command interpreter (the one that says $ to you) and when you are talking to the editor. The commands 'w' .1a 10 38.2a 6 PL38.1a #print Sometimes it is desirable to specify that the characters to be changed are at tthe file 'text' there are some lines which end in 'cup'. Change them to end in 'saucer'. Again, it only takes one command. Theectory there is a file "text"; whenever the letters "cat" begin a line, change them to "mouse"; but leave other instances of "cnnected them with another and to assume among the powers of the earth the separate and equal station to which the laws of Natureand 'q' are recognized by the editor. The commands 'ls', 'mv' and so forth are not. Can you expect the editor to recognize thehe beginning of the line. This uses the '^' character. For example, s/^ab/xy/p will change "ab" to "xy" ONLY if "ab" begins n rewrite the file and type 'ready'. #create Ref 3 teaspoons = 1 tablespoon 16 tablespoons = 1 saucer 48 teaspoons = 1 saucer 2 at" unaltered. Do this on each line. Then rewrite the file and type "ready". #create Ref mouse's paw alley cat mouse has nine l and of Nature's God entitle them ... #user #cmp decl Ref #log #next 41.1a 10 40.2b 9 L40.2b n#print In the fi command cat george Type yes or no. #copyin #user #uncopyin #match no #log #next 4.1b 5 5.1a 10 L4.1b? #prithe line. Remember that s/ab/xy/p would just change the first "ab" anywhere in the line. In this directory there is a file "tcups = 1 pint 2 pints = 1 quart 1/2 pt = 1 saucer #create text 3 teaspoons = 1 tablespoon 16 tablespoons = 1 saucer 48 teaspoonsives let the cat out of the bag #create text cat's paw alley cat cat has nine lives let the cat out of the bag #user #cmp text R)0 ( ) *!+",#-$.%/ &0 'le "section" change all lines ending in the characters ", to end in ," so that, for example, the line He said "I'll come",ken. It takes too long to get anything done. #user #cmp problem Ref #log #next 42.1a 10 42.2a 5 L42.1a #printe file. Then rewrite the file and type "ready". #create Ref When I was a lad I served a term As office boy in an attorney's firsalog is a persian cats #create test the cat in the catalog is a persian cat the cat in the catalog is a persian cat #user #cmp er be a king Often the "$" operator is useful here, if you want to change the last thing on the line. In the file 'text', the t becomes He said "I'll come," and then rewrite the file and type "ready". #create Ref This passage contains a few quoted "stri Normally the 's' command only changes the first instance on a line of the expression it is looking for. Sometimes you want to m I washed the windows and I swept the floor. And I polished up the handles on the big brass door. I polished up those handles test Ref #log #next 42.2b 5 L42.2b #print Now pick up the file 'stuff', change all instances of "green" everyhird line reads never, never, never, never, never Edit this file to make the third line read never, never, never, never, or ngs," of which some are "in the middle", and some "are at the beginning", and some "are at the end," but all end with commas. #cchange more than one instance. If you put a 'g' after the command, as in s/cat/dog/g all instances of 'cat' will be changed tso carefully. That now I am the ruler of the Queen's Navy. #create poem When I was a lad I served a term As office boy in an awhere to "red", and then rewrite the file and type "ready". #create Ref red light, village red red book, red paper, red pencil rhardly ever Rewrite the file and type "ready". #create Ref why should a dog, a horse, a rat, have life, and thou no breath at alreate section This passage contains a few quoted "strings", of which some are "in the middle", and some "are at the beginning", o 'dog'. To print the result you must say s/cat/dog/gp ('pg' at the end doesn't work, sorry). Edit file 'stuff' in this directttorney's firm I washed the windows and I swept the floor And I polished up the handles on the big brass door I polished up thoed car, red sign, redhorn red with envy #create stuff green light, village green green book, green paper, green pencil green carl? thou'lt come no more, never, never, never, never, or hardly ever pray you, undo this button. thank you, sir. #create text whand some "are at the end", but all end with commas. #user #cmp section Ref #log #next 40.2c 5 L40.2c  #print Iory to change every instance of 'green' to 'red' on every line. Then rewrite the file and type "ready". #create Ref red light, vse handles so carefully That now I am the ruler of the Queen's Navy #user #cmp poem Ref #log #next 41.1a 10 nL41.1a{, green sign, greenhorn green with envy #user #cmp stuff Ref #log #next 42.2c 5 L42.2c #print Remember the pry should a dog, a horse, a rat, have life, and thou no breath at all? thou'lt come no more, never, never, never, never, never prn the file "mess" delete all blanks at the ends of lines. Be prepared to delete several blanks if need be (remember the '*' chaillage red red book, red paper, red pencil red car, red sign, redhorn #create stuff green light, village green green book, green [#print One thing you must be careful of is that the substitute command does not know about word boundaries. It will chaocedures with '*' for changing one or more of something into one something. Pick up the file "sloppy" and on every line, whereeay you, undo this button. thank you, sir. #user #cmp text Ref #log #next 42.1a 10 41.1b 5 42.2a 6 vL41.1b #practer). Then rewrite the file and type "ready". #create Ref It is possible to use a small counter to keep approximate counts of paper, green pencil green car, green sign, greenhorn #user #cmp stuff Ref #log #next 43.1a 10 43.2a 5 fL42.2a2 nge the first occurrence of a letter string it matches without regard to blanks or punctuation around it. Thus, if the current ver there are several blanks in a row change them to one blank. This can be done with one command; it is a very common task. Thrint There is a mistyped word in the third line of the file "problem". Fix it, rewrite the file, and type "ready". #create Ref T large numbers. The resulting expected error can be controlled. #create mess It is possible to use a small counter to keep #print Normally the 's' command only changes the first instance on a line of the expression it is recognizing. Sometimes you line is i would rather be the king and you type s/the/a/p you get i would raar be the king instead of i would ratheren rewrite the file and type "ready". #create Ref It seems that medieval art Alone retains its zest To charm and please its devhe computer costs too much. No one knows how to use it. The switchboard in the main office is broken. It takes too long to get aapproximate counts of large numbers. The resulting expected error can be controlled. #user #cmp mess Ref #log #next 40.want to change everything. For example, try the following sequence, and note the difference between the changes on the two line be a king Right? You should always print lines after changing them to avoid missing such errors. You can defend against them otees We've done our level best We're not quite sure that all we do Has the Early English ring But as far as we can tell It'snything done. #create problem The computer costs too much. No one knows how to use it. The switchboard in thb main office is bro2d 5 L40.2d #print In file "poem" add the character "." (period) at the end of lines 3 through the end of ths. ed test 1,2p 1s/cat/cats/p 2s/cat/cats/gp w q ready #create Ref the cats in the catalog is a persian cat the cats in the catby increasing the amount of context you specify; in this case, for example, you could say s/the /a /p and get i would rath*0 ( ) *!+",#-$.%/ &0 ' something like this sort of thing. #create sloppy It seems that medieval art Alone retains its zest To charm and pleasstar spangled banner yet wave o'er the land of the free And the home of the brave? #user #cmp song Ref #log #next 44.1b 10 L44. how would you turn ". into ." Try the following sequence: ed test 1,3p 1,3s/"\./."/p w q ready #create Ref This is a "quoted neatly aligned, and the executable statements are stagggered so as to indicate several levels of control nesting. as to indicat4.1a 5 L44.1a #print You have now learned quite a bit about substitute commands. Here is a larger task to pee its devotees We've done our level best We're not quite sure that all we do Has the Early English ring But as far as 1b #print There is a file named "paragraph" in this directory. It contains three spelling errors, one line is word." Here is "another." Be "careful." Especially with dots. #create test This is a "quoted word". Here is "another". Be "care several levels of control nesting. There are text strings to suggest the intent of the program, and mnemonic identifiers to girform. There is a file 'song' in this directory. Edit it; print it out, and notice that there are six mistyped words in it. Fwe can tell It's something like this sort of thing. #user #cmp sloppy Ref #log #next 43.1a 10 43.2a 5 L43.1ag| duplicated, and the last line is missing (the paragraph should end "has been carefully coded and is now well under control."). eful". Especially with dots. #user #cmp test Ref #log #next 43.2b 5 L43.2b #print Pick up the file "line" ave hints about how the results are obtained. The genreal impression conveyed is that this is a moderately complicated problem tix all of them and rewrite the file. Then type "ready". #create Ref Oh, say can you see by the dawn's early light What so prou ]#print Note that there is quite a list of special characters recognized by the editor: . [ * ^ $ & / What do you do wheFix it up and rewrite it. Then type "ready". #create Ref Held at arm's length, this program looks pretty impressive. There is and change x, y. and z into x, y, and z Then rewrite the file and type "ready". #create Ref x, y, and z #create line x, y. anhat #user #cmp Ref paragraph #log #next 44.1c 10 L44.1c #print There is a file "list" in this directory whicdly we hailed at the twilight's last gleaming Whose broad stripes and bright stars through the perilous night O'er the rampartn you want to specifically use one of these characters as itself, rather than for its funny meaning? You must precede it by a b large assortment of data declarations, followed by a computation that is evidently complex enough to warrant a sub-procedure. d z #user #cmp line Ref #log #next 43.2c 5 iL43.2c #print This is trickier. Change all sequences of several h contains some names. Here are the addresses: add them on lines after the name (i.e. the file should look like: Joe Blow s we watched were so gallantly streaming And the rocket's red glare, the bombs bursting in air Gave proof through the night tackslash, as in s/\./,/p which will change the line x, y. and z into x, y, and z easily. The same works for all the otherDeclarations are neatly aligned, and the executable statements are staggered so as to indicate several levels of control nestingasterisks into one asterisk. E.g. *** xxx **** becomes * xxx * The file is named "stars"; edit it and then rewrite it. Then  45 Western Ave. Elmira, NY 10445 Sam Jones 97 Fifth St. Oshkosh, WI 52302 ... when you are done). Name hat our flag was still there Oh, say does that star spangled banner yet wave o'er the land of the free And the home of the brav special characters. What command would change * into c Type "answer COMMAND" where COMMAND is of the form s/.././p #copy. There are text strings to suggest the intent of the program, and mnemonic identifiers to give hints about how the results are type "ready". #create Ref List of phone numbers * 6377 * * 4582 * * 3968 * #create stars List of phone numbers **  address is Ford 1600 Pennsylvania Ave., Washington, DC 20515 Fenwick 1 Morris St., Morristown, NJ 07960 Rinaldo 308 Mae? #create song Oh, say can yuo see by the dawn's early light What so proudly we hailed at the twilight's last glieaming Whosein #user #uncopyin #match s/\*/c/p #match s/\*/c/ You forgot the "p" on the end. #log #next 44.1a 10 L43.2a: Eobtained. The general impression conveyed is that this is a moderately complicated problem that has been carefully coded and is6377 *** **** 4582 **** * 3968 *** #user #cmp stars Ref #log #next 43.2d 5 eL43.2d5 #print This is trickiein St., Orange, NJ 07050 Rodino 907 Broad St., Newark NJ 07102 #create Ref The Hon. Gerald Ford 1600 Pennsylvania Ave. Washing broad stxripes and bright stxars through the perilous night O'er the ramparts we watched were so gallantly streammming And th#print Note that there is quite a list of characters that are special to the editor: . [ * ^ $ & / What do you do when you want now well under control. #create paragraph Held at arm's length, this program looks pretty impressive. There is a large assortmer. File "name" contains A T and T Co. Change it to read A T & T Co. Then rewrite it and type "ready". #create Ref A T & T Coton, DC 20515 The Hon. Millicent Fenwick 1 Morris St. Morristown, NJ 07960 The Hon. Matthew Rinaldo 308 Main St. Orange, NJ 07e rocket's red glare, the bombs bursting in air Gave proof through thre night that our flag was still there Oh, say does that  to use one of these characters as itself, rather than for its special meaning? You must precede it by a backlash. For example,nt of dta declarations, followed by a computation that is evidently complex enough to warrant a sub-procedure. Declarations are. #create name A T and T Co. #user #cmp name Ref #succeed I hope you used s/and/\&/p and did not retype the line. #log #next 4+0 ( ) *!+",#-$.%/ &0 '050 The Hon. Peter Rodino 907 Broad St. Newark, NJ 07102 #create list The Hon. Gerald Ford The Hon. Millicent Fenwick The Hone finished this sequence.\n"); fflush(stdout); todo = 0; return; } for(i=0; fgets(s, 50, f); i++) { sscanf(sinserting with "i", or changing with "c", or reading with "r"), there's nothing special about "\" at all. To verify this, add t#print The next trick is to substitute a "\" into a line. The same idea holds: simply double the backslash, but this time on theh for lines that contain backslashes; again, it's simply a matter of doubling the backslash in the search pattern. That is, /. Matthew Rinaldo The Hon. Peter Rodino #user #cmp Ref list #log #next 44.1d 10 oL44.1dϐ #print In file "locs, "%s %d", &posslev[i], &diff[i]); } best = -1; /* cycle through lessons from random start */ /* first try the current phe line Two backslashes \\ do not equal one forward slash. to the file "junk", re-write it, then type "ready". #create Ref Thi right side of the "s" command. In the file "prog.c", convert every 'n' into "\n" Re-write the file, and type "ready". #c\\/ finds the next line with a backslash. Find the second occurrence of "\n\n" in the file "prog.c", and type "answer N", where" is a list of Bell Labs locations. Bring it up to date by a) replace "Raritan River" by "Piscataway" b) delete "Denville". clace, failing that back up to last place there are untried alternatives (but only one backup) */ n = grand()%i; for(ks is a file with a silly line in it. Two backslashes \\ do not equal one forward slash. #create junk This is a file with a sillyreate Ref x = "\n"; y = 'nop'; z = 'lmn'; q = "n"; r = "\n"+1; s = "\n" - "\n"; #create prog.c x = 'n'; y = 'nop N is its line number. #create prog.c int nsave = 0; selunit() { char fnam[20], s[50]; static char dobuff[50]; char po) insert "Atlanta". d) spell "Merrimack Valley" correctly. #create Ref Allentown Atlanta Centennial Park Chester Columbus Crawf=0; k1) { nsave=1; strcpy (saved, level); } todo = dobuff; fclose(f); } abjunk"; when you're done, re-write it and type "ready". #create Ref Now is the time for all good men to come to the aid of their 5.1av M#print There is one last class of substitutions that you should know about: converting one line into t==NULL) { fprintf(stderr, "No script for lesson %s.\n", level); wrapup(1); } while (fgets(zb, 200, f)) {  "\" is rather special to the editor (and to other programs as well). So what do you do when you have to somehow get a backslass(x) { return(x>=0? x: -x); } grand() { static int garbage; int a[2], b; time(a); b = a[1]+10*garbage++; return(b&party, or something like that. #create junk Now is \the \tim\\e for all good m\\en \to com\\e \to \the aid of \their par\ty, or wo or more by substituting a newline into the middle. Suppose you want to split the line Now is the time for all good men in trim(zb); if (strcmp(zb, "#next")==0) break; } } if (feof(f)) { printf("Congratulations\n\n.You havh into some text, or to edit it in or out? Getting it in in the first place is quite easy: when you are appending with "a" (or 077777); } #copyin #user #uncopyin #match 73 #bad 43 The second______ one. #log #next 44.1h 10 fL44.1hu som\\e\thing like \tha\t. #user #cmp Ref junk #log #next 44.1g 10 L44.1gt  #print Of course, you can also searc,0 ( ) *!+",#-$.%/ &0 'to Now is the time for all good men without re-typing. The substitute command is s/time /time\ / The backslash indik#print You can use other commands than 'p' with these context search addresses, of course. For example, /abc.e/s/ab/xx/phen type "ready". #create Ref Check your arithmetic: avoid costly mistakes. Attach W-2 forms: they must be attached to your retu2d X#print In file "text" print the first line which contains any of the words "them", "these", "their", or "t The address /xx/ means 'the next line containing an "xx"'. So this command prints out the next line which has an "xx" on it. cates that a newline is to be inserted at that point; the rest of the "s" command is actually typed on a new line. Practice by  will (1) search for the next line containing the expression "abc.e", which matches any line that has an 'a', then a rn. Sign your return: your spouse must sign too. #create split Check your arithmetic: avoid costly mistakes. Attach W-2 forms: there" (you need only distinguish "the"; that is, look for the letters "t", "h", and "e" followed by something other than a blankEdit the file 'text' and print the line which has 'cat' on it. Then leave the editor and type "ready". #create text This is a ssplitting the first line in file "btl" into Bell Laboratories Murray Hill, NJ 07974 using the "s" command as illustrated above'b', then a 'c', then anything, then an 'e' (so that it matches "abcde", "abcxe", "abc9e", but not "abceq"); (2) on they must be attached to your return. Sign your return: your spouse must sign too. #user #cmp Ref split #log #next 50.1a L5.1a). Delete the line you find ; then rewrite the file and type "ready". #create Ref the leaves do not have enough room to hold alhort list of things you might find in the Sears, Roebuck catalog. tools furniture electrical parts clothes appliances gard. Be sure to delete the comma and space properly. Re-write the file, then type "ready". #create Ref Bell Laboratories Murray Hilhat line, change the first "ab" to an "xx". Edit file 'county'; find the line with 'pacific' on it and change it to 'ocean'. Th( #print The most frequently used editor command is p which prints out a line. Try that now. Type the commandl the food that plants make. much of the food has to be stored in remote parts of the plant. we eat the parts of plants where ten equipment. #copyout #user #uncopyout grep catalog\. .ocopy >/dev/null #log #next 50.1b 10 /L50.1bX s#print Yl, NJ 07974 #create btl Bell Laboratories, Murray Hill, NJ 07974 #user #cmp btl Ref #log #next 45.1b mL45.1bv en rewrite the file and type "ready". #create Ref passaic bergen sussex hudson essex warren morris hunderdon somerset union ocea sequence p w q to print out a line, and then write out the file. Then type "ready". #create Ref This is the line to be printehe most food is stored. the carrot plant stores food in its roots. We eat the roots of carrots. the celery plant stores food iou can use all the special characters in the search commands. For example, /^cat/p prints the first line that BEGINS with 'cat#print The opposite command to splitting is joining. But this isn't done with a "s" as you might expect; it uses an entirely sepn monmouth middlesex mercer cumberland cape may #create county passaic bergen sussex hudson essex warren morris hunderdon somersd. Don't forget w, then q. 56 #create file This is the line to be printed. Don't forget w, then q. #copyout #pipe ed file #user n its leaf stalks, which are the parts the fruits of these plants to get the stored food in them. some kinds of plants have w'. You can even leave out the 'p': /^cat/ does the same thing. Now go into file 'text' with the editor and print the first linarate command called "j" (for "join"). To join two or more adjacent (!) lines, such as lines 3 through 6, simply type 3,6j Yet union pacific monmouth middlesex mercer cumberland cape may #user #cmp county Ref #log #next 51.1a 10 50.2e 5 eL50.2c#unpipe #uncopyout tail -2 .ocopy >X2 #cmp Ref X2 #log #next 6.1a 5 6.2a 2 uL50.1a$X w#print So far all the addrays of protecting their stored food. #create text the leaves do not have enough room to hold all the food that plants make. muce that ENDS with 'dog'. Then leave the editor and type 'ready'. #create text This is a file which contains several occurrences oou can add a "p" at the end to see the result. If you don't specify any lines, "j" by itself joins line "." and ".+1". In no ca p#print Edit file "junk" and print the first line that contains either "color" or "Color". Then leave the editor and esses you have used have been either line numbers, '$', or '.' (or combinations thereof). The most useful addresses are none ofh of the food has to be stored in remote parts of the plant. we eat the parts of plants where the most food is stored. the carrf the word 'dog' in several places. It would be a doggone shame if you didn't find the right dog to print out. #copyout #user #se does "j" add any extra blanks -- you have to put them in for yourself if you want them. The file "split" has six lines. Contype "ready". #create junk this file contains a few random lines much noise bright Colors other stuff colored paper and color by those, but are specifications of lines by content. Anything you can ask the substitute command to find in a line, you can ask tot plant stores food in its roots. We eat the roots of carrots. the celery plant stores food in its leaf stalks, which are the uncopyout grep 'dog$' text >X1 grep 'dog' .ocopy >X3 tail -1 X3 >X2 #cmp X1 X2 #log #next 50.1c 10 50.2c 5 tL50.1c vert it into three lines by joining 1 and 2, 3 and 4, and 5 and 6. Make sure that the words are separated by spaces. Re-write, t Technicolor #create x2 bright Colors #copyout #user #uncopyout grep olor .ocopy >x1 #cmp x1 x2 #log #next 50.2d 5 50.1c 10 L50.he editor to find in a file. In particular, /xx/p is a valid command with a line address /xx/ and the 'p' command operator. -0 ( ) *!+",#-$.%/ &0 'parts we eat. many kinds of plants store food in their fruits. we eat the fruits of these plants to get the stored food in theia, being necessary to the security of a free State, the right of the people to keep and bear arms shall not be infringed. 3. Ne is too long for you to print it all, by the way. #create story All of the Big Cats, as well as the lesser ones, have wonderfulhouses, papers, and effects, against unreasonable searches and seizures, shall not be violated, and no Warrants shall issue, butalong the ground. Others walk more slowly, or crawl still more slowly. Do you know that plants are travelers, too? And that theym. some kinds of plants have ways of protecting their stored food. #user #cmp text Ref #log #next 50.1c 10 L50.2eo Soldier shall, in time of peace, be quartered in any house without the consent of the Owner, nor in time of war, but in a mann eyes. They can see clearly even on a dark night. this is because of the way they are made. There is a sort of window in each ey upon suspicion, and particularly describing the place to be searched, and the persons or things to be seized. #user #cmp amend  also travel by land, by water and by air? Most plants stay in the same spot from the time they begin to grow until they die. Bu #print Please edit a file named "news" and find the first word containing the three letters "ufa". Make the word plural,er to be prescribed by law. 4. The right of the people to be secure in their persons, houses, papers, and effects, against unree. This window is called the pupil. It is black and is placed in the center of the colored part of the eye. The pupil lets lightRef #log #next 51.1a 10 51.2a 5 L51.1a A#print You can also use relative addresses of the +1 or -1 sort with ct the next season you find many of them growing in new places. How do they get there? Some plants travel by land. They have seed rewrite the file, and type "ready". #create Ref It was announced today in Washington that the GNP was up at an annual rate of 8asonable searches and seizures, shall not be violated, and no Warrants shall issue, but upon probable cause, supported by oath o come in and reach a kind of mirror at the back of each eye. These mirrors reflect everything that is in front of the eyes. Righontext searches. For example, to print the line after a line containing "cat", you can say /cat/+1p How would you print the ls that fall to the ground and grow there. Others send out offshoots or sprouts which start new plants nearby. #copyin #user #unc.2 % in the third quarter of 1975. Fishing and agriculture declined slightly but manufactures increased substantially. The overr affirmation, and particularly describing the place to be searched, and the persons or things to be seized. #create amend 1. Cot away a special nerve carries these reflected pictures to the brain. I'm learning to be a detective -- not the kind who solves ine before the next line containing the word "help" at the beginning of the line? Try some experiments if you want, but in the opyin #match 286 #log #next 50.2g 10 oL50.2g `#print The file "amend" contains an erroneous copy of the first all gain was impressive and confirms economic recovery. #create news It was announced today in Washington that the GNP was up atngress shall make no law respecting an establishment of religion, or prohibiting the free exercise thereof; or abridging the frecrimes from fingerprints, pieces of clothing, or the cross-examining of witnesses -- I'm learning to be a nature detective. The end type "answer COMMAND" where COMMAND is the correct command to do that. #copyin #user #uncopyin #match /^help/-1p #match /^hefour amendments to the Constitution. Find the line saying "suspicion" and change it to read "but upon probable cause, supported an annual rate of 8.2 % in the third quarter of 1975. Fishing and agriculture declined slightly but manufacture increased substedom of speech, or of the press; or the right of the people peaceably to assemble, and to petition the Government for a redress mysteries I trace happen in the woods, in the park, and in my own backyard. Animals come and go when I'm not there to see them, lp/-1 #match /^help/- #match /^help/-p #succeed The "p" isn't necessary, of course. #cmp X1 X2 #log #next 52.1a 10 52.2a 5 iL51. by oath or affirmation," and then rewrite the file and type "ready". #create Ref 1. Congress shall make no law respecting an esantially. The overall gain was impressive and confirms economic recovery. #user #cmp news Ref #log #next 50.2f 10 uL50.2fof grievances. 2. A well regulated Militia, being necessary to the security of a free State, the right of the people to keep anbut usually they leave clues behind. From such clues and other animal signs, you and I will piece together some exciting stories2a #print You can also use relative addresses of the +1 or -1 sort with context searches. For example, to prtablishment of religion, or prohibiting the free exercise thereof; or abridging the freedom of speech, or of the press; or the r #print Look in the file "story". Somewhere is a line containing the word "season". Find it, and find what line nd bear arms shall not be infringed. 3. No Soldier shall, in time of peace, be quartered in any house without the consent of the. We will detect which animals went where, what they did, and sometimes what they ate. Whenever there is snow on the ground, youint the line after the line containing "cat", you could say /cat/+1p Here is a file "text". Print the line before the line ight of the people peaceably to assemble, and to petition the Government for a redress of grievances. 2. A well regulated Militumber it has. Leave the editor and type "answer N" where N is the line number of the line containing the word "season". The fil Owner, nor in time of war, but in a manner to be prescribed by law. 4. The right of the people to be secure in their persons,  are sure to find track stories written in it. Animals travel by air by water and by land. Some run very fast. Some hop or jump .0 ( ) *!+",#-$.%/ &0 'containing "florin". Then leave the editor and type "ready". #create text The United Netherlands are a confederacy of republ answer COMMAND where COMMAND is the search-and-print command to do that. #copyin #user #uncopyin #match /TL/+1p #match /TL/+ #vern as sovereigns the dependent territories. The provinces are restrained, unless with the general consent, from entering into at they should, to all general purposes, be one nation, under one federal government, than that they should divide themselves inerences; to give audiences to foreign ambassadors and to keep agents for his particular affairs at foreign courts. In his milics, or rather of aristocracies of a very remarkable texture, yet confirming all the lessons derived from those which we have almatch /TL/1 #match /TL/1p #match /TL/+p #match /TL/+1 #log #next 51.2c 5 nL51.2c #print How would you look foforeign treaties; from establishing imposts injurious to others, or charging their neighbors with higher duties than their own sto separate confederacies and give to the head of each the same kind of powers which they are advised to place in one national gitary capacity he commands the federal troops, provides for garrisons, and in general regulates military affairs; disposes of already reviewed. The union is composed of seven coequal and sovereign states, and each state or province is a composition of er a blank line? Do you understand /^$/p Note this command: it looks for the beginning of the line, followed immediately by ubjects. A council of state, a chamber of accounts, with five colleges of admiralty, aid and fortify the federal administrationovernment. It has until lately been a received and uncontradicted opinion that the prosperity of the people of America dependl appointments, from colonels to ensigns, and of the governments and posts of fortified towns. In his marine capacity he is aqual and independent cities. In all important cases, not only the provinces but the cities must be unanimous. The sovereigntthe end of the line. If there are any characters in between, it will keep looking for a line with no__ characters at all. Al. The executive magistrate of the Union is the stadtholder, who is now an hereditary prince. His principal weight and influeed on their continuing firmly united, and the wishes, prayers, and efforts of our best and wisest citizens have been constantly dmiral-general and superintends and directs every thing relative to naval forces and other naval affairs; presides in the admiray of the union is represented by the States-General, consisting usually of about fifty deputies appointed by the provinces. Thel right. The file "text" contains an extraneous blank line. Delete it and rewrite the file. #create Ref When the people of Amnce in the republic are derived from his independent title; from his great patrimonial estates; from his family connections withdirected to that object. But politicians now appear who insist that this opinion is erroneous, and that instead of looking for lties in person or by proxy; appoints lieutenant-admirals and other officers; and establishes councils of war, whose sentences ay hold their seats, some for life, some for six, three, and one years; from two provinces they continue in appointment during plerica reflect that they are now called upon to decide a question, which in its consequences must prove one of the most important some of the chief potentates of Europe; and, more that all, perhaps, from his being stadtholder in the several provinces, as wesafety and happiness in union, we ought to seek it in a division of the States into distinct confederacies or sovereignties. Hore not executed till he approves them. His revenue, exclusive of his private income, amounts to 300,000 florins. The standineasure. The States-General have authority to enter into treaties and alliances; to make war and peace; to raise armies and eq that ever engaged their attention, the propriety of their taking a very comprehensive, as well as a very serious, view of it will as for the Union; in which provincial quality he has the appointment of town magistrates under certain regulations, executes wever extraordinary this new doctrine may appear, it nevertheless has its advocates; and certain characters who were much opposeg army which he commands consists of about 40,000 men. #create x2 His revenue, exclusive of his private income, amounts #copyuip fleets; to ascertain quotas and demand contributions. In all these cases, however, unanimity and sanction of their constitull be evident. Nothing is more certain than the indispensable necessity of government; and it is equally undeniable that whenprovincial decrees, presides when he pleases in the provincial tribunals, and has throughout the power of pardon. As stadthold to it formerly are at present of the number. Whatever may be the arguments or inducements which have wrought this change in thout #user #uncopyout grep exclusive .ocopy >x1 #cmp x1 x2 #log #next 51.2b 5 cL51.2b] a#print Suppose you have ents are requisite. They have authority to appoint and receive ambassadors; to execute treaties and alliances already formed; toever and however it is instituted, the people must cede to it some of their natural rights, in order to vest it with requisite pder of the Union, he has, however, considerable prerogatives. In his political capacity he has authority to settle disputes be sentiments and declarations of these gentlemen, it certainly would not be wise in the people at large to adopt these new polita memo in a file and the line with the title is preceded by a line with "TL" on it. What command would print the title? Reply  provide for the collection of duties on imports and exports; to regulate the mint with a saving to the provincial rights; to goowers. It is well worthy of consideration, therefore, whether it would conduce more to the interest of the people of America thetween the provinces, when other methods fail; to assist at the deliberations of the States-General and at their particular conf/0 ( ) *!+",#-$.%/ &0 'ical tenets without being fully convinced that they are founded in truth and sound policy. #create text When the people of Am found that the easiest way to change the file would be with the commands /B.3.i/p .,/B.3.v/s/B/A/ or some such series. #log #directed to that object. But politicians now appear who insist that this opinion is erroneous, and that instead of looking for  ext 3878 Ossanna J F ext 3520 Thompson K ext 2394 Pinson E N tel 2582 Bourne S R tel 7419 Ellie beginning "B.3.v" to begin "A.3". Then rewrite the file and type "ready". #create Ref First section A.1.i Introduction A.1.erica reflect that they are now called upon to decide a question, which in its consequences must prove one of the most importantnext 52.1b 10 L52.1b #print Even more powerful is to use two context searches for the pair of addresses in frsafety and happiness in union, we ought to seek it in a division of the States into distinct confederacies or sovereignties. Hoot R J tel 2879 Fraser A G tel 3685 Johnson S C tel 3968 Kernighan B W ext 6021 Ritchie D M ext 37ii Definitions Second section A.2.i Scope A.2.ii Date effective A.2.iii Who covered Third section A.3.i Governing com that ever engaged their attention, the propriety of their taking a very comprehensive, as well as a very serious, view of it wiont of a command. For example /abc/,/def/p will print all lines from the one that contains "abc" to the one that contains "dewever extraordinary this new doctrine may appear, it nevertheless has its advocates; and certain characters who were much oppose70 Vollaro J R ext 6321 #user #cmp phone Ref #log #next 53.1a 10 52.2c 5 aL52.2a #print You can use paimittee A.3.ii Chairman's election A.3.iii Board terms A.3.iv Board elections A.3.v Removal procedure Fourth section A.4.ll be evident. Nothing is more certain than the indispensable necessity of government; and it is equally undeniable that whenf". In this directory is a file "phone". On every line between "Pinson" and "Johnson" change "tel" to "ext". (Again, print thed to it formerly are at present of the number. Whatever may be the arguments or inducements which have wrought this change in thrs of addresses which involve searches. For example, to print all lines from the first line until the next line containing "stoi Meetings A.4.ii Place of meeting A.4.iii Frequency of meetings Fifth section A.5.i Record keeping A.5.ii Correspondever and however it is instituted, the people must cede to it some of their natural rights, in order to vest it with requisite p whole file first to see what's going on here and why the file is bad.) Then rewrite the corrected file and type "ready". #create sentiments and declarations of these gentlemen, it certainly would not be wise in the people at large to adopt these new politp", say 1,/stop/p In this directory is a file "list". Print all lines from the first line to a line containing "023". Thening secretary A.5.iii Recording secretary A.5.iv Financial records #create outline First section A.1.i Introduction A.1.iiowers. It is well worthy of consideration, therefore, whether it would conduce more to the interest of the people of America the Ref telephone numbers McIlroy M D ext 6050 Aho A V ext 4862 Baker B S ext 6503 Cherry L L extical tenets without being fully convinced that they are founded in truth and sound policy. #user #cmp Ref text #log #next 52.1a leave the editor and type "ready". #create list bio011 bio012 bio013 bio014 bio015 bio016 bio017 bio021 bio022 bio023 bio024 bi Definitions Second section A.2.i Scope A.2.ii Date effective A.2.iii Who covered Third section B.3.i Governing commiat they should, to all general purposes, be one nation, under one federal government, than that they should divide themselves in 6067 Knowlton K ext 2328 Morris R ext 3878 Ossanna J F ext 3520 Thompson K ext 2394 Pinson E N  10 52.2a 5 L52.1a5 #print A very powerful tool is to use pairs of addresses which include searches. For examo025 bio026 bio027 bio028 bio031 bio032 bio033 bio034 bio035 bio036 bio037 bio038 bio041 bio042 bio043 bio044 bio045 bio046 bio0ttee B.3.ii Chairman's election B.3.iii Board terms B.3.iv Board elections B.3.v Removal procedure Fourth section A.4.i to separate confederacies and give to the head of each the same kind of powers which they are advised to place in one national g ext 2582 Bourne S R ext 7419 Elliot R J ext 2879 Fraser A G ext 3685 Johnson S C ext 3968 Kernigple, to print all lines from the present line to the next line containing "stop", say .,/stop/p (remember that "." is the pres47 bio051 #create x2 bio011 bio012 bio013 bio014 bio015 bio016 bio017 bio021 bio022 bio023 #copyout #user #uncopyout grep bio .o Meetings A.4.ii Place of meeting A.4.iii Frequency of meetings Fifth section A.5.i Record keeping A.5.ii Correspondinovernment. It has until lately been a received and uncontradicted opinion that the prosperity of the people of America dependhan B W ext 6021 Ritchie D M ext 3770 Vollaro J R ext 6321 #create phone telephone numbers McIlroy M D eent line). In this directory is a file "outline". Find the line that begins "B.3.i". Note that this line, and the next few licopy >x1 #cmp x1 x2 #log #next 52.2b 5 L52.2b[5 4#print In this directory is a file "outline". Find the line tg secretary A.5.iii Recording secretary A.5.iv Financial records #user #cmp outline Ref #succeed You got it right: I hope youed on their continuing firmly united, and the wishes, prayers, and efforts of our best and wisest citizens have been constantly xt 6050 Aho A V ext 4862 Baker B S ext 6503 Cherry L L ext 6067 Knowlton K ext 2328 Morris R nes, should begin "A..." for consistency. (Print the whole file to see what's wrong). Change all lines from this line to the lin00 ( ) *!+",#-$.%/ &0 'hat begins "B.3.i". Note that this line, and the next few lines, should begin "A"... for consistency. (Print the whole file to judges trame trample viws views Fix things up, rewrite the file, and then type "ready". #create Ref Amongording secretary A.5.iv Financial records #user #cmp outline Ref #succeed You got it right: I hope you found that the easiest rate and virtuous citizens, equally the friends of public and private faith and of public and personal liberty, that out governme staff into thinking they were working on the system when in fact they were not. This let the remaining 1:0% of the sta see what is going on. It's fairly short.) Change all lines from the line beginning "B.3.i" to the line beginning "B.3.v" to be the numerous advantages promised by a well-constructed Union, none deserves to be more accurately developed than its tendency tway to change the file would be with the commands /B.3.i/p .,/B.3.v/s/B/A/ or some such series. #log #next 52.1b 10 L52.2cents are too unstable, that the public good is disregarded in the conflicts of rival parties, and that measures are too often deff actually get the thing built. .SH II. Details .PP The project began on June 1, 1974. It was completed on Sept. 1, 197gin "A.3". Then rewrite the file and type "ready". #create Ref First section A.1.i Introduction A.1.ii Definitions Second o break and control the violence of faction. The friend of popular governments never finds himself so much alarmed for their cha F#print In this directory is a file "memo". Between the line containing "I." and the line containing "II." changcided, not according to the rules of justice and the rights of the minor party, but by the superior force of an interested and o5 and has worked successfully since then. #user #cmp memo Ref #log #next 53.1a 10 L53.1a• #print Note thatsection A.2.i Scope A.2.ii Date effective A.2.iii Who covered Third section A.3.i Governing committee A.3.ii Chairmanracter and fate as when he contemplates their propensity to this dangerous vice. He will not fail, therefore, to set a due valuee all multiple blanks to one blank. Then rewrite the file and type "ready". #create Ref .TL The Time Has Come .AU Joe Idiot .verbearing majority. However anxiously we may wish that these complaints had no foundation, the evidence of known facts will not the // searches always go forward. Sometimes you want to go backward, to find some expression on a line before the one you are 's election A.3.iii Board terms A.3.iv Board elections A.3.v Removal procedure Fourth section A.4.i Meetings A.4.ii P on any plan which, without violating the principles to which he is attached, provides a proper cure for it. The instability, inAI Bell Labs Murray Hill, NJ 07974 .SH I. Introduction .PP This document describes the problems of designing complex systems w permit us to deny that they are in some degree true. It will be found, indeed, on a candid review of our situation, that some onow working on. In that case you can search with a command like ?abc?p which prints the nearest preceding line which contains lace of meeting A.4.iii Frequency of meetings Fifth section A.5.i Record keeping A.5.ii Corresponding secretary A.5.iii Rjustice, and confusion introduced into the public councils have, in truth, been the mortal diseases under which popular governmeithout adequately trained manpower. The solution adopted was to trick 90% of the staff into thinking they were working on the syf the distresses under which we labor have been erroneously charged on the operation of our governments; but it will be found, a'abc'. What command would print the nearest previous line that ends in "cat"? Type "answer COMMAND" when you figure it out. #coecording secretary A.5.iv Financial records #create outline First section A.1.i Introduction A.1.ii Definitions Second sents have everywhere perished, as they continue to be the favorite and fruitful topics from which the adversaries to liberty deristem when in fact they were not. This let the remaining 1:0% of the staff actually get the thing built. .SH II. Details .PP The t the same time, that other causes will not alone account for many of our heaviest misfortunes; and, particularly, for that prevpyin #user #uncopyin #match ?cat$?p The "p" isn't needed, but use it if you like too. #match ?cat$? #cmp X1 X2 #log #next 54.1a ction A.2.i Scope A.2.ii Date effective A.2.iii Who covered Third section B.3.i Governing committee B.3.ii Chairman'sve their most specious declamations. The valuable improvements made by the American constitutions on the popular models, both anproject began on June 1, 1974. It was completed on Sept. 1, 1975 and has worked successfully since then. #create memo ailing and increasing distrust of public engagements and alarm for private rights which are echoed from one end of the continent10 53.2b 7 rL53.2b& I#print There is a big file "federal" in this directory. It contains the following mistyped election B.3.iii Board terms B.3.iv Board elections B.3.v Removal procedure Fourth section A.4.i Meetings A.4.ii Placient and modern, cannot certainly be too much admired; but it would be an unwarrantable partiality to contend that they have as.TL The Time Has Come .AU Joe Idiot .AI Bell Labs Murray Hill, NJ 07974 .SH I. Introduction .PP This document describes the to the other. These must be chiefly, if not wholly, effects of the unsteadiness and injustice with which a factious spirit has  words: Typed as Should be cotnend contend aalarm alarm exedient expedient drabel durable ugdes ce of meeting A.4.iii Frequency of meetings Fifth section A.5.i Record keeping A.5.ii Corresponding secretary A.5.iii Rec effectually obviated the danger on this side, as was wished and expected. Complaints are everywhere heard from our most conside problems of designing complex systems without adequately trained manpower. The solution adopted was to trick 90% of th10 ( ) *!+",#-$.%/ &0 'tainted out public administration. By a faction I understand a number of citizens, whether amounting to a majority or minorit the necessary and ordinary operations of government. No man is allowed to be a judge in has own cause, because his interest ty to exercise it, different opinions will be formed. As long as the connection subsists between his reason and his self-love,  on the various descriptions of property is an act which seems to require the most exact impartiality; yet there is, perhaps, noe fortunes have been interesting to the human passions, have, in turn, divided mankind into parties, inflamed them with mutual ay of the whole, who are united and actuated by some common impulse of passion, or of interest, adverse to the rights of other ciwould certainly bias his judgement, and, not improbably, corrupt his integrity. With equal, nay with greater reason, a body of mhis opinions and his passions will have a reciprocal influence on each other; and the former will be objects to which the latter legislative act in which greater opportunity and temptation are given to a predominant party to trample on the rules of justicenimosity, and rendered them much more disposed to vex and oppress each other than to co-operate for their common goal. So strongtizens, or to the permanent and aggregate interests of the community. There are two methods of curing the mischiefs of factioen are unfit to be both judges and parties at the same time; yet what are many of the most important acts of legislation but so  will attach themselves. The diversity in the faculties of men, from which the rights of property originate, is not less an insu. Every shilling with which they overburden the inferior number is a shilling saved to their own pockets. It is in vain to sa is this propensity of mankind to fall into mutual animosities that where no substantial occasion presents itself the most frivon: The one, by removing its causes; the other, by controlling its effects. There are again two methods of removing the causesmany judicial determinations, not indeed concerning the rights of single person, but concerning the rights of large bodies of ciperable obstacle to the uniformity of interests. The protection of these faculties is the first object of government. From the py that enlightened statesmen will be able to adjust these clashing interests and render them all subservient to the public good.lous and fanciful distinctions have been sufficient to kindle their unfriendly passions and excite their most violent conflicts. of faction: The one, by destroying the liberty which is essential to its existence; The other, by giving to every citizen the stizens? And what are the different classes of legislators but advocates and parties to the causes which they determine? Is a lawrotection of different and unequal faculties of acquiring property, the possession of different degrees and kinds of property im Enlightened statesmen will not always be at the helm. Nor, in many cases, can such an adjustment be made at all without taking  But the most common and durable source of factions has been the verious and unequal distribution of property. Those who hold aname opinions, the same passions, and the same interests. It could never be more truly said than of the first remedy that it w proposed concerning private debts? It is a question to which the creditors are parties one one side and the debtors on the othemediately results; and from the influence of these on the sentiments and views of the respective proprietors ensues a division ointo view indirect and remote considerations, which will rarely prevail over the immediate interest which one party may find in d those who are without property have ever formed distinct interests in society. Those who are creditors, and those who are debtas worse than the disease. Liberty is to faction what air is to fire, an ailment without which it instantly expires. But it coulr. Justice ought to hold the balance between them. Yet the parties are, and must be, themselves the judges; and the most numerouf the society into different interests and parties. The latent causes of faction are thus sown in the nature of man; and we sdisregarding the rights of another or the good of the whole. The inference to which we are brought is that the causes of factors, fall under a like discrimination. A landed interest, a manufacturing interest, a mercantile interest, a moneyed interest, wd not be less folly to abolish liberty, which is essential to political life, because it nourishes faction than it would be to ws party, or in other words, the most powerful faction must be expected to prevail. Shall domestic manufacturers be encouraged, aee them everywhere brought into different degrees of activity, according to the different circumstances of civil society. A zealion cannot be removed and that relief is only to be sought in the means of controlling its effects. If a faction consists of ith many lesser interests, grow up of necessity in civilized nations, and divided them into different classes, actuated by diffeish the annihilation of air, which is essential to animal life, because it imparts to dire its destructive agency. The secondnd in what degree, by restrictions on foreign manufacturers? are questions which would be differently decided by the landed and  for different opinions concerning religion, concerning government, and many other points, as well of speculation as of practiceless than a majority, relief is supplied by the republican principle, which enables the majority to defeat its sinister views byrent sentiments and views. The regulation of these various and interfering interests involves the spirit of party and faction in expedient is as impracticable as the first would be unwise. As long as the reason of man continues fallible, and he is at liberthe manufacturing classes, and probably by neither with a sole regard to justice and the public good. The apportionment of taxes; an attachment to different leaders ambitiously contending for pre-eminence and power; or to persons of other descriptions whos20 ( ) *!+",#-$.%/ &0 ' regular vote. It may clog the administration, it may convulse the society; But it will be unable to execute and mask its violeno its existence; The other, by giving to every citizen the same opinions, the same passions, and the same interests. It couldttached, provides a proper cure for it. The instability, injustice, and confusion introduced into the public councils have, in the possession of different degrees and kinds of property immediately results; and from the influence of these on the sentiments d, indeed, on a candid review of our situation, that some of the distresses under which we labor have been erroneously charged oce under the forms of the Constitution. When a majority is included in a faction, The form of popular government, on the other h never be more truly said than of the first remedy that it was worse than the disease. Liberty is to faction what air is to fireruth, been the mortal diseases under which popular governments have everywhere perished, as they continue to be the favorite andand views of the respective proprietors ensues a division of the society into different interests and parties. The latent caun the operation of our governments; but it will be found, at the same time, that other causes will not alone account for many ofand, enables it to sacrifice to its ruling passion or interest both the public good and the rights of other citizens. To secure , an ailment without which it instantly expires. But it could not be less folly to abolish liberty, which is essential to politi fruitful topics from which the adversaries to liberty derive their most specious declamations. The valuable improvements made bses of faction are thus sown in the nature of man; and we see them everywhere brought into different degrees of activity, accord our heaviest misfortunes; and, particularly, for that prevailing and increasing distrust of public engagements and aalarm for pthe public good and private rights against the danger of such a faction, and at the same time to preserve the spirit and form ofcal life, because it nourishes faction than it would be to wish the annihilation of air, which is essential to animal life, becay the American constitutions on the popular models, both ancient and modern, cannot certainly be too much admired; but it would ing to the different circumstances of civil society. A zeal for different opinions concerning religion, concerning government, arivate rights which are echoed from one end of the continent to the other. These must be chiefly, if not wholly, effects of the  popular government, is than the great object to which our inquiries are directed. Let me add that it is the great desideratum buse it imparts to dire its destructive agency. The second exedient is as impracticable as the first would be unwise. As long be an unwarrantable partiality to cotnend that they have as effectually obviated the danger on this side, as was wished and expend many other points, as well of speculation as of practice; an attachment to different leaders ambitiously contending for pre-eunsteadiness and injustice with which a factious spirit has tainted out public administration. By a faction I understand a nuy which alone this form of government can be rescued from the opprobrium under which it has so long labored and be recommended tas the reason of man continues fallible, and he is at liberty to exercise it, different opinions will be formed. As long as thected. Complaints are everywhere heard from our most considerate and virtuous citizens, equally the friends of public and privateminence and power; or to persons of other descriptions whose fortunes have been interesting to the human passions, have, in turnmber of citizens, whether amounting to a majority or minority of the whole, who are united and actuated by some common impulse oo the esteem and adoption of mankind. #create federal Among the numerous advantages promised by a well-constructed Union, none d connection subsists between his reason and his self-love, his opinions and his passions will have a reciprocal influence on eac faith and of public and personal liberty, that out governments are too unstable, that the public good is disregarded in the con, divided mankind into parties, inflamed them with mutual animosity, and rendered them much more disposed to vex and oppress eacf passion, or of interest, adverse to the rights of other citizens, or to the permanent and aggregate interests of the communityeserves to be more accurately developed than its tendency to break and control the violence of faction. The friend of popular goh other; and the former will be objects to which the latter will attach themselves. The diversity in the faculties of men, from flicts of rival parties, and that measures are too often decided, not according to the rules of justice and the rights of the mih other than to co-operate for their common goal. So strong is this propensity of mankind to fall into mutual animosities that w. There are two methods of curing the mischiefs of faction: The one, by removing its causes; the other, by controlling its efvernments never finds himself so much alarmed for their character and fate as when he contemplates their propensity to this dangwhich the rights of property originate, is not less an insuperable obstacle to the uniformity of interests. The protection of thnor party, but by the superior force of an interested and overbearing majority. However anxiously we may wish that these complaihere no substantial occasion presents itself the most frivolous and fanciful distinctions have been sufficient to kindle their ufects. There are again two methods of removing the causes of faction: The one, by destroying the liberty which is essential terous vice. He will not fail, therefore, to set a due value on any plan which, without violating the principles to which he is aese faculties is the first object of government. From the protection of different and unequal faculties of acquiring property, tnts had no foundation, the evidence of known facts will not permit us to deny that they are in some degree true. It will be foun30 ( ) *!+",#-$.%/ &0 'nfriendly passions and excite their most violent conflicts. But the most common and drabel source of factions has been the verioirected. Let me add that it is the great desideratum by which alone this form of government can be rescued from the opprobrium u and parties to the causes which they determine? Is a law proposed concerning private debts? It is a question to which the credinext 55.1a 10 54.1b 8 L54.1bݕ a#print The fact that the system remembers the last regular expression it had is , can such an adjustment be made at all without taking into view indirect and remote considerations, which will rarely prevail ous and unequal distribution of property. Those who hold and those who are without property have ever formed distinct interests inder which it has so long labored and be recommended to the esteem and adoption of mankind. #user #cmp federal Ref #log #next 54tors are parties one one side and the debtors on the other. Justice ought to hold the balance between them. Yet the parties are,particularly useful when the regular expression is complex. Suppose, for example, you know that the words "first" and "second" ver the immediate interest which one party may find in disregarding the rights of another or the good of the whole. The infern society. Those who are creditors, and those who are debtors, fall under a like discrimination. A landed interest, a manufactur.1a 10 oL54.1a( #print A time-saving feature of context searches is that the editor remembers the last regular and must be, themselves the judges; and the most numerous party, or in other words, the most powerful faction must be expected appear on the same line and you wish to delete them and everything between them. You could write /first.*second/s/first.*secoence to which we are brought is that the causes of faction cannot be removed and that relief is only to be sought in the means oing interest, a mercantile interest, a moneyed interest, with many lesser interests, grow up of necessity in civilized nations,  expression mentioned, and if you just say // or ?? with no expression, it assumes the same one. Thus /abc/s//def/ searches foto prevail. Shall domestic manufacturers be encouraged, and in what degree, by restrictions on foreign manufacturers? are questind//p but isn't it easier to do /first.*second/s///p Edit the file "passage"; the words "twentieth" and "impending" appear on f controlling its effects. If a faction consists of less than a majority, relief is supplied by the republican principle, whiand divided them into different classes, actuated by different sentiments and views. The regulation of these various and interfer a line with 'abc', and, on finding it, changes the 'abc' to 'def'. Similarly /qqq/s/// finds a 'qqq' and then throws it awons which would be differently decided by the landed and the manufacturing classes, and probably by neither with a sole regard tthe same line. Replace them and everything between them by the word "impending" (i.e. delete from "twentieth" up to but not incch enables the majority to defeat its sinister viws by regular vote. It may clog the administration, it may convulse the societyring interests involves the spirit of party and faction in the necessary and ordinary operations of government. No man is allay, as if the command were /qqq/s/qqq// In this directory is a file 'error' which contains "servixe" as a mistyping for "servico justice and the public good. The apportionment of taxes on the various descriptions of property is an act which seems to requiluding "impending"). One command, if you can. Then rewrite the file and type ready. #create Ref America's rise to world powe; But it will be unable to execute and mask its violence under the forms of the Constitution. When a majority is included in a fowed to be a judge in has own cause, because his interest would certainly bias his judgement, and, not improbably, corrupt his ie". Find the bad instance and fix it, if possible with one command. Then rewrite the file and type 'ready'. #create Ref This fire the most exact impartiality; yet there is, perhaps, no legislative act in which greater opportunity and temptation are given r is a consequence of the nation's geographic position, natural resources, and dynamic energy. For the first century and more oaction, The form of popular government, on the other hand, enables it to sacrifice to its ruling passion or interest both the puntegrity. With equal, nay with greater reason, a body of men are unfit to be both ugdes and parties at the same time; yet what ale contains many copies of the word service but in all of those lines with service in them the next line has a service that is sto a predominant party to trame on the rules of justice. Every shilling with which they overburden the inferior number is a shilf national history, however, continental expansion and internal developments largely absorbed the energies of the American peoplblic good and the rights of other citizens. To secure the public good and private rights against the danger of such a faction, are many of the most important acts of legislation but so many judicial determinations, not indeed concerning the rights of singlpelled wrong unlike the other services. #create error This file contains many copies of the word service but in all of those linling saved to their own pockets. It is in vain to say that enlightened statesmen will be able to adjust these clashing interee. Every dictate of public interest emphasized the importance of avoiding all entanglements that might involve the young republnd at the same time to preserve the spirit and form of popular government, is than the great object to which our inquiries are de person, but concerning the rights of large bodies of citizens? And what are the different classes of legislators but advocateses with service in them the next line has a servixe that is spelled wrong unlike the other services. #user #cmp error Ref #log #sts and render them all subservient to the public good. Enlightened statesmen will not always be at the helm. Nor, in many cases40 ( ) *!+",#-$.%/ &0 'ic in foreign rivalries and foreign wars. Only with the impending shifts in the European balance of power, and the growth of Amis easy. For example, to print the 3rd line you say 3p To print the first line 1p (That's a one, no matter how much it looke "pres"; print some line; then hit return or newline, and watch the editor print the next line. Is there any difference betweeog #next 6.2b 5 L6.2b. ]#print Same thing again, but this time print the fifth line in the file. Then type "wnt For symmetry, you can use + instead of either ".+1p" or an empty line (just a newline). The only advantage that + has is terican economic and industrial strength create a situation that made impossible a continued aloofness from international affairss like the letter "l".) Here is a file: I'll put you into the editor with that file as the 'current file' - print the 4th line, n newline and ".+1p" as a command? When you think you know, leave the editor and type "yes" or "no". #create pres George Washin", "q", and "ready". #create Ref james monroe 91 #create file george washington john adams thomas jefferson james madison james hat you can repeat it: ++ prints the second following line, and +++ the third. The same is true of -. If the current line . #create passage America's rise to world power is a consequence of the nation's geographic position, natural resources, and then type 'w', 'q', and 'ready' as usual. #create Ref james madison 91 #create file george washington john adams thomas jeffersogton John Adams Thomas Jefferson James Madison James Monroe John Quincy Adams Andrew Jackson Martin van Buren William Henry Harrmonroe john quincy adams #print file #copyout #pipe ed file #user #unpipe #uncopyout tail -2 .ocopy >X2 #cmp Ref X2 #log #next 7is line number 10, what line number is -- going to be? (Hint: you can find out by editing a file such as "pres", saying "10p", dynamic energy. For the first century and more of national history, however, continental expansion and internal developments lan james madison james monroe john quincy adams #print file #copyout #pipe ed file #user #unpipe #uncopyout tail -2 .ocopy >X2 #cison John Tyler James K. Polk Franklin Pierce Millard Fillmore James Buchanan Abraham Lincoln #copyin #user #uncopyin #match no .1a 10 L60.1aU #print So far you have always dealt with one file at a time. Suppose you wanted to combine twoand then saying "--", and then saying ".=" - remember the "=" command?) When you find out, type "answer N" where N is the numberrgely absorbed the energies of the American people. Every dictate of public interest emphasized the importance of avoiding all mp Ref X2 #log #next 7.1a 10 nL6.2a, #print How does the editor choose a line to print? It always remembers a#log #next 56.1a 10 L56.1a #print Is there just as easy a way of printing the immediately preceding line? Not files - there is nothing we have covered so far that will do that. But the editor does have a command 'r' (read) r file whic. #create pres George Washington John Adams Thomas Jefferson James Madison James Monroe John Quincy Adams Andrew Jackson Martin entanglements that might involve the young republic in foreign rivalries and foreign wars. Only with the twentieth century did  'current line', which is the last line of the file originally, but you can choose any line you want. The command 3p prints t quite, but almost. The line - will print the line just before the line you are on. What's the equivalent command in terms oh reads in the contents of "file" without throwing away what you already have. So that you can combine the files "cat" and "dogvan Buren William Henry Harrison John Tyler James K. Polk Franklin Pierce Millard Fillmore James Buchanan Abraham Lincoln #copyia rapidly contracting world, impending shifts in the European balance of power, and the growth of American economic and industrihe third line of the file, for example. And 1p prints the first line. Note that is the digit one there, not the letter l, no f "." and "p"? Type "answer COMMAND" when you figure it out. Again, you can experiment first; the same file named "pres" is in" (and name the result "animal") by saying ed r cat r dog w animal q In this directory are four files named for continents. Cn #user #uncopyin #match 8 #log #next 60.1a 10 60.2a 5 (L6.1a K#print You may well ask how the editor knows wal strength create a situation that made impossible a continued aloofness from international affairs. #user #cmp passage Ref #lomatter how much alike they look. I'll put you into the editor with the file listed below: print the first line, then type 'w',  this directory. #create pres George Washington John Adams Thomas Jefferson James Madison James Monroe John Quincy Adams Andrew ombine them into one file named "world". (Read the files in alphabetical order, as they are listed). You may want to list the ihich line to print. The editor keeps track of the 'current line', which is usually the last line you touched in any way. When yog #next 55.1a 10 eL55.1a, #print This is an easy unit. If you just hit "newline" (or "carriage return", whate'q' and 'ready' as usual. #create Ref george washington 91 #create file george washington john adams thomas jefferson james madiJackson Martin van Buren William Henry Harrison John Tyler James K. Polk Franklin Pierce Millard Fillmore James Buchanan Abrahamnput files and the combined files with "cat" to see what they look like. When done, type "ready" as usual. #create Ref This is fu begin editing a file, for example, the current line is the last line. If you want to print any particular line, however, that ver it is labeled on your terminal), the editor will simply print the next line as you can see by trying this out. Edit the filson james monroe john quincy adams #print file #copyout #pipe ed file #user #unpipe #uncopyout tail -2 .ocopy >X2 #cmp Ref X2 #l Lincoln #copyin #user #uncopyin #match .-1p The "p" isn't needed. #match .-1 #log #next 57.1a 10 L57.1a. ;#pri50 ( ) *!+",#-$.%/ &0 'ile 'africa' and will be listed first. ------ this file will have to do for both american continents ----- File "asia" is inry tube and the liquid rise in it is called capillarity. How could you show that this rise is not due to atmospheric pressure?  ext 3685 Johnson S C ext 3968 Kernighan B W ext 6021 Ritchie D M ext 3770 Vollaro J R ext 6321 Derise is not due to atmospheric pressure? Seemingly, water rises in capillary tubes because the adhesive forces between glass s in a file, without throwing away the existing buffer. So, for example, ed para1 r para2 w both q will edit "para1"; thdented two spaces. Europe's file is only one line long. #create africa This is file 'africa' and will be listed first. #create Seemingly, water rises in capillary tubes because the adhesive forces between glass and water molecules are greater than the partment 1274 Brown W S ext 4822 Blue J L ext 6558 Feldman S I ext 2059 Hall A D ext 4006 Lesk Mand water molecules are greater than the cohesive forces between water molecules. #user #cmp both Ref #log #next 60.2b 5 rL60.2ben read in "para2" at the end; and then write the combined stuff on "both". Try that, with those names, in this directory. The america ------ this file will have to do for both american continents ----- #create asia File "asia" is indented two spaccohesive forces between water molecules. #create para1 We say that matter is anything which occupies space and has weight. M E ext 6377 Schryer N L ext 2912 Warner D D ext 2833 #create filler Pinson E N ext 2582 Bourne S R 5 1#print You can of course combine many files. Make a file "total" which contains the pieces "first", "secondn type "ready". #create Ref We say that matter is anything which occupies space and has weight. Matter possesses inertia, whes. #create europe Europe's file is only one line long. #user #cmp Ref world #log #next 60.1b 10 aL60.1b! H#priatter possesses inertia, which is a resistance to change of position or motion. It may be acted on by forces which may set it i ext 7419 Elliot R J ext 2879 Fraser A G ext 3685 Johnson S C ext 3968 Kernighan B W ext 6021 Ritc", "third", and "fourth" in that order. Then type "ready". #create Ref It has been already observed that the federal governmich is a resistance to change of position or motion. It may be acted on by forces which may set it in motion, or change its motnt You can, of course, use the 'r' command with an address. Any editor command can be used with an address (except 'q'). For en motion, or change its motion. While all these statements are descriptive of matter, they do not provide us with a completely hie D M ext 3770 Vollaro J R ext 6321 #create phone telephone numbers Department 1271 McIlroy M D ext 6050 Aent ought to possess the power of providing for the support of the national forces; in which proposition was intended to be inclion. While all these statements are descriptive of matter, they do not provide us with a completely satisfactory definition. Sxample, there is a file 'phone' in this directory. If you print it, you'll see that one department is missing from the list; it satisfactory definition. Scientists, with their great knowledge of the properties and behavior of matter, are not yet able to dho A V ext 4862 Baker B S ext 6503 Cherry L L ext 6067 Knowlton K ext 2328 Morris R extuded the expense of raising troops, of building and equipping fleets, and all other expenses in any wise connected with militarycientists, with their great knowledge of the properties and behavior of matter, are not yet able to define it precisely. Natureis on file 'filler'. Edit 'phone'; read in 'filler' after the line saying '1273'. Then rewrite 'phone', leave the editor, and sefine it precisely. Nature still holds many secrets to challenge the minds of men. The quantity of matter which a body posse 3878 Ossanna J F ext 3520 Thompson K ext 2394 Department 1273 Department 1274 Brown W S ext 4822 Blue J  arrangements and operations. But these are not the only objects to which the jurisdiction of the Union in respect to revenue m still holds many secrets to challenge the minds of men. The quantity of matter which a body possesses is known as its mass. ay "ready". #create Ref telephone numbers Department 1271 McIlroy M D ext 6050 Aho A V ext 4862 Baker B S sses is known as its mass. #create para2 When one end of a long glass tube that is open at both ends is placed in water, forcL ext 6558 Feldman S I ext 2059 Hall A D ext 4006 Lesk M E ext 6377 Schryer N L ext 2912 ust necessarily be empowered to extend. It must embrace a provision for the support of the national civil list; for the payment When one end of a long glass tube that is open at both ends is placed in water, forces cause the water to rise in the tube to ext 6503 Cherry L L ext 6067 Knowlton K ext 2328 Morris R ext 3878 Ossanna J F ext 3520 Thompsoes cause the water to rise in the tube to a certain height. The finer the bore of the tube, the higher the water rises. A tubeWarner D D ext 2833 #user #cmp phone Ref #log #next 61.1a 10 L60.2a  #print Suppose you wanted to combi of the national debts contracted, or that may be contracted; and, in general, for all those matters which will call for disburs a certain height. The finer the bore of the tube, the higher the water rises. A tube with a hairlike bore is called a capillan K ext 2394 Department 1273 Pinson E N ext 2582 Bourne S R ext 7419 Elliot R J ext 2879 Fraser A G with a hairlike bore is called a capillary tube and the liquid rise in it is called capillarity. How could you show that this ne two files? No editor command you have learned so far will do that. The command 'r' is just what the doctor ordered. It read60 ( ) *!+",#-$.%/ &0 'ements out of the national treasury. The conclusion is that there must be interwoven in the frame of the government a general pd, in a short course of time, perish. #create third In the Ottoman or Turkish empire the sovereign, though in other respects se, the government of the Union has gradually dwindled into a state of decay, approaching nearly to annihilation. Who can doubt #create Ref When elements combine to form compounds, the electrons in the outermost shell of the atoms are the only ones thars which will call for disbursements out of the national treasury. The conclusion is that there must be interwoven in the frameower of taxation, in one shape or another. Money is, with propriety, considered as the vital principle of the body politic; aabsolute master of the lives and fortunes of his subjects, has no right to impose a new tax. The consequence is that he permits  that the happiness of the people in both countries would be promoted by competent authorities in the proper hands to provide tht take part in the reaction. These electrons are either transferred from the outer shell of one atom to the outer shell of anot of the government a general power of taxation, in one shape or another. #create fourth The present Confederation, feeble as s that which sustains its life and motion and enables it to perform its most essential functions. A complete power, therefore, tthe bashaws or governors of provinces to pillage the people at discretion, and, in turn, squeezes out of them the sums of which e revenues which the necessities of the public might require? The present Confederation, feeble as it is, intended to repose her, or, in some cases, shared with the electrons in the outer shell of the second atom. Whether the electrons are transferedit is, intended to repose in the United States an unlimited power of providing for the pecuniary wants of the Union. But proceeo procure a regular and adequate supply of revenue, as far as the resources of the community will permit, may be regarded as an he stands in need to satisfy his own exigencies and those of the state. In America, from a like cause, the government of the Unin the United States an unlimited power of providing for the pecuniary wants of the Union. But proceeding upon an erroneous pri to the second atom or shared, this atom completes its quota of eight electrons in the outer shell. An oxide is a compound coding upon an erroneous principle, it has been done in such a manner as entirely to have frustrated the intention. #create secondindispensable ingredient in every constitution. From a deficiency in this particular, one of two evils must ensue: either the pion has gradually dwindled into a state of decay, approaching nearly to annihilation. Who can doubt that the happiness of the pnciple, it has been done in such a manner as entirely to have frustrated the intention. #create first It has been already obsntaining oxygen and one other element. The simplest of the oxides is H2O -- pure water, or hydrogen oxide. Carbon dioxide is CO2 Money is, with propriety, considered as the vital principle of the body politic; as that which sustains its life and motion eople must be subjected to continual plunder, as a substitute for a more eligible mode of supplying the public wants, or the goveople in both countries would be promoted by competent authorities in the proper hands to provide the revenues which the necessierved that the federal government ought to possess the power of providing for the support of the national forces; in which propo and is formed during the burning of organic matter such as wood, paper, gasoline, or coal. In the same burning process, H2O isand enables it to perform its most essential functions. A complete power, therefore, to procure a regular and adequate supply ofernment must sink into a fatal atrophy, and, in a short course of time, perish. In the Ottoman or Turkish empire the sovereigties of the public might require? #user #cmp total Ref #next 60.2c 5 tL60.2c8 v #print You can use an address onsition was intended to be included the expense of raising troops, of building and equipping fleets, and all other expenses in an formed and energy is released, generally as heat, sometimes as light. Carbon dioxide is in the breath you just exhaled. This  revenue, as far as the resources of the community will permit, may be regarded as an indispensable ingredient in every constitun, though in other respects absolute master of the lives and fortunes of his subjects, has no right to impose a new tax. The con the 'r' command to read input at a particular location in the file. Thus 5r name reads file "name" and appends its contents y wise connected with military arrangements and operations. But these are not the only objects to which the jurisdiction of thegas is given off by decaying plant and animal matter. Decay is a burning process. Oxidation is a word that covers all the diftion. From a deficiency in this particular, one of two evils must ensue: either the people must be subjected to continual plundsequence is that he permits the bashaws or governors of provinces to pillage the people at discretion, and, in turn, squeezes ouafter line 5 o f the file. You can use any kind of address, including a search. Here is a file "chem". Find the line in file "c Union in respect to revenue must necessarily be empowered to extend. It must embrace a provision for the support of the nationferent ways things burn. When something oxidizes, it is burning. Compounds which are formed by the interchange of electrons er, as a substitute for a more eligible mode of supplying the public wants, or the government must sink into a fatal atrophy, ant of them the sums of which he stands in need to satisfy his own exigencies and those of the state. In America, from a like cauhem" which contains the word "eight"; read the file "more" and append it after that line. Then rewrite "chem" and type "ready".al civil list; for the payment of the national debts contracted, or that may be contracted; and, in general, for all those matte70 ( ) *!+",#-$.%/ &0 'are called ionic compounds. The ions formed are said to possess electrovalence. #create chem When elements combine to form cown were paid to guard peace *** insert file "inside" here *** respect to purely local affairs; in no large state as a whole burn. When something oxidizes, it is burning. #user #cmp chem Ref #log #next 60.2d 5 L60.2d:  #print This is tcourse use context searches for addresses: /ab/,/cd/m/xx/ finds a line containing "ab", then one containing "cd", and moves the state as a whole was democratic government found to be practicable. One essential reason is that until recently the means of ompounds, the electrons in the outermost shell of the atoms are the only ones that take part in the reaction. These electrons awas democratic government found to be practicable. One essential reason is that until recently the means of communication were rickier. Read the file "text". Look for a line saying "insert file ... here". Delete that line, and in its place (after the pe section of the file they bracket after the next line containing "xx". Or you can use ".", "$", etc.: .,.+2m$ moves the threecommunication were too slow and uncertain to create the necessary solidarity of interest and similarity of information over largre either transferred from the outer shell of one atom to the outer shell of another, or, in some cases, shared with the electrotoo slow and uncertain to create the necessary solidarity of interest and similarity of information over large areas. #user #cmpreceding line) read in the file asked for. Then rewrite "text" and type "ready". #create Ref The severity of the judicial and lines starting at "." to the end. There is a file "word" which is out of order; re-arrange it to be alphabetical. #create Ref e areas. #create inside land property, they were yet neither specially fitted nor trained for that employment. In a country vilns in the outer shell of the second atom. Whether the electrons are transfered to the second atom or shared, this atom comple text Ref #log #next 61.1a 10 L61.1a m#print Note that usually you just type 'w' without a file name, and the  penal system was partly caused by the defects of the police. Only a small proportion of criminals were caught, and even when abands becomes course dissolve events for have human in it necessary of one people political the to when which #create word bandslage the case was even worse. For there the magistrates could only afford to hire the part-service of a farmer-constable. It tes its quota of eight electrons in the outer shell. Compounds which are formed by the interchange of electrons are called ioeditor buffer is written on the 'current file'. What is the 'current file' when you have executed an 'r' command? Well, it doesrrests were made, but little evidence was collected. The officers, so far from being scientific were not even properly professi becomes course in it necessary of one people political dissolve events for have human the to when which #user #cmp word Ref #lois a striking fact that until recently democracy never flourished except in very small states -- for the most part in cities. Itnic compounds. The ions formed are said to possess electrovalence. #create more An oxide is a compound containing oxygen andn't change. But rather than be in doubt, there is a command f which prints the current file name. You can change the current onal. For although the constable of each village and the watchman of each town were paid to guard peace land property, they werg #next 63.1a 10 fL62.2a> #print A very useful command in the UNIX editor is the 'm' command, which moves a lo is true that in both the Persian and the Roman empires a measure of self-government was accorded to local communities, but only one other element. The simplest of the oxides is H2O -- pure water, or hydrogen oxide. Carbon dioxide is CO2 and is formed durifile name with f name so that you can copy file 'old' to 'new' with ed old f new w q Try that: copy file 'first' to 'se yet neither specially fitted nor trained for that employment. In a country village the case was even worse. For there the magt of lines from one place to another in a file. For example, 5,10m20 picks up lines 5 through 10 and moves them after line 20 in #create text The severity of the judicial and penal system was partly caused by the defects of the police. Only a small ng the burning of organic matter such as wood, paper, gasoline, or coal. In the same burning process, H2O is formed and energy econd' in this directory. Then type "ready". #create first This is the file to be copied using the 'f' command. #user #cmp firsistrates could only afford to hire the part-service of a farmer-constable. It is a striking fact that until recently democrac. Try that on the file "list" in this directory: move lines 5 to 10 after line 20, rewrite the file, and type "ready". #createproportion of criminals were caught, and even when arrests were made, but little evidence was collected. The officers, so far fis released, generally as heat, sometimes as light. Carbon dioxide is in the breath you just exhaled. This gas is given off byt second #log #next 62.1a 10 62.2a 5 eL62.1aɛ Q#print Frequently you will want to move one or more lines from oy never flourished except in very small states -- for the most part in cities. It is true that in both the Persian and the Roman Ref computer languages fortran cobol snobol comit lex yacc c tmg ratfor basic bon bcpl algol 60 algol 68 pl/i pl/c pl/360 aplrom being scientific were not even properly professional. For although the constable of each village and the watchman of each t decaying plant and animal matter. Decay is a burning process. Oxidation is a word that covers all the different ways things ne place in a file to another. The command 5,10m30 will pick up lines 5 through 10 and move them after line 30. You can of  empires a measure of self-government was accorded to local communities, but only in respect to purely local affairs; in no larg80 ( ) *!+",#-$.%/ &0 ' altran formac #create list computer languages fortran cobol algol 60 algol 68 pl/i pl/c pl/360 apl snobol comit lex yacc c tm m$ #match .m$ "m$" is easier. #log #next 63.1d 10 1L63.1dC #print Will the command m+ interchange lines "."ings time been uniformly observed throughout the land -- during World War I, the first DST was tried, and again during World War command should be typed to make a second copy of the current line? Type "answer XX", where XX is the command. #copyin #user #uneginning of a files by using m0 Move the last three lines of file "tax" to the beginning, then type "ready". #create Ref If yg ratfor basic bon bcpl altran formac #user #cmp list Ref #log #next 62.2b 5 L62.2b@ f#print You can of cours and ".+1"? Answer yes or no. #copyin #user #uncopyin #match yes #log #next 63.1e 10 uL63.1e_ #print Will the  II. Immediately after both wars, however, many areas abandoned DST altogether. back again on the last Sunday in October -- unlcopyin #match t. #match .t. You could just say "t.". #log #next 65.1a 10 kL65.1a #print A strange, and not ofou sustain an "overall foreign loss" for any taxable year, a recapture provision will treat a part of foreign income realized ine use any kind of addresses for the three addresses in the 'm' command. Think of the command as "from address-1 until addresscommand m- interchange lines "." and ".-1"? Answer yes or no. #copyin #user #uncopyin #match no You actually need "m--". #log ess a state legislature specifically votes to stay on standard time. In that case, local options are out and standard time mustten important command, is the 'l' (list) command. When it is needed, though, it is vital. It is almost identical to 'p' (print) a later year as income from U. S. sources. These rules generally apply to losses sustained in taxable years beginning after De-2 gather up and MOVE to address-3". OK. In the file "story" move the lines from the line that contains "back" until the line c#next 64.1a 10 L64.1aɝ #print Another command similar to 'm' is 't'; the command 5,8t15 picks up lines 5 th prevail through the state. Last week the House voted 292 to 93 to require all states to move their clocks ahead an hour on t except that control characters (like tab or backspace) are printed in a way that lets you see what they are no matter what the cember 31, 1975. #create tax will treat a part of foreign income realized in a later year as income from U. S. sources. These rontaining "prevail" to the end of the file. Then rewrite "story" and type "ready". #create Ref Only twice in the nation's hirough 8 and makes a copy of them, which it places after line 15. It differs from 'm' only in that the lines remain in their oldhe last Sunday in April, and set them #user #cmp story Ref #log #next 62.2c 5 L62.2cB #print In this directoryterminal does. From time to time strange characters will sneak into your files; they won't show when you print them, and yet theules generally apply to losses sustained in taxable years beginning after December 31, 1975. If you sustain an "overall foreign story has daylight-savings time been uniformly observed throughout the land -- during World War I, the first DST was tried, and  place as well as appearing in their new place. (Just like "cp" and "mv" with files). In this directory is a file "double". U is a file "word" which should be in alphabetical order but is not; put it in order by picking up a block of lines and relocatiny will confuse you. For example, you might be unable to find a line by searching for it with /abc/ and yet it would print as "loss" for any taxable year, a recapture provision #user #cmp Ref tax #log #next 63.1b 10 aL63.1b #print What again during World War II. Immediately after both wars, however, many areas abandoned DST altogether. Last week the House vosing the editor, find the line containing "-------" and make a copy of it at the end of the file. #create Ref ------------ Thisg them. Then rewrite the file and type "ready". #create Ref bands becomes course dissolve events for have human in it necessaryabc" if there were a funny character in the line between 'a' and 'b'. Funny characters are generated by hitting the control keyscommand will move the current line to the beginning of the file? Type "answer COMMAND", where COMMAND is the command. #copyin ted 292 to 93 to require all states to move their clocks ahead an hour on the last Sunday in April, and set them back again on t file should be bracketed by the dashes but as it is given to you there are only dashes at the top. ------------ #create double  of one people political the to when which #create word bands becomes course in it necessary of one people political dissolve ev on the terminal; they print as '\' followed by a number. There is a file "weird" in this directory. Print it both with "1,$p" #user #uncopyin #match m0 #match .m0 "m0" is easier. #log #next 63.1c 10 iL63.1c# #print What command will movhe last Sunday in October -- unless a state legislature specifically votes to stay on standard time. In that case, local option------------ This file should be bracketed by the dashes but as it is given to you there are only dashes at the top. #user #cmp ents for have human the to when which #user #cmp word Ref #log #next 63.1a 10 L63.1a q#print Line 0 is a legitand "1,$l" and observe the difference. Then leave the editor. Which word on the last line has a funny character in it? Type "ane the current line to the end of the file? Type "answer COMMAND", where COMMAND is the command. #copyin #user #uncopyin #matchs are out and standard time must prevail through the state. #create story Only twice in the nation's history has daylight-savdouble Ref #log #next 64.1b 10 tL64.1b# #print Another exercise in the effective use of the 't' command: Whatimate address for a few commands; you can append text at the beginning of a file by typing 0a and you can move lines to the b90 ( ) *!+",#-$.%/ &0 'swer WORD" where WORD is that word (without the funny symbol). #create weird This line has tabs in it. So does this one. Here ``Your Harris will never desert you. We will die together!'' I cheered the noble fellow with praises, and soon his fears wererpose. But I turned a deaf ear to all he said. When he perceived at last that nothing could alter my determination, he ceased 3p". Try that in this file; the current line is set to the last line of the current file. Try ".p"; then "w", "q", and "ready" a and was glad enough when I heard the clock strike half past eleven and knew it was time to get up for dinner. #create memo The is a line with____ backspaces of a useful sort. These backspacesonlyconfuse matters. there's a strange character  forgotten and he was eager for the adventure. He wanted to summon the guides at once and leave at two in the morning, as he suto urge, and for a while the deep silence was broken only by his sobs. I sat in marble resolution, with my eyes fixed upon vacas usual. Here's the full file - #create Ref john quincy adams 91 #create file george washington john adams thomas jefferson jamAscent of the Riffelberg by Mark Twain I sat silent some time, then turned to Harris and said: ``My mind is made up.'' Somethin this line even though it prints ok. #copyin #user #uncopyin #match this #log #next 66.1a 10 L66.1aF #printpposed the custom was; but I explained that nobody was looking at that hour; and that the start in the dark was not usually madency, for in spirit I was already wrestling with the perils of the mountains, and my friend sat gazing at me in adoring admiratioes madison james monroe john quincy adams #print file #copyout #pipe ed file #user #unpipe #uncopyout tail -2 .ocopy >X1 #cmp X1ing in my tone struck him; and when he glanced at my eye and read what was written there, his face paled perceptibly. He hesita The file "memo" contains several paragraphs, where a paragraph starts at any line that begins with a blank. It is desired to r from the village but from the first night's resting-place on the mountainside. I said we would leave the village at 3 or 4 p.mn through his tears. At last he threw himself upon me in a loving embrace and exclaimed in broken tones: ``Your Harris will nev Ref #log #next 7.1b 10 L7.1bA #print As I said, '.' is set to the last line touched by any command in the edted a moment, then said: ``Speak.'' I answered, with perfect calmness: ``I WILL ASCEND THE RIFFELBERG.'' If I had shot my poemove those blanks at the beginning of lines, and instead mark the paragraphs by inserting a line containing only .PP before e. on the morrow; meantime he could notify the guides, and also let the public know of the attempt which we proposed to make. Ier desert you. We will die together!'' .PP I cheered the noble fellow with praises, and soon his fears were forgotten and he waitor. So if you type 3p . will be set to line 3; and then .p will print the same line. Try that - with the usual trailer,or friend he could not have fallen from his chair more suddenly. If I had been his father he could not have pleaded harder to gach paragraph. Change the file in that way and then rewrite it; then type "ready". #create Ref The Ascent of the Riffelberg by  went to bed, but not to sleep. No man can sleep when he is about to undertake one of these Alpine exploits. I tossed feverishs eager for the adventure. He wanted to summon the guides at once and leave at two in the morning, as he supposed the custom wa the commands should be 3p .p w q ready The file is the same as before. #create Ref 3p .p w q #create file george washington joet me to give up my purpose. But I turned a deaf ear to all he said. When he perceived at last that nothing could alter my detMark Twain .PP I sat silent some time, then turned to Harris and said: ``My mind is made up.'' Something in my tone struck him;ly all night long, and was glad enough when I heard the clock strike half past eleven and knew it was time to get up for dinner.s; but I explained that nobody was looking at that hour; and that the start in the dark was not usually made from the village buhn adams thomas jefferson james madison james monroe john quincy adams #pipe #copyin ed file #user #uncopyin #unpipe tail -4 .cermination, he ceased to urge, and for a while the deep silence was broken only by his sobs. I sat in marble resolution, with m and when he glanced at my eye and read what was written there, his face paled perceptibly. He hesitated a moment, then said: ` #user #cmp memo Ref #log #next 70.1a 10 70.2a 5 iL7.1a_ #print Although specifying lines by line number is et from the first night's resting-place on the mountainside. I said we would leave the village at 3 or 4 p.m. on the morrow; meaopy >X1 #cmp X1 Ref #log #next 8.1a 10 8.2a 6 7.2c 2 iL7.2c3 #print Now, print the fourth line in this file ty eyes fixed upon vacancy, for in spirit I was already wrestling with the perils of the mountains, and my friend sat gazing at m`Speak.'' .PP I answered, with perfect calmness: ``I WILL ASCEND THE RIFFELBERG.'' .PP If I had shot my poor friend he could notasy to understand, it is hard to do in a long file. You will therefore want to learn other ways of addressing lines. The 'currntime he could notify the guides, and also let the public know of the attempt which we proposed to make. .PP I went to bed, but wice, using the same pattern. The file is the same, and you should put the usual finish (w, q, ready) after printing the line. e in adoring admiration through his tears. At last he threw himself upon me in a loving embrace and exclaimed in broken tones:  have fallen from his chair more suddenly. If I had been his father he could not have pleaded harder to get me to give up my puent line' is addressed with the symbol . so that it can be printed, for example with .p just as you could print a line by "not to sleep. No man can sleep when he is about to undertake one of these Alpine exploits. I tossed feverishly all night long,:0 ( ) *!+",#-$.%/ &0 '#create Ref 4p .p w q #create file george washington john adams thomas jefferson james madison james monroe john quincy adams #per CO 80201 Detroit MI 48226 Elizabeth NJ 07207 Hartford CN 06101 Houston TX 77052 Indianapolis IN 46204 Jersey City NJ 07303 Lo10 70.2e 9 70.2d 6 iL70.2aJ #print Perhaps the most powerful editor command is the 'g' (global) command. Thisan Diego CA 92101 San Francisco CA 94101 Seattle WA 98101 St. Louis MO 63166 Syracuse NY 13201 Utica NY 13503 Washington DC 2001K #print You can use any command with 'g', not just 'p'. For example g/xx/s/a/b/ changes 'a' to 'b' on every lineipe #copyin ed file #user #uncopyin #unpipe tail -4 .copy >X1 #cmp X1 Ref #log #next 8.1a 10 8.2a 5 #L70.1a s Angeles CA 90053 Miami FL 33101 Milwaukee WI 53201 Minneapolis MN 55401 New York NY 10001 Newark NJ 07101 Paterson NJ 07510 Ph command selects sets of lines on which other commands are executed. For example, g/abc/p prints all lines on which 'abc' app3 Yonkers NY 10598 #create ocities Albany NY 12201 Atlanta GA 30301 Baltimore MD 21233 Boston MA 02109 Bridgeport CN 06601 Buffa containing 'xx'. As an example of the global command used with 'd', try this: In file "cities" there is a list of cities with #print Perhaps the most powerful command in the editor is the 'g' (global) command. This always precedes a second command on iladelphia PA 19104 Phoenix AR 85026 Pittsburgh PA 15230 Providence RI 02904 Rochester NY 14603 San Diego CA 92101 San Franciscoears. In this directory is a file "story". Print all lines on which the word "of" appears. Then leave the editor and type "relo NY 14240 Camden NJ 08101 Chicago IL 60607 Dallas TX 75221 Denver CO 80201 Detroit MI 48226 Elizabeth NJ 07207 Hartford CN 061their states and zip codes. Delete all cities which are in New Jersey (i.e. all lines containing NJ). Then rewrite the file andthe same command line; it selects those file lines on which the second command is to be executed. For example g/abc/s/def/ghi/ CA 94101 Seattle WA 98101 St. Louis MO 63166 Syracuse NY 13201 Trenton NJ 08608 Utica NY 13503 Washington DC 20013 Yonkers NY 1ady". #create Ref The people of the United States are in a sense becoming a nation of the United States in the future, it wil01 Houston TX 77052 Indianapolis IN 46204 Jersey City NJ 07303 Los Angeles CA 90053 Miami FL 33101 Milwaukee WI 53201 Minneapoli type "ready". #create Ref Albany NY 12201 Atlanta GA 30301 Baltimore MD 21233 Boston MA 02109 Bridgeport CN 06601 Buffalo NY 14p says: "Find all lines in the file which contain the string "abc"; change the first "def" on any such line into "ghi". The com0598 #user #cmp cities Ref #log #next 70.2c 5 70.2d 10 dL70.2cM )#print In this directory is another copy of thl be because that system did too good a job of filling many of the needs of the people. #create story The people of the Unites MN 55401 New York NY 10001 Newark NJ 07101 Paterson NJ 07510 Philadelphia PA 19104 Phoenix AR 85026 Pittsburgh PA 15230 Provid240 Chicago IL 60607 Dallas TX 75221 Denver CO 80201 Detroit MI 48226 Hartford CN 06101 Houston TX 77052 Indianapolis IN 46204 Lmand after the 'g' may be any command, of course. Needless to say, the expressions after the 'g' may include all the special chae "cities" file as you modified it, and the previous version named "ocities". Use "diff" to find out how many lines you deleted.d States are in a sense becoming a nation on a tiger. They must learn to consume more and more or, they are warned, their magnience RI 02904 Rochester NY 14603 San Diego CA 92101 San Francisco CA 94101 Seattle WA 98101 St. Louis MO 63166 Syracuse NY 13201os Angeles CA 90053 Miami FL 33101 Milwaukee WI 53201 Minneapolis MN 55401 New York NY 10001 Philadelphia PA 19104 Phoenix AR 85racters. Edit the file "towns" so that each line beginning with "-" has " (county seat)" added at its end. Rewrite the file and  Reply "answer N" where N is the number of lines you removed from "cities". #create cities Albany NY 12201 Atlanta GA 30301 Baltficent economic machine may turn and devour them. They must be induced to step up their individual consumption higher and higher Trenton NJ 08608 Utica NY 13503 Washington DC 20013 Yonkers NY 10598 #copyin #user #uncopyin #match 6 #log #next 70.2d 10 NL70.026 Pittsburgh PA 15230 Providence RI 02904 Rochester NY 14603 San Diego CA 92101 San Francisco CA 94101 Seattle WA 98101 St. Lotype "ready". #create Ref -newark (county seat) east orange south orange maplewood -elizabeth (county seat) linden craimore MD 21233 Boston MA 02109 Bridgeport CN 06601 Buffalo NY 14240 Chicago IL 60607 Dallas TX 75221 Denver CO 80201 Detroit MI , whether they have any pressing need for the goods or not. Their ever-expanding economy demands it. If modifications are fo2dN #print There is another file of cities with ZIP codes and states in this directory, but it was typed in wruis MO 63166 Syracuse NY 13201 Utica NY 13503 Washington DC 20013 Yonkers NY 10598 #create cities Albany NY 12201 Atlanta GA 303nford westfield -morristown (county seat) madison chatham dover #create towns -newark east orange south orange map48226 Hartford CN 06101 Houston TX 77052 Indianapolis IN 46204 Los Angeles CA 90053 Miami FL 33101 Milwaukee WI 53201 Minneapolirced upon the private-enterprise system of the United States in the future, it will be because that system did too good a job ofong. Some cities in New Jersey are labeled as being in New York. However the ZIP codes are right. Since the cities in New Jer01 Baltimore MD 21233 Boston MA 02109 Bridgeport CN 06601 Buffalo NY 14240 Camden NJ 08101 Chicago IL 60607 Dallas TX 75221 Denvlewood -elizabeth linden cranford westfield -morristown madison chatham dover #user #cmp towns Ref #log #next 71.1a s MN 55401 New York NY 10001 Philadelphia PA 19104 Phoenix AR 85026 Pittsburgh PA 15230 Providence RI 02904 Rochester NY 14603 S filling many of the needs of the people. #copyout #user #uncopyout grep of .ocopy >x1 #cmp x1 Ref #log #next 70.2b 5 L70.2b;0 ( ) *!+",#-$.%/ &0 'sey are exactly those with zip codes beginning 07, if you can execute the substitute command to change NY to NJ on all lines witenton NJ 08608 Utica NY 13503 Washington DC 20013 Yonkers NY 10598 #user #cmp cities Ref #log #next 70.2f 5 L70.2fR  City NY 07303 Los Angeles CA 90053 Miami FL 33101 Milwaukee WI 53201 Minneapolis MN 55401 New York NY 10001 Newark NY 07101 Patos Angeles CA 90053 Miami FL 33101 Milwaukee WI 53201 Minneapolis MN 55401 New York NY 10001 Newark NJ 07101 Paterson NJ 07510 X 75221 Denver CO 80201 Detroit MI 48226 Elizabeth NJ 07207 Hartford CN 06101 Houston TX 77052 Indianapolis IN 46204 Jersey Cityh " 07" in them, all will be well. Don't forget the blank before the 07 - some ZIP codes have "07" in the middle, remember. Chan+#print Remember the search for blank lines with nothing on them? /^$/. Pick up the file "table" and delete all blank lineserson NY 07510 Philadelphia PA 19104 Phoenix AR 85026 Pittsburgh PA 15230 Providence RI 02904 Rochester NY 14603 San Diego CA 92Philadelphia PA 19104 Phoenix AR 85026 Pittsburgh PA 15230 Providence RI 02904 Rochester NY 14603 San Diego CA 92101 San Franc NJ 07303 Los Angeles CA 90053 Miami FL 33101 Milwaukee WI 53201 Minneapolis MN 55401 New York NY 10001 Newark NJ 07101 Patersonge file "cities" and rewrite it. Then type "ready". #create Ref Albany NY 12201 Atlanta GA 30301 Baltimore MD 21233 Boston MA 0; then rewrite it and type "ready". #create Ref Albany NY 12201 Atlanta GA 30301 Baltimore MD 21233 Boston MA 02109 Bridgeport C101 San Francisco CA 94101 Seattle WA 98101 St. Louis MO 63166 Syracuse NY 13201 Trenton NJ 08608 Utica NY 13503 Washington DC 2isco CA 94101 Seattle WA 98101 St. Louis MO 63166 Syracuse NY 13201 Trenton NJ 08608 Utica NY 13503 Washington DC 20013 Yonkers  NJ 07510 Philadelphia PA 19104 Phoenix AR 85026 Pittsburgh PA 15230 Providence RI 02904 Rochester NY 14603 San Diego CA 92101 S2109 Bridgeport CN 06601 Buffalo NY 14240 Camden NJ 08101 Chicago IL 60607 Dallas TX 75221 Denver CO 80201 Detroit MI 48226 ElizN 06601 Buffalo NY 14240 Camden NJ 08101 Chicago IL 60607 Dallas TX 75221 Denver CO 80201 Detroit MI 48226 Elizabeth NJ 07207 Ha0013 Yonkers NY 10598 #user #cmp cities Ref #log #next 70.2e 5 7L70.2eP #print There is a file "cities" in thiNY 10598 #user #cmp table Ref #log #next 70.2g 5 HL70.2gS #print Here is a file "values". Whenever the word "an Francisco CA 94101 Seattle WA 98101 St. Louis MO 63166 Syracuse NY 13201 Trenton NJ 08608 Utica NY 13503 Washington DC 20013 abeth NJ 07207 Hartford CN 06101 Houston TX 77052 Indianapolis IN 46204 Jersey City NJ 07303 Los Angeles CA 90053 Miami FL 33101rtford CN 06101 Houston TX 77052 Indianapolis IN 46204 Jersey City NJ 07303 Los Angeles CA 90053 Miami FL 33101 Milwaukee WI 532s directory in which each line contains a city, state and ZIP code. But it was typed in by a member of management and is reallyliter" appears in it, add at the end of that line the characters (1 liter = 1.06 quart) The parentheses should appear in the Yonkers NY 10598 #create cities Albany NY 12201 Atlanta GA 30301 Baltimore MD 21233 Boston MA 02109 Bridgeport CN 06601 Buffalo  Milwaukee WI 53201 Minneapolis MN 55401 New York NY 10001 Newark NJ 07101 Paterson NJ 07510 Philadelphia PA 19104 Phoenix AR 8501 Minneapolis MN 55401 New York NY 10001 Newark NJ 07101 Paterson NJ 07510 Philadelphia PA 19104 Phoenix AR 85026 Pittsburgh PA botched - every NJ city is labeled as being in NY. But the Zip codes are right - if you can change NY to NJ on each line contafinal file, and there should be one space before the left parenthesis. When done, rewrite the file and type "ready". #create ReNY 14240 Camden NY 08101 Chicago IL 60607 Dallas TX 75221 Denver CO 80201 Detroit MI 48226 Elizabeth NY 07207 Hartford CN 06101 026 Pittsburgh PA 15230 Providence RI 02904 Rochester NY 14603 San Diego CA 92101 San Francisco CA 94101 Seattle WA 98101 St. Lo 15230 Providence RI 02904 Rochester NY 14603 San Diego CA 92101 San Francisco CA 94101 Seattle WA 98101 St. Louis MO 63166 Syraining a ZIP code beginning with either 07 or 08 all will be fixed up. Each line looks like St. Louis MO 63166 and (1) remembef gasoline: .52/gallon milk: 35/qt rice: .30/lb acetic acid: 1.20/liter (1 liter = 1.06 quart) apples: .35/lb cider: .55/liter (Houston TX 77052 Indianapolis IN 46204 Jersey City NY 07303 Los Angeles CA 90053 Miami FL 33101 Milwaukee WI 53201 Minneapolis Muis MO 63166 Syracuse NY 13201 Trenton NJ 08608 Utica NY 13503 Washington DC 20013 Yonkers NY 10598 #create cities Albany NY 122cuse NY 13201 Trenton NJ 08608 Utica NY 13503 Washington DC 20013 Yonkers NY 10598 #create table Albany NY 12201 Atlanta GA 3030r the [] operators? and (2) don't forget that digits appear in the middle of ZIP codes. You may want to check what you're doing 1 liter = 1.06 quart) butter: .79/lb soda: .42/liter (1 liter = 1.06 quart) eggs: .89/doz cream: 1.25/liter (1 liter = 1.06 quarN 55401 New York NY 10001 Newark NY 07101 Paterson NY 07510 Philadelphia PA 19104 Phoenix AR 85026 Pittsburgh PA 15230 Providenc01 Atlanta GA 30301 Baltimore MD 21233 Boston MA 02109 Bridgeport CN 06601 Buffalo NY 14240 Camden NJ 08101 Chicago IL 60607 Dal1 Baltimore MD 21233 Boston MA 02109 Bridgeport CN 06601 Buffalo NY 14240 Camden NJ 08101 Chicago IL 60607 Dallas TX 75221 Denvby writing the current version on a different file name and using "diff" to check on the changes. #create Ref Albany NY 12201 Att) #create values gasoline: .52/gallon milk: 35/qt rice: .30/lb acetic acid: 1.20/liter apples: .35/lb cider: .55/liter butter: e RI 02904 Rochester NY 14603 San Diego CA 92101 San Francisco CA 94101 Seattle WA 98101 St. Louis MO 63166 Syracuse NY 13201 Trlas TX 75221 Denver CO 80201 Detroit MI 48226 Elizabeth NY 07207 Hartford CN 06101 Houston TX 77052 Indianapolis IN 46204 Jerseyer CO 80201 Detroit MI 48226 Elizabeth NJ 07207 Hartford CN 06101 Houston TX 77052 Indianapolis IN 46204 Jersey City NJ 07303 Llanta GA 30301 Baltimore MD 21233 Boston MA 02109 Bridgeport CN 06601 Buffalo NY 14240 Camden NJ 08101 Chicago IL 60607 Dallas T<0 ( ) *!+",#-$.%/ &0 '.79/lb soda: .42/liter eggs: .89/doz cream: 1.25/liter #user #cmp values Ref #log #next 71.1a 5 L71.1aV 2#printing admiration through his tears. At last he threw himself upon me in a loving embrace and exclaimed in broken tones: ``Your Han from his chair more suddenly. If I had been his father he could not have pleaded harder to get me to give up my purpose. Butnes for the 'v' command are all those on which the expression is NOT found. Thus v/abc/s/x/y/g changes 'x' to 'y' on all lineNo man can sleep when he is about to undertake one of these Alpine exploits. I tossed feverishly all night long, and was glad e After the global command has selected the lines to which the second command is to be applied, it sets '.' (the current line) torris will never desert you. We will die together!'' .PP I cheered the noble fellow with praises, and soon his fears were forgot I turned a deaf ear to all he said. When he perceived at last that nothing could alter my determination, he ceased to urge, ans NOT containing an 'abc'. There is a file 'price' in this directory. Find all lines that do NOT begin with blank and prefix thnough when I heard the clock strike half past eleven and knew it was time to get up for dinner. #create memo The Ascent of the R each of these lines in turn as it executes the controlled command. Thus you can reference the line before or after the selecteten and he was eager for the adventure. He wanted to summon the guides at once and leave at two in the morning, as he supposed d for a while the deep silence was broken only by his sobs. I sat in marble resolution, with my eyes fixed upon vacancy, for inree asterisks to them. Then rewrite the file and type "ready". #create Ref ***beef shoulder 1.39/lb flank 1.59/lb sirliffelberg by Mark Twain .PP I sat silent some time, then turned to Harris and said: ``My mind is made up.'' Something in my tond line. For example, g/xx/.-1s/ab/cd/ changes 'ab' to 'cd' on the line BEFORE each line with xx. And g/xx/$t.+1 inserts a cthe custom was; but I explained that nobody was looking at that hour; and that the start in the dark was not usually made from t spirit I was already wrestling with the perils of the mountains, and my friend sat gazing at me in adoring admiration through hoin 2.19/lb round 1.89/lb ***fish sword 3.99/lb cod 1.99/lb blues 2.49/lb stripers 3.49/lb flounder 2e struck him; and when he glanced at my eye and read what was written there, his face paled perceptibly. He hesitated a moment,opy of the last line in the file two lines after each line with 'xx' on it. In this directory, the file 'memo' has paragraphs inhe village but from the first night's resting-place on the mountainside. I said we would leave the village at 3 or 4 p.m. on this tears. At last he threw himself upon me in a loving embrace and exclaimed in broken tones: ``Your Harris will never desert y.99/lb ***pork shoulder .89/lb loin 1.59/lb bacon 1.19/lb #create price beef shoulder 1.39/lb flank 1.59/lb then said: ``Speak.'' .PP I answered, with perfect calmness: ``I WILL ASCEND THE RIFFELBERG.'' .PP If I had shot my poor frienddicated by lines beginning ".PP". Add two blanks to the beginning of the line after each ".PP", and then delete the ".PP" linese morrow; meantime he could notify the guides, and also let the public know of the attempt which we proposed to make. .PP I wentou. We will die together!'' I cheered the noble fellow with praises, and soon his fears were forgotten and he was eager for t sirloin 2.19/lb round 1.89/lb fish sword 3.99/lb cod 1.99/lb blues 2.49/lb stripers 3.49/lb flound he could not have fallen from his chair more suddenly. If I had been his father he could not have pleaded harder to get me to . This should take only two commands. Rewrite the file and then type "ready". #create Ref The Ascent of the Riffelberg by Mark  to bed, but not to sleep. No man can sleep when he is about to undertake one of these Alpine exploits. I tossed feverishly alhe adventure. He wanted to summon the guides at once and leave at two in the morning, as he supposed the custom was; but I expler 2.99/lb pork shoulder .89/lb loin 1.59/lb bacon 1.19/lb #user #cmp price Ref #log #next 73.1a 10 L72.2agive up my purpose. But I turned a deaf ear to all he said. When he perceived at last that nothing could alter my determinatioTwain I sat silent some time, then turned to Harris and said: ``My mind is made up.'' Something in my tone struck him; and whl night long, and was glad enough when I heard the clock strike half past eleven and knew it was time to get up for dinner. #useained that nobody was looking at that hour; and that the start in the dark was not usually made from the village but from the fiY #print A command related to the 'g' command is the 'v' command. The 'v' command also selects lines on which anothern, he ceased to urge, and for a while the deep silence was broken only by his sobs. I sat in marble resolution, with my eyes fien he glanced at my eye and read what was written there, his face paled perceptibly. He hesitated a moment, then said: ``Speak.r #cmp memo Ref #log #next 72.1a 10 72.2a 5 L72.1aW ,#print A command related to the global command is the 'v' rst night's resting-place on the mountainside. I said we would leave the village at 3 or 4 p.m. on the morrow; meantime he coul command is to be executed; the difference between 'g' and 'v' is that the 'v' command selects all lines on which the specifiedxed upon vacancy, for in spirit I was already wrestling with the perils of the mountains, and my friend sat gazing at me in ador'' I answered, with perfect calmness: ``I WILL ASCEND THE RIFFELBERG.'' If I had shot my poor friend he could not have fallecommand. It also selects lines on which a second command is executed; the difference between 'g' and 'v' is that the selected lid notify the guides, and also let the public know of the attempt which we proposed to make. I went to bed, but not to sleep. =0 ( ) *!+",#-$.%/ &0 ' expression is NOT found. Thus v/ly$/p prints all lines which do NOT end in "ly". Or v/e/p prints all lines WITHOUT an 'e'iher's commands. Sometimes you are in the editor and you really want to execute a shell command. You can do that by prefixing it Baltimore MD 21233 Boston MA 02109 Bridgeport CN 06601 Buffalo NY 14240 Camden NJ 08101 Chicago IL 60607 Dallas TX 75221 Denver #create Ref Atlanta 496,973 GA 30301 Baltimore 905,759 MD 21233 Boston 641,071 MA 02109 Bridgeport 156,542 CN 06601 Buffalo 462 3.99/lb cod 1.99/lb blues 2.49/lb stripers 3.49/lb flounder 2.99/lb pork shoulder .89/lb loin 1.59/ln them. Are there any lines in file "story" without an 'i'? Find out using the editor; then leave the editor and type "yes" or  with !. For example, !ls will list your directory. Remember that "date" is the shell command to find out what time it is. Tr CO 80201 Detroit MI 48226 Elizabeth NJ 07207 Hartford CN 06101 Houston TX 77052 Indianapolis IN 46204 Jersey City NJ 07303 Los ,768 NY 14240 Chicago 3,366,957 IL 60607 Cleveland 750,903 OH 44101 Columbus 539,677 OH 43216 Dallas 844,401 TX 75221 Denver 514b bacon 1.19/lb #user #cmp price Ref #log #next 72.2d 10 L72.2d] #print There is a file "song" in this di"no". #create story Credit "rationing," already being imposed by major banks in big cities, may soon spread to banks large any editing the file 'bridge'; print it out, then, without leaving the editor, ask for the time and then leave the editor and say Angeles CA 90053 Miami FL 33101 Milwaukee WI 53201 Minneapolis MN 55401 New York NY 10001 Newark NJ 07101 Paterson NJ 07510 Phil,678 CO 80201 Detroit 1,511,482 MI 48226 Hartford 158,017 CN 06101 Houston 1,232,802 TX 77052 Indianapolis 774,624 IN 46201 Los rectory. Find all lines which don't end in "." and put a comma at the end of these lines. Then rewrite the file and type "readyd small in every corner of the United States. Result: Speculative loans may become hard to get anywhere. Working in near-se"ready". #create bridge brooklyn manhattan williamsburg queensborough george washington triborough bronx whitestone throgs neck adelphia PA 19104 Phoenix AR 85026 Pittsburgh PA 15230 Providence RI 02904 Rochester NY 14603 San Diego CA 92101 San Francisco CAngeles 2,809,596 CA 92101 Miami 334,859 FL 33101 Milwaukee 717,099 WI 53201 Minneapolis 434,400 MN 55401 New Orleans 593,471 LA". #create Ref It seems that Early English art, Alone retains its zest. To charm and please its devotees, We've done our levelcrecy, a committee of the powerful American Bankers Association is drafting an unprecedented policy statement aimed at getting b#create X2 !date #copyin #user #uncopyin grep date .copy | tail -1 >X1 #cmp X1 X2 #log #next 74.1a 10 L74.1a`  A 94101 Seattle WA 98101 St. Louis MO 63166 Syracuse NY 13201 Trenton NJ 08608 Utica NY 13503 Washington DC 20013 Yonkers NY 105 70140 New York 7,894,862 NY 10001 Newark 382,417 NJ 07901 Omaha 347,328 NE 68108 Philadephia 1,948,609 PA 19104 Phoenix 581,562 best. We're not quite sure that all we do, Has the Early English ring, But as far as we can tell, It's something lIke this soankers across the country to be far choosier in making business loans. The ABA it is believed, is being driven to this move par#print Here's a last review exercise. In the file "cities" is a list of cities with populations and Zip codes. The following c98 #user #cmp cities Ref #log #next 72.2c 10 L72.2c\ #print There is a file "price" in this directory. Find  AR 85026 Pittsburgh 520,117 PA 15230 San Antonio 654,153 TX 78205 San Diego 696,769 CA 92101 San Francisco 715,674 CA 94101 Seart of thing. #create song It seems that Early English art Alone retains its zest. To charm and please its devotees We've done tly by a nagging fear that the Federal Government will impose lending guidelines if banks fail to tighten up voluntarily. Theities were omitted: add them in alphabetical order St. Louis 622,236 MO 63166 Columbus 539,677 OH 43216 Then, edit the filall lines which don't begin with blank and put three asterisks at the beginning of each such line. Then rewrite the file and tyttle 530,831 WA 98101 St. Louis 622,236 MO 63166 Washington 756,510 DC 20013 #create cities Atlanta 496,973 GA 30301 Bour level best. We're not quite sure that all we do Has the Early English ring But as far as we can tell It's something lIke t ABA's task is delicate. #copyin #user #uncopyin #match yes #log #next 72.2b 10 L72.2bZ #print Edit the file "e so that (a) the blanks, if any, at the beginnings of lines and ends of lines are removed. (b) each interior string of blankspe "ready". #create Ref ***beef shoulder 1.39/lb flank 1.59/lb sirloin 2.19/lb round 1.89/lb ***fish sword 3altimore 905,759 MD 21233 Boston 641,071 MA 02109 Bridgeport 156,542 CN 06601 Buffalo 462,768 NY 14240 Chicagohis sort of thing. #user #cmp song Ref #log #next 73.1a 10 iL73.1a #print Back early in this sequence we madecities" to remove all lines NOT containing "NJ". Then rewrite the file and type "ready". #create Ref Camden NJ 08101 Elizabeth  is replaced by a single tab, except for the blanks within "Los Angeles", "New Orleans", "New York", "San Antonio", "San Diego",.99/lb cod 1.99/lb blues 2.49/lb stripers 3.49/lb flounder 2.99/lb ***pork shoulder .89/lb loin 1.59/lb 3,366,957 IL 60607 Cleveland 750,903 OH 44101 Dallas 844,401 TX 75221 Denver 514,678 CO 80201 Detroit 1,511,48 clear that the shell (the normal command interpreter) and the editor were distinct and they didn't pay any attention to each otNJ 07207 Jersey City NJ 07303 Newark NJ 07101 Paterson NJ 07510 Trenton NJ 08608 #create cities Albany NY 12201 Atlanta GA 30301 "San Francisco", and "St. Louis". (c) Spell "Washington" and "Indianapolis" correctly. Then rewrite the file and type "ready". bacon 1.19/lb #create price beef shoulder 1.39/lb flank 1.59/lb sirloin 2.19/lb round 1.89/lb fish sword >0 ( ) *!+",#-$.%/ &0 '2 MI 48226 Hartford 158,017 CN 06101 Houston 1,232,802 TX 77052 Indianpolis 774,624 IN 46201 Los Angeles 2,809,59iar file. Print lines 2 through 5 of it; then type w, q and ready. #create Ref john adams thomas jefferson james madison james out #pipe ed file #user #unpipe #uncopyout tail -3 .ocopy >X1 #cmp Ref X1 #log #next 9.1a 10 8.1b 7 L8.1by #p #unpipe #uncopyout tail -5 .ocopy >X1 #cmp X1 Ref #log #next 9.3c 3 9.2d 7 L9.2dD #print The "." operator cab; g#print Using the same scheme, print lines 2 and 3 of this file. Then rewrite it and leave and type "ready"6 CA 92101 Miami 334,859 FL 33101 Milwaukee 717,099 WI 53201 Minneapolis 434,400 MN 55401 New Orleans 593,471monroe 91 #create file george washington john adams thomas jefferson james madison james monroe john quincy adams #copyout #piperint You can also use "-" in addresses. For example, the line before the current line is line ".-1" and can be printed with ".-n be used with multiple addresses to refer to the current line in either the first or second position (or both). For example, yo. #create Ref john adams thomas jefferson 91 #create file george washington john adams thomas jefferson james madison james monr LA 70140 New York 7,894,862 NY 10001 Newark 382,417 NJ 07901 Omaha 347,328 NE 68108 Philadephia 1,948, ed file #user #unpipe #uncopyout tail -5 .ocopy >X1 #cmp X1 Ref #log #next 10.1a 10 9.2e 5 L9.2a@ #print You1p" or even just ".-1". How would you print the line two lines before the current line? Type "answer COMMAND" where COMMAND is u could print from the current line to the 6th line with .,6p and similarly for any other line. I'll put you in the editor agoe john quincy adams #copyout #pipe ed file #user #unpipe #uncopyout tail -3 .ocopy >X1 #cmp Ref X1 #log #next 8.2c 3 8.1b 8 L8609 PA 19104 Phoenix 581,562 AR 85026 Pittsburgh 520,117 PA 15230 San Antonio 654,153 TX 78205 San Diego 696,7 can print several lines at once by using commands like 1,3p which prints lines 1, 2 and 3. Again, I'll put you into the editthe command you would type to print that line. #copyin #user #uncopyin #match .-2p #match .-2 #match -2 #match -- #log #next 9.1ain, with the current line set in the middle of a short file; print from the current line position to the fifth line, and then t.2c<  #print You can also use "-" in addresses. For example, you can print the line before the current line wi69 CA 92101 San Francisco 715,674 CA 94101 Seattle 530,831 WA 98101 Washinggton 756,510 DC 20013 #user #cmp cor. Print lines 1 to 3 of the file; then type w, q and ready. Your commands should look like 1,3p w q ready #create Rea 10 9.2a 5 L8.2a9 #print You can give addresses involving simple arithmetic to move around in the file. Forype w, q and ready. #create Ref 2. UNIX 3. hardware 4. software 5. manuals 97 #create file 2. UNIX 3. hardware 4. soth .-1p as a command. Again, I'll put you in the editor; print the fifth line and then the fourth, using this command to prinities Ref #log iL8.1a_B #print To move around, you can use simple arithmetic when specifying what to print. Ff george washington john adams thomas jefferson 91 #create file george washington john adams thomas jefferson james madison jame example, 3+1p is the same as 4p in the editor. Now that's not interesting, but if the current line (".") is line 3, then ftware 5. manuals you shouldn't have printed this line. #copyout #pipe ed file 1t1 #user #unpipe #uncopyout tail -5 .ocopy >X1t lines in reverse order. Then leave with w, q, and ready. #create Ref carrots squash 83 #create file broccoli mushrooms caulifor example, 3+1p is the same as 4p as an editor command. Now that's not very interesting; but if the '.' current line points monroe john quincy adams #copyout #pipe ed file #user #unpipe #uncopyout tail -4 .ocopy >X1 #cmp X1 Ref #log #next 9.2b 5 L9.2 .+1p is also 4p; it prints the next line. For example, you can print the 3rd and 4th lines of this file using 3p .+1p  #cmp X1 Ref #log #next 9.2e 5 lL9.2ey #print You can also employ addresses using arithmetic with this kind olower squash carrots lettuce string beans peas lima beans #copyout #pipe ed file #user #unpipe #uncopyout tail -3 .ocopy >X1 #cmer is line 3, then using .+1p instead of 4p is helpful. For example, print the 3rd and 4th lines of the familiar file using fibB #print You can of course use any kind of line numbers for the addresses in the "p" command. Just as you d w q where "3p" prints the third line, as usual, and then ".+1p" prints the next or fourth line. Try that. Type "ready" whenf command. For example, what "p" command would you type to print from line 2 to the line before the current line of the file? p Ref X1 #log #next 9.1a 10 9.2a 5 cL9.1a> #print Printing only one line at a time gets pretty slow. You canrst "3p" to get to line 3 and then ".+1p" to print the next line. End as usual with w, q, and ready. #create Ref thomas jeffersoid before, print lines 2 through 5 of this file, and then type w, q, and ready. #create Ref mushrooms cauliflower squash carrots done. #create Ref caslon century schoolbook 86 #create file baskerville bodoni caslon century schoolbook futura helvetica news Remember what the line before the current line is: .-1 right? Type "answer COMMAND" where COMMAND is the specified "p" comman print several lines with commands like 1,3p which prints lines 1, 2 and 3. Again, I'll put you into the editor with the familn james madison 91 #create file george washington john adams thomas jefferson james madison james monroe john quincy adams #copy 83 #create file broccoli mushrooms cauliflower squash carrots lettuce string beans peas lima beans #copyout #pipe ed file #usergothic times roman #copyout #pipe ed file #user #unpipe #uncopyout tail -3 .ocopy >X1 #cmp Ref X1 #log #next 8.2b 5 9.1a 10 L8.2?0 ( ) *!+",#-$.%/ &0 'd. #copyin #user #uncopyin #match 2,.-1p #match 2,-p #match 2,.-p #log #next 10.1a 10 10.2a 5 10.3a 2 L9.3cI 8l papers and memos consist of normal text interspersed with occasional (or frequent) mathematical expressions, such as the ones  your part. One of the things "-ms" does is to arrange that equations are "displayed" - that is, that they are neatly centered aser #uncopyin #match yes #fail Do you have the right kind of terminal? If you are using a DASI or GSI, make sure the switch labe#print You can make up addresses for the 'p' command using '.' for the current line when there are two addresses, also. For exain the last lesson. To tell neqn that something is mathematics, not normal text, you must surround it by two "commands": A lnd set off from the surrounding text. Most of the "-ms" package is described in another script called "macros", which you may haled "PLOT" inside the cover is set to ON. If these fail, call for help; otherwise type yes the next time. #log #next 1.1a L1.1ample, you could print from the first line up to the present line with 1,.p and I suggest you try that now. After that commandine that begins with .EQ marks the start of an expression. A line that begins with .EN marks the end of the expreL0  #next 0.1a L0.1aO #once #create message .EQ delim $$ .EN .pl 1 .ll 55 This scripve already learned. For now, we need only know this much: to use "-ms" with neqn, add "-ms" to your command line, right after th >#print To properly print a file containing an equation, you have to type a longer-than-usual command line. I, type the usual w q ready #create Ref 83 broccoli mushrooms cauliflower squash carrots lettuce string beans peas lima beaession. Thus, the lines .EQ x=y+1 .EN represent the equation x=y+1 The file "Example" in this directory has a line that contat is designed to teach you the "eqn" language for typing mathematics. There are two versions of the program. "eqn" is for use oe word "nroff", like this neqn files... | nroff -ms -Txxx Notice where the "-ms" goes. In this directory is a file called "f you are using a DASI or GSI, to print a file "math" that contains mathematics, you must say neqn math | nroff -Txxx where ns 83 #create file broccoli mushrooms cauliflower squash carrots lettuce string beans peas lima beans #copyout #pipe ed file #usins + and - signs. Make that line into an equation by adding .EQ and .EN before and after. Print "Example" with neqn and nroff n the phototypesetter; "neqn" is for use on a terminal like a DASI or GSI, or a Model 37 teletype. The lessons are mostly writteExample". To prove that you can type the "-ms" in the right place, print "Example" with "-ms", then type "ready". #once #create "-Txxx" describes the terminal you are using. This is usually one of -T300 -T300S -T450 It is very important that you get er #unpipe #uncopyout #cmp .ocopy Ref #log #next 9.2d 5 ng '.' for the current line when there are two addresses, also. For exa(and the appropriate -Txxx), then type "ready". #once #create Ref This is a tiny little text that includes one equation or at len under the assumption that you will be using neqn on a DASI or GSI or teletype; a few things that are specific to eqn on the tyExample .PP This is a tiny little text that includes one equation or at least it will when you find this line: .EQ x sub i = y sthis line right. If you don't, you'll not be happy with your output. In this directory is a file called "Example"; print it promple, you could print from the first line up to the present line with 1,.p and I suggest you try that now. After that commandast it will when you find this line: .ce .EQ a = b + c - d .EN and convert it into an equation. .pl 1 #once #create Example Thispesetter are left to the end. The terminal MUST be a DASI or GSI or teletype, or you will get some rather startling results froub i .EN and convert it into an equation. (Naturally I changed it.) .pl 1 #copyin #user #uncopyin grep 'neqn Example *| *nroff -perly, using whichever command line is appropriate to your terminal. Then type "ready". #once #create Example This is a little , type the usual w q ready #create Ref 83 broccoli mushrooms cauliflower squash carrots lettuce string beans peas lima bea is a tiny little text that includes one equation or at least it will when you find this line: .ce a = b + c - d and convert it m this script. To verify that everything is working, this message should come out with subscripts, superscripts, Greek letters ms' <.copy >/dev/null #log #next 1.1d 10 .L1.1d ##print The "-ms" package lets you do some other nice things file that contains an example of a subscript and superscript: .ce .EQ a sub i + b sub i ~=~ c sub i sup 2 .EN .pl 1 #copyin #useusr/lib/learn/eqn.a 644 3 3 into an equation. .pl 1 #user #cmp Ref Example #log #next 1.1c 10 L1.1c M#print It is usually wise to do yourand so on. If it doesn't, we're in trouble. .sp Summation sign: $ sum $ .sp Letter pi: $ pi $ .sp Subscript and superscript: $ as well. For example, you can arrange for a number to be placed on an equation, in the right margin: a = b + c - d r #uncopyin grep 'neqn Example *| *nroff -T' <.copy >/dev/null #log #next 1.1b 10 L1.1b V#print Most technica 147720 3142671160 7473  formatting with the "-ms" macro package developed by Mike Lesk, since it does a lot of dirty work for you without any effort onx sub i ~=~ y sup j $ .sp If this looks ok, type yes. Otherwise, type no. .pl 1 # #once neqn message | nroff -T$term #copyin #u@0 ( ) *!+",#-$.%/ &0 ' (1.23) by placing the number after the .EQ on the same line, like this: .EQ (1.23) You must leave a space to line up one part of an equation with some part of a previous equation - for example, equals signs are often lined up like tthis line: .EQ x sup i = y sup i .EN and convert it into an equation. (Naturally I changed it.) .pl 1 #user grep '\.EQ *L *(3.member .EQ I. #log #next 10.1b 10 L10.1b A#print More practice with mark and lineup. Modify "Example" so the +ld E sup T times bold B ) sub i - m sub ij,\|j ~=~ -q sup D E sub i sup T -( bold ~j sup D times bold B ) sub i .EN #once #cre between .EQ and the number. In the file "Example", number the equation "17.1a" and print it properly with neqn and nroff -ms.his: .EQ I x mark = y sub i .EN .EQ I lineup = z sub i .EN .EQ I x sub i + y sub i lineup = z sub i .EN To achieve this, you ha1a)$' /dev/null #log #next 1.1f 10 aL1.1f #print You can also make equations that are ________ signs are lined up in all of the equations, then type "ready". #once #create Ref .LP .EQ I x ~==~ a sub i ~ mark + ~ b sub i ~-eate Example .LP EQUIVALENCES OF ONE SORT AND ANOTHER .LP .EQ (2.01) bold x sup { n alpha } (t) ~->~ bold x sup alpha ( bol (Don't forget -Txxx for your terminal.) Then type "ready". #once #create Example .PP This is a tiny little text that includes ove to do several things. (1) tell neqn to remember the place where things are to be lined up, which is done by saying "mark" jusindented a fixed amount from the left margin, with the command .EQ I Again, if there is an equation number, it follows the~ c sub i .EN .EQ I lineup + ~ d sub i - e sub i .EN .EQ I lineup + ~ f sub i - g sub i .EN .EQ I lineup + ~ ... .EN .pl 1 #onced X ,t). .EN .sp .EQ (2.02) sum from n F( bold x sup { n alpha } (t)) ~->~ 1 over OMEGA INT F( bold x sup alpha ( bold X ,t))d bne equation or at least it will when you find this line: .EQ x sub i = y sub i + z sub i .EN and convert it into an equation. (Nt before the thing you want remembered: .EQ I x mark = y sub i .EN .br (2) Then, in successive equations, telling neqn to  I. Convert all the equations in "Example" to indented ones. (Naturally I've changed it.) You can do this with a single editor  #create Example .LP .EQ I x ~==~ a sub i ~ + ~ b sub i ~-~ c sub i .EN .EQ I + ~ d sub i - e sub i .EN .EQ I + ~ f sub i - g suold \|X .EN .EQ (2.03) bold x ( bold X ,t) ~==~ sum from { alpha =1} to N rho sup alpha over rho sup 0 bold x sup alpha ( bolaturally I changed it again.) .pl 1 #user grep '\.EQ *17\.1a$' /dev/null #log #next 1.1e 10 3L1.1e line up something on the previous mark, with "lineup": .EQ I lineup = z sub i .EN .br (3) You ____have __to use ecommand. Print "Example" with neqn and nroff -ms, then type "ready". #once #create Ref .LP EQUIVALENCES OF ONE SORT AND ANb i .EN .EQ I + ~ ... .EN .pl 1 # #once neqn Ref | nroff >X1 & #user neqn Example | nroff >X2 #cmp X1 X2 #log #next 10.1c 10 eL1d X ,t) .EN .EQ (2.08) sum from {alpha =1} to N U sup { mu alpha } V sup { mu alpha } ~=~ delta sup { mu nu } .EN .EQ (2.06) b+#print So far all the equations have been centered, which is what "-ms" does unless you tell it differently. You can also arraither ".EQ I" or ".EQ L"; you can't line things up in a centered equation. For practice, modify "Example" so the equations are OTHER .LP .EQ I (2.01) bold x sup { n alpha } (t) ~->~ bold x sup alpha ( bold X ,t). .EN .sp .EQ I (2.02) sum from n F( bold x 0.1c #print There are several warnings in order about mark and lineup. First, remember that you must use ".EQold y sup { T mu } ( bold X ,t) ~==~ sum from {alpha =1} to N U sup { mu alpha } bold x sup alpha ( bold X ,t) .EN .EQ ~ partnge for equations to be left-adjusted - that is, right up against the left margin - by saying .EQ L If there is a number, placlined up on the equals signs, then type "ready". .pl 1 #once #create Ref .LP A test of mark and lineup: .EQ I x sub i ~ mark =~ sup { n alpha } (t)) ~->~ 1 over OMEGA INT F( bold x sup alpha ( bold X ,t))d bold \|X .EN .EQ I (2.03) bold x ( bold X ,t) ~==~ I" or ".EQ L". Second, there can only be one mark or one lineup in any given equation. Finally, what you are doing must make seial over {partial d} ( epsilon sub 0 bold E sup T times bold B ) sub i - m sub ij,\|j ~=~ -q sup D E sub i sup T -( bold ~je it _____after the L, separated by a space, like this: .EQ L (3a) Make the equation in "Example" left-justified with th1 .EN .EQ I x sub i + y sub i ~ lineup = ~2 .EN .pl 1 #once #create Example .LP A test of mark and lineup: .EQ I x sub i ~ =~ 1  sum from { alpha =1} to N rho sup alpha over rho sup 0 bold x sup alpha ( bold X ,t) .EN .EQ I (2.08) sum from {alpha =1} tnse, or your results may be not what you wanted. Does this sequence produce output with the equals signs lined up? .EQ L x  sup D times bold B ) sub i .EN #user #cmp Ref Example #log #next 2.1a 10 L10.1a`E #once #create message .ND .te number (3.1a) in the right margin and print it to make sure everything works. Then type "ready". #once #create Example .PP Th.EN .EQ I x sub i + y sub i ~ =~ 2 .EN .pl 1 # #once neqn Ref | nroff >X1 & #once neqn message Ref | nroff -T$term %s/tinyms - #o N U sup { mu alpha } V sup { mu alpha } ~=~ delta sup { mu nu } .EN .EQ I (2.06) bold y sup { T mu } ( bold X ,t) ~==~ sum fmark = y .EN .EQ L x+y mark = z .EN Answer yes or no. #copyin #user #uncopyin #match no #log #next 11.1a 10 10.2c 5 L10.r %$ .EQ delim $$ .EN .LP The next topic goes back to the problem of formatting equations on the page. Sometimes it is desirablis is a tiny little text (which you're undoubtedly sick of by now) that includes one equation or at least it will when you find user neqn Example | nroff >X2 #cmp X1 X2 #fail Don't forget that tilde is a real character; put the mark and lineup after it. Rerom {alpha =1} to N U sup { mu alpha } bold x sup alpha ( bold X ,t) .EN .EQ I ~ partial over {partial d} ( epsilon sub 0 boA0 ( ) *!+",#-$.%/ &0 '2c #print Does this sequence produce output with the equals signs lined up? .EQ I x mark = y .EN .EQ .pl 1 #once #create Ref .LP .EQ "" sup + H sub 2 ~ "<=>" ~ "" sup - H ~+~ "" sup + H .EN .pl 1 #once #create Example .LP .EQ xxx. Modify "Example" so it prints the following output, then type "ready". .pl 1 # #once #create Ref .EQ delim $$ .EN .LP The costp to some horribly complicated mess. The bars grow to the right height to cover the "something", automatically. To produce the e #uncopyin #match no #log #next 11.1e 10 fL11.1ekE #once #create message .ND .tr %$ .EQ delim $$ .EN .LP SometiI x+y mark = z .EN Answer yes or no. #copyin #user #uncopyin #match yes #log #next 11.1a 10 L11.1abE F#once  .EN .pl 1 # #once neqn Ref | nroff >X1 & #once neqn message Ref | nroff -T$term %s/tinyms - #user neqn Example | nroff >X2 #cmp of processing is proportional to $characters over "$"$. .pl 1 #once #create Example .LP The cost of processing is proportional xample above, all that was needed was .EQ left | a sup 2 over b sub i right | .EN For practice, modify file "Example" mes there will be a need for a subscript or superscript that has nothing to the left of it, as in references like $"" sup 1$Sm#create message .ND .tr %$ .EQ delim $$ .EN .LP We have introduced a fair number of "magic" words like sub and sup and over and  X1 X2 #fail Don't forget spaces; don't forget to quote things when needed (including <=>). #log #next 11.1g 10 L11.1gto .pl 1 # #once neqn Ref | nroff >X1 & #once neqn message Ref | nroff -T$term %s/tinyms - #user neqn Example | nroff >X2 #cmp Xso it produces output that looks like this, then type "ready". .pl 1 #once #create Ref .LP .EQ left | {a over b ~+~ c over d} ovith, J. `A great paper...' Experiment and decide if you can get this effect by writing simply %sup 1%Smith, J..... Type yes pi and sum. What happens if you need to print an equation that contains one of these words __as ____text, like this: .EQ qE #once #create message .ND .tr %$ .EQ delim $$ .EN .LP For practice, modify "Example" so it produces output that looks 1 X2 #log #next 11.1c 10 nL11.1ciE #once #create message .ND .tr %$ .EQ delim $$ .EN .LP Modify "Example" so iter 2 right | .EN .pl 1 #once #create Example .LP .EQ replace me .EN .pl 1 # #once neqn Ref | nroff >X1 & #once neqn message Ref if this works, no if it does not. .pl 1 # #once neqn message | nroff -T$term %s/tinyms - #copyin #user #uncopyin #match no #log e sub "pi" .EN The way to turn off special meanings of magic words is to enclose them in the double quotes "...". The $e sub "like this, then type "ready". .pl 1 #once #create Ref .LP .EQ { lim ~ "sup" } bar ~f(x) ~=~ x .EN .pl 1 #once #create Example .L prints the following output, then type "ready". .pl 1 #once #create Ref .EQ delim $$ .EN .LP The cost of processing is proporti| nroff -T$term %s/tinyms - #user neqn Example | nroff >X2 #cmp X1 X2 #log #next 12.1b 10 L12.1b #print Bars #next 11.1f 10 xL11.1fnE #once #create message .ND .tr %$ .EQ delim $$ .EN .LP The way to handle the problem ofpi"$ was printed with .EQ e sub "pi" .EN Using this knowledge, modify file "Example" so it produces output that looks likP .EQ xxx .EN .pl 1 # #once neqn Ref | nroff >X1 & #once neqn message Ref | nroff -T$term %s/tinyms - #user neqn Example | nroffonal to ${ "{" characters "}" } over "$"$. .pl 1 #once #create Example .LP The cost of processing is proportional to .pl 1 # #onare not the only characters you can put around an equation. If you say left ( thing right ) you will get large parentheses  a subscript or superscript on nothing is to provide something to hang the subscript or superscript on. One possibility is to ue the following, then type "ready". .pl 1 #once #create Ref .LP .EQ lim "sup" f( "pi" ) = p cdot i .EN .pl 1 #once #create Examp >X2 #cmp X1 X2 #log #next 12.1a 10 L12.1asE #once #create message .ND .tr %$ .EQ delim $$ .EN .LP The next stece neqn Ref | nroff >X1 & #once neqn message Ref | nroff -T$term %s/tinyms - #user neqn Example | nroff >X2 #cmp X1 X2 #log #nexaround "thing". You can also use [ and ] for large square brackets and { and } for large braces. The main problem is that on yose a tilde, but that has a real width, and might spoil the appearance of the output. The best solution is this: "" sup 1 ... le .LP .EQ lim sup f( pi ) = p cdot i .EN .pl 1 # #once neqn Ref | nroff >X1 & #once neqn message Ref | nroff -T$term %s/tinyms p is to learn how to put big parentheses, brackets, braces or bars around equations, like this: .EQ left | a sup 2 over b sub i t 11.1d 10 nL11.1d #print One thing to keep in mind, although it generally isn't going to affect you, is thatur terminal there is no good way for neqn to draw large braces or brackets or parens. So neqn replaces all of these with bars.  The expression "" has no width, so everything works out properly. The use of "" may seem a bit unnatural but it's an idiom tha- #user neqn Example | nroff >X2 #cmp X1 X2 #log #next 11.1b 10 L11.1beE ?#once #create message .ND .tr %$ .EQ dright | .EN This is done with two new words called "left" and "right". To put bars around something, you simply say, in the mid the quote " is a delimiter just like blank or tilde - it turns off subscripts and superscripts, and so on. Experiment a bit, aUse the right character anyway, though - things do work properly on the typesetter. And who knows, some day neqn may get improvt you get used to quite quickly. For practice, modify "Example" so it produces output that looks like this, then type "ready". elim $$ .EN .LP The quoting mechanism can also be used to turn off the special meaning of things like the dollar sign and bracesdle of an equation, left | something right | and the job is done. "something" can indeed be anything, from a single letter und decide if e sup "{t}" is the same as e sup "{"t"}" Type yes if they are the same, no if they are different. #copyin #userB0 ( ) *!+",#-$.%/ &0 'ed as well. With the current version of neqn, does the input left { a over b right } produce the same output as left [ a ov.EN Sorry, but you will probably even see it again. .pl 1 #once neqn Ref | nroff >X1 & #once #create Example .PP You probably ths. For example, will left "{" a + b over c over d produce the same output as { left "{" a } + b over c over d Answer yes ox } over { partial y } = y over x .EN .pl 1 #user neqn Example | nroff >X2 #cmp X1 X2 #log #next 2.1d 10 mL2.1d looks like a=b+c-d regardless of spaces in the input. Spaces are always thrown away, and so are new lines - you can type an equer b right ] Answer yes or no. #copyin #user #uncopyin #match yes #log #next 12.1c 10 L12.1cwE #once #create meought you were done with this ridiculous example of just .EQ a = b + c -d .EN Sorry, but you will probably even see it again. .pr no after experimenting. #copyin #user #uncopyin #match no #log #next 12.1e 10 L12.1eyE a#once #create message #print The file "Chars" contains a longer list of characters that you can obtain with neqn. Print the file "Chars" with neqnation on as many lines as you like. This latitude is permitted mainly to make it easy to type equations - longer equations are essage .ND .tr %$ .EQ delim $$ .EN .LP Of course the thing with bars or braces around it can still be part of larger expressions:l 1 #user neqn Example | nroff >X2 #cmp X1 X2 #log #next 2.1c 10 2.2b 5 L2.1c #once #create message .nf .EQ .ND .tr %$ .EQ delim $$ .EN .PP There are also occasions when you want to omit the left part and keep the right part. This is a  and nroff -ms, then type "ready". (Don't forget -Txxx.) #once #create Chars .LP .EQ delim $$ .EN .nf $alpha$ alpha $beta$ betaasier to edit when they are typed as a series of short input lines instead of one giant one. Will the printed output of this eq the input .EQ left | {a over b ~+~ c over d} over 2 right | over a+b+c+d .EN produces .EQ left | {a over b ~+~ c over delim $$ .EN Several of the examples we did earlier had Greek letters and other mathematical symbols in them. The way to get thibit more complicated, since for obscure reasons neqn won't let you actually leave the left part out completely. But you can ask  $gamma$ gamma $GAMMA$ GAMMA $delta$ delta $DELTA$ DELTA $epsilon$ epsilon $zeta$ zeta $eta$ eta $THETA$ THETA $theta$ theta $lauation .EQ a + b + c .EN be any different from this one? .EQ a+b+c .EN Answer yes or no. #copyin #user #uncopyin #match no #log d} over 2 right | over a+b+c+d .EN For practice, modify file "Example" so it produces output that looks like this, then type "rngs like $pi$ and $sum$ and $int$ is rather easy - you just spell out their names, like this: $pi$ is pi $sum$ is sum $int$ iit to print no character, instead of using bars, by saying left "" thing right | .LP This is similar to the way we used quombda$ lambda $LAMBDA$ LAMBDA $mu$ mu $nu$ nu $xi$ xi $pi$ pi $PI$ PI $rho$ rho $sigma$ sigma $SIGMA$ SIGMA $tau$ tau $phi$ phi $#next 2.1b 10 2.2a 5 gL2.1b #print Since spaces are thrown away, what do you do when you want spaces? The aneady". .pl 1 #once #create Ref .LP .EQ left | {a over b ~+~ c over d} over 2 right | sup half .EN .pl 1 #once #create Example .Ls int and so on. The main thing you must always remember about these names is that when they appear in an equation, they must btes before, to get a zero-width thing before a superscript. For practice, modify file "Example" so it produces output that lookPHI$ PHI $psi$ psi $PSI$ PSI $omega$ omega $OMEGA$ OMEGA $partial$ partial $integral$ integral $int$ int $sum$ sum $prod$ prod $swer is that you have to ask for them explicitly. If you type a "~" (tilde) it will be replaced by a space on output; use one tiP .EQ replace me .EN .pl 1 # #once neqn Ref | nroff >X1 & #once neqn message Ref | nroff -T$term %s/tinyms - #user neqn Example e separated from surrounding symbols by blanks or tildes, OR THEY WILL NOT BE RECOGNIZED. For practice, modify "Example" so thes like this, then type "ready". .pl 1 #once #create Ref .LP .EQ left "" int from 0 to {2 pi} sin (x) dx ~=~ cos (x) right | sub <=$ <= $>=$ >= $==$ == $cdot$ cdot $...$ ... .pl 1 #copyin #user #uncopyin grep 'neqn Chars *| *nroff' <.copy >/dev/null #log #nlde for each space. Thus to get a + b you need .EQ a~+~b .EN Modify the equation in file "Example" so there is one space around| nroff >X2 #cmp X1 X2 #log #next 12.1d 10 L12.1d  #print .LP The "right" part of a left-right construction c symbol $partial$ is replaced by $sum$ everywhere it appears. Type "ready" when you're done. .pl 1 #once #create Ref .PP The sym0 sup {2 pi} .EN .pl 1 #once #create Example .LP .EQ replace me .EN .pl 1 # #once neqn Ref | nroff >X1 & #once neqn message Ref ext 2.1e 10 L2.1e|E `#once #create message .ND .PP For practice, in this directory there is a file called "Exam each of the operators =, + and -, so it looks like a = b + c - d Print it with neqn and nroff -ms to verify it. Type "ready" an be omitted if it is not used; just leave that part out. The main thing to watch out for is that now you will need braces to ebol .EQ sum .EN often appears in lines like .EQ { sum x } over { sum y } = y over x .EN .pl 1 # #once neqn Ref | nroff >X1 & #o| nroff -T$term %s/tinyms - #user neqn Example | nroff >X2 #cmp X1 X2 #log gL2.1a #print You may have noticeple". It contains an equation. Make it look like this: .EQ int from i to j f( pi ) ~=~ LAMBDA (x) .EN by changing the charactewhen done. #once #create Ref .PP You probably thought you were done with this ridiculous example of just .EQ a ~=~ b ~+~ c ~-~d nclose the entire construction, "left" and all - otherwise neqn will not know where to stop in figuring out how high the thing ince neqn message | nroff -T$term #once #create Example .PP The symbol .EQ partial .EN often appears in lines like .EQ { partial d that neqn threw away the spaces in several of the examples we did. For example, in .EQ a = b + c - d .EN the output equation C0 ( ) *!+",#-$.%/ &0 'r names as appropriate and adding spaces where needed. Type "ready" when you're satisfied. .pl 1 #once neqn message | nroff -T$t/tinyms - #user neqn Example | nroff >X2 #cmp X1 X2 #log #next 3.1b 10 3.2a 5 L3.1bE #once #create message .Nd? .EQ X = Y +Z .EN .EQ x = y + z .EN Answer yes if they will be different, no if they will be toff >X1 & #once neqn message Ref | nroff -T$term %s/tinyms - #user neqn Example | nroff >X2 #cmp X1 X2 #log #next 3.1d 10 3.2c 5once neqn Ref | nroff -T$term %s/tinyms - #user neqn Example | nroff >X2 #cmp X1 X2 #fail Don't forget equation numbering and sperm %s/tinyms - #once #create Ref .LP .EQ int from i to j f( pi ) ~=~ LAMBDA (x) .EN .pl 1 #once #create Example .LP .EQ sum froD .PP Naturally there is a superscript operation that's exactly like "sub", except that it goes up instead of down. It is calledhe same. #copyin #user #uncopyin #match yes #fail Look more closely at ____what letters are being printed. #log #next 2.1b 1 oL3.1dE #once #create message .ND .PP There is one special construction with subscripts and superscripts thaaces where needed. Print file "Chars" if you've forgotten the character names. #log #next 2.1f L3.1aE #once m i to j f(q) = lambda (x) .EN .pl 1 #once neqn Ref | nroff >X2 & #user neqn Example | nroff >X1 #cmp X1 X2 #log #next 2.1f 10 2 "sup". To make .EQ x sup i+j .EN for example, you type .EQ x sup i+j .EN Make the file "Example" produce the same ou0 L2.2b S#print One more example of spaces before getting on to something new. In the file "Example", change t you have to be aware of, although it almost always does what you want automatically. When something has both a subscript and a#create message .ND .PP Now that we have some of the preliminaries out of the way, we can get on to doing real mathematics. I ha.2e 5 L2.1f~E #once #create message .ND .LP One of the most common problems in using neqn is forgetting to leatput as the following, then type "ready". #once #create Ref .LP .EQ x sup alpha ~=~ y sup pi ~+~ z sup pi .EN .pl 1 #once #creatthe spacing so the equation reads a = b+c-d Print the example with "-ms". Type "ready" when you're done. #once #create Ref .PP superscript, it is usually printed as .EQ x sub i sup j .EN instead of .EQ {x sub i} sup j .EN To produce this effect, with theve been slipping small things into the example files as we go along so that you will at least have seen some common neqn construve spaces or tildes around "magic" words like "pi" or "int" or "sum". The result is that the magic words cease to be magic, ande Example .LP .EQ xxx .EN .pl 1 # #once neqn Ref | nroff >X1 & #once neqn message Ref | nroff -T$term %s/tinyms - #user neqn Exa Here it is again. One example goes a long way. .EQ a ~=~ b + c -d .EN Sorry, but you will probably even see it again. .pl 1 #o superscript _____above the subscript instead of to the right, you have to type the subscript ______before the supersctions. One of the most frequent is the word "sub", which indicates a subscript, like this: .EQ x sub i + y sub j .EN just look like ordinary strings of letters. In the file "Example", there are several such errors. Find them, and fix them so tmple | nroff >X2 #cmp X1 X2 #fail Don't forget that there are spaces around the = and +. #cmp X1 X2 #log #next 3.1c 10 iL3.1cnce #create Example .PP Here it is again. One example goes a long way. .EQ a = b + c -d .EN Sorry, but you will probably even script, like this: .EQ x sub i sup j .EN That's all there is to it. Modify "Example" to produce the following output, which produces .EQ x sub i + y sub j .EN The main thing to notice is that the blanks are delimiters - the subscript of "x" is he output looks like this, then type "ready". .pl 1 #once #create Ref .LP .EQ sum ~=~ pi ~+~1 .EN .EQ a~=~ pi (x) .EN .EQ alpha E o#once #create message .ND .PP Subscripts and superscripts can appear in the same equation, and any subscriptedee it again. .pl 1 # #once neqn Ref | nroff >X1 & #user neqn Example | nroff >X2 #cmp X1 X2 #log #next 2.1c 10 EL2.2e then type "ready". .pl 1 #once #create Ref .LP .EQ x sub ij sup kmn = y sub i sub j .EN .pl 1 #once #create Example .LP .EQ xxx"i"; the blank after the "i" marks the end of the subscript. Modify the file "Example" so the equation in it looks like this: .~=~ beta ~+~ gamma ~+~ delta .EN .pl 1 #once #create Example .LP .EQ sum=pi+1 .EN .EQ a=pi(x) .EN .EQ alpha=beta+gamma+delta .EN or superscripted thing can have a subscript or superscript. For example, you can say .EQ x sub i sub j ~+~ y sup i sup jE V#print Make the two equations in "Example" look like these two, then type "ready". #once #create Ref .ND .LP .EQ (1.1 .EN .pl 1 # #once neqn Ref | nroff >X1 & #once neqn message Ref | nroff -T$term %s/tinyms - #user neqn Example | nroff >X2 #cmpEQ x sub alpha ~=~ y sub pi ~+~ z sub pi .EN Then type "ready". .pl 1 #once #create Ref .LP .EQ x sub alpha ~=~ y sub pi ~+~ z s .pl 1 # #once neqn Ref | nroff >X1 & #once neqn message Ref | nroff -T$term %s/tinyms - #user neqn Example | nroff >X2 #cmp X1  .EN to get .EQ x sub i sub j ~+~ y sup i sup j .EN Modify "Example" to produce the following output, then type "ready". .pl) PI ~=~ ( pi sub 1 , pi sub 2 ,..., pi sub n ) .EN .EQ (1.2) pi bar ~=~ sum ( alpha , beta ) .EN .pl 1 #once #create Example .N X1 X2 #log #next 3.1e 10 3.2d 5 sL3.1eE #once #create message .ND .PP One common typing error that you shoulub pi .EN .pl 1 #once #create Example .LP .EQ xxx .EN .pl 1 # #once neqn Ref | nroff >X1 & #once neqn message | nroff -T$term %sX2 #log #next 3.1a 10 L2.2a R#print Will the output from the first equation below be different from the secon 1 #once #create Ref .LP .EQ 2 sup 2 sup 2 sup 2 ~=~ 65536 .EN .pl 1 #once #create Example .LP .EQ xxx .EN # #once neqn Ref | nrD .LP .EQ PHI = ( phi sub 1 , phi sub 2 ,..., phi sub n ) .EN .EQ phi bar = sum (A,B) .EN .pl 1 # #once neqn Ref | nroff >X1 & #D0 ( ) *!+",#-$.%/ &0 'd watch out for is forgetting to end a superscript or subscript with a blank or other delimiter (like tilde). For instance, you s like this one, then type "ready". .pl 1 #once #create Ref .LP .EQ a + b over c + d = e over f .EN .pl 1 #once #create Example sub i sup pi Answer yes or no. #copyin #user #uncopyin #match no #log #next 3.1e 10 cL4.1aE F#once #create mer #uncopyin #match no #log #next 5.1b L5.1bE #once #create message .ND .EQ delim $$ .EN .LP The problem is rext 4.1c 10 dL4.1c #print Does the neqn input .EQ a over b .EN produce the same output as the inputoften see output like .EQ f(x sup 2)=1 .EN because there wasn't a space left between the 2 and the ). What we really wanted, of .LP .EQ replace me .EN .pl 1 # #once neqn Ref | nroff >X1 & #once neqn message Ref | nroff -T$term %s/tinyms - #user neqn Examplssage .ND .EQ delim $$ .EN .LP The next neqn word to learn is "over", which makes fractions like .EQ a+b over c .EN In fact thatally that we need a way to tell neqn that in spite of blanks, a group of things (like the $pi$ and the +1) have to be kept toget .EQ a over b .EN Answer yes or no. #copyin #user #uncopyin #match yes #log #next 4.1d 10 4.2c 5 yL4.1dE course, was .EQ f(x sup 2 )=1 .EN Modify "Example" to produce this output, then type "ready". .pl 1 #once #create Ref .LP .EQ ge | nroff >X2 #cmp X1 X2 #log #next 4.1b 10 L4.2c #print Does the neqn input .EQ ~a over b~ .EN pr line was made by .EQ a+b over c .EN To begin with an easy one, reproduce the equation below in the file "Example", theher as a single superscript. The way that this is done is to enclose the group in braces - the characters { and } - like this: #once #create message .ND .LP You can put fractions over fractions with multiple "over"'s just as you can do multiple subscrip( x sup pi ) = pi (gx sup 2 ) .EN .pl 1 #once #create Example .LP .EQ g( x sup pi) =pi(gxsup2) .EN .pl 1 # #once neqn Ref | nroduce the same output as the input .EQ a~ over ~b .EN Answer yes or no. #copyin #user #uncopyin #match no #log #next 4.1d n type ready. (To get $>=$, type ">=".) .pl 1 #once #create Ref .LP .EQ x+1 over y+1 ~>=~ x over y .EN .pl 1 #once #create Examp .EQ x sup {pi + 1} .EN This tells neqn that everything inside the braces belongs to the superscript, in spite of blanks ats and superscripts, although fractions within fractions are much less common (probably because they are harder for people to reoff >X1 & #once neqn message Ref | nroff -T$term %s/tinyms - #user neqn Example | nroff >X2 #cmp X1 X2 #log #next 4.1a 10 L3.2a10 L5.1aE #once #create message .ND .EQ delim $$ .EN .LP So far we have carefuly skirted around a potential le .LP .EQ replace me .EN .pl 1 # #once neqn Ref | nroff >X1 & #once neqn message Ref | nroff -T$term %s/tinyms - #user neqn Exand tildes. (You don't need blanks before and after braces themselves - like tildes, they act as delimiters.) Modify the file "Ead). Anyway, if you want, for example, something like .EQ a over b over c .EN you just type .EQ a over b over c .EN As a  #print Do x sub i +y sub j and x sub i+y sub j produce the same output? Answer yes or no. #copyin #useproblem; maybe you've wondered about it. Suppose we want to produce an equation that looks like this: .EQ x sup { pi + 1 } .EN Tmple | nroff >X2 #cmp X1 X2 #log #next 4.1b 10 4.2a 5 L4.1bE ;#once #create message .ND .LP Of course you can xample" so that the output looks like the following, then type "ready". (To get $==$, type "==".) .pl 1 #once #create Ref .LP .Edrill, change "Example" so it produces an equation that looks like the following one, then type "ready". .pl 1 #once #create Refr #uncopyin #match no #log #next 3.1b 10 L3.2cE U#once #create message .ND .PP Modify "Example" to produce thhe superscript is complicated, in that it contains both a $pi$ and a +1, which has to be separated from the $pi$ by a blank. Butuse reserved words like "pi" or "int" with the "over" construction. For example, modify "Example" so its output looks like the Q x sup {pi +1} == y sup z sup {alpha + beta} .EN .pl 1 #once #create Example .LP .EQ replace me .EN .pl 1 # #once neqn Ref | nr .LP .EQ x over x+x over x+x+x .EN .pl 1 #once #create Example .LP .EQ right here .EN .pl 1 # #once neqn Ref | nroff >X1 & #onceis output, then type "ready". #once #create Ref .LP .EQ x sup 2 + y sup 2 = z sup 2 .EN .pl 1 #once #create Example .LP .EQ xxx  I already told you that a blank terminates the superscript. What's going on? As the first step to finding out, will the inputfollowing, then type "ready". .pl 1 #once #create Ref .LP .EQ alpha over beta ~=~ pi over 2 .EN .pl 1 #once #create Example .LP off >X1 & #once neqn message Ref | nroff -T$term %s/tinyms - #user neqn Example | nroff >X2 #cmp X1 X2 #log #next 5.1c 10 5.2b 5 neqn message Ref | nroff -T$term %s/tinyms - #user neqn Example | nroff >X2 #cmp X1 X2 #log #next 5.1a L4.2aE .EN .pl 1 # #once neqn Ref | nroff >X1 & #once neqn message Ref | nroff -T$term %s/tinyms - #user neqn Example | nroff >X2 #cmp  equation x sup pi + 1 produce the output $x sup {pi + 1}$ ? Answer yes or no. (You can play with the file "Example" if y.EQ replace me .EN .pl 1 # #once neqn Ref | nroff >X1 & #once neqn message Ref | nroff -T$term %s/tinyms - #user neqn Example |  dL5.1cE #once #create message .ND .EQ delim $$ .EN .LP Braces are an exceedingly useful construction. Wherev#once #create message .ND .LP Another practice one for using "over". Modify the file "Example" so it produces output that lookX1 X2 #log #next 3.1d 10 (L3.2d #print Does the equation x sup pi sub i produce the same output as x ou like.) .pl 1 #once #create Example .LP .EQ replace me .EN .pl 1 # #once neqn message | nroff -T$term %s/tinyms - #copyin #usenroff >X2 #cmp X1 X2 #fail The names are alpha, beta and pi. I hope your trouble wasn't any more complicated than that. #log #neE0 ( ) *!+",#-$.%/ &0 'er you have a place where you could have used a single thing like the letter "x", you can plug in anything in braces, and the whlly to appear ______inside ______quotes, like this: .EQ { "{" a + b "}" } over 2 .EN .br The quotes temporaripts. Of course the braces have to go in the right places, or you won't get the output you want. To verify that you are still .EQ delim $$ .EN .LP Modify "Example" so it produces this output, then type "ready". .pl 1 #once #create Ref .LP .EQ {partial e  line number. #once #create Example .LP .EQ 3 e sup -x sup 2 + e sup -x sub i sup 2 + e sup{-x sub i}sup 2 .EN .EQ 4 e sup{-{ole thing will be positioned properly. You can use braces with sub and sup and over, and all the other magic words we haven't srily turn off the special meaning of the braces so that you can have them printed. The file "Example" has a lot of square brackfollowing this lesson, modify "Example" so it looks like this, then type "ready". .pl 1 #once #create Ref .LP .EQ e sup { - {x ssup {-{x sup 2 + y sup 2} over 2}} over {partial x} ~=~ f(x) .EN .pl 1 #once #create Example .LP .EQ xxxx .EN .pl 1 # #once neqnx sub i sup 2 + y sub i sup 2}over 2} = e sup{- x over y} .EN .EQ 5 a over b = c over d = A over B times C over D .EN .EQ 8 B sueen yet. First let's use braces with "over". Modify "Example" to produce this output, then type "ready". (Recall that $partial$ets in it. Modify them so they are all braces when they are printed - so they look like this - then type "ready". .pl 1 #once #up {pi +1} + y sup {pi +1}} over 2} .EN .pl 1 #once #create Example .LP .EQ e sup {x sup {pi +1} + y sup {pi +1}} .EN .pl 1 # #o Ref | nroff >X1 & #once neqn message Ref | nroff -T$term %s/tinyms - #user neqn Example | nroff >X2 #cmp X1 X2 #log #next 5.1e b a sub 2 + B sub a sup 2 +B{ sub a}sup 2 + (B sub a ) sup 2 + (B sup 2 ) sub a +B sup 2 sup x .EN #copyin #user #uncopyin #matc is called "partial".) .pl 1 #once #create Ref .LP .EQ {partial y} over {partial x} ~=~ alpha over {alpha +1} .EN .pl 1 #once #ccreate Ref .LP .EQ f"{" x sub 1 ,..., x sub n "}" ~=~ "{" x sub 1 ,..., x sub n "}" .EN .pl 1 #once #create Example .LP .EQ f[ xnce neqn Ref | nroff >X1 & #once neqn message Ref | nroff -T$term %s/tinyms - #user neqn Example | nroff >X2 #cmp X1 X2 #fail Do10 /L5.2g #print Does x sup a over b produce the same output as {x sup a} over b Answer yes or no. #copyh 13 #log #next 5.1f 10 L5.1f #print Is the construction a {sup pi +1} legal in neqn? Answer yes or no. #create Example .LP .EQ replace me .EN .pl 1 # #once neqn Ref | nroff >X1 & #once neqn message Ref | nroff -T$term %s/tinyms - #us sub 1 ,..., x sub n ] ~=~ [ x sub 1 ,..., x sub n ] .EN .pl 1 # #once neqn Ref | nroff >X1 & #once neqn message Ref | nroff -T$n't forget that you need braces for the overall superscript, and also for the "over" part. #log #next 5.1e 10 5.2d 5 L5.1ein #user #uncopyin #match yes #log #next 5.1h 10 tL6.1aE 4#once #create message .ND .tr %$ .EQ delim $$ .EN .Lopyin #user #uncopyin #match no #log #next 5.1g 10 cL5.1g #print It is often possible to leave out braces, ber neqn Example | nroff >X2 #cmp X1 X2 #log #next 5.1d 10 L5.1dE #once #create message .ND .EQ delim $$ .EN .term %s/tinyms - #user neqn Example | nroff >X2 #cmp X1 X2 #log #next 6.1a 10 L5.2bE #once #create message .N #print Once you start using braces, there are a number of mistakes that you can make. For example, you can leavP So far every equation you have typed in has been "displayed" - neatly centered or indented, and offset from the surrounding teut when you do be sure that you get the answer you really wanted. For example, does x sup a over b produce the same output as LP You will get lots of practice using braces as we go along. One thing to keep in mind is that braces can appear ______wiD .EQ delim $$ .EN .LP Try another example with braces, for practice. Make the file "Example" produce output that looks like thie a brace out, or you can get them out of order (Like } xxx { ), or you can get them in illegal places. For all of these, neqn txt. But not all equations are like that. Very often they appear right in the middle of running text as subscripts like $x sub i$ x sup {a over b} Answer yes or no. #copyin #user #uncopyin #match no #log #next 5.1h 10 5.2g 5 2L5.1hE #oncthin braces. (Remember that I said that anywhere you could use an "x" you could put something in braces instead. So to get thiss line, then type "ready". (The character $rho$ is "rho".) .pl 1 #once #create Ref .LP .EQ alpha sub i sup {pi + rho + 1} ~=~ 1 ells you "syntax error", then tries to say what file and line numbers are involved. The line numbers are often not exact, but th or special characters like $pi$ or $partial$. How are these done? The idea is this. Two characters (which may be identical) e #create message .ND .tr %$ .EQ delim $$ .EN .LP One thing that you will occasionally need is to be able to get a literal { or : .EQ e sup {x sup {pi +1} + y sup {pi +1}} .EN you can type e sup {x sup {pi +1} + y sup {pi +1}} The big superscript (the .EN .pl 1 #once #create Example .LP .EQ replace me .EN .pl 1 # #once neqn Ref | nroff >X1 & #once neqn message Ref | nroff -T$teey are very close. When you get such a message, print a line or two before and after the line numbers named in the syntax errorare set aside as "delimiters". When the left delimiter is seen anywhere in ___any line, it marks the beginning of an in-line} in your output, for an expression like .EQ { "{" a + b "}" } over 2 .EN The way to do this is to place the braces that are reaone on the "e") has a pair of braces that take in everything. Then the "x" and the "y" each have braces to delimit their superscrm %s/tinyms - #user neqn Example | nroff >X2 #cmp X1 X2 #log #next 5.1c 10 L5.2dE #once #create message .ND  message. The file "Example" contains a syntax error. What line does neqn believe it begins on? Type "answer N", where N is theF0 ( ) *!+",#-$.%/ &0 ' equation. The end is marked by the right delimiter. Between the delimiters, all the normal rules of neqn apply. Suppose we saof a thing from thing to thing construction can be as complicated as you wish. The only limitation is that the individual "tim $$ .EN (If you like, other characters than $ can be used, but we will stick to dollar signs here.) Until you do this, $ signerm %s/tinyms - #user neqn Example | nroff >X2 #cmp X1 X2 #log #next 7.1d 10 7.2c 5 L7.1dE ~#once #create messsub i$ and $y sub i$ be $>=$ $z sub i$. produce the same output? Answer yes or no. #copyin #user #uncopyin #match no #log #nexty the delimiters are % signs. Then to get $pi$, you have to type %pi%. To make sure that you can do this much, find the $pi$, hing"'s may well need braces around them to make it clear to neqn which part goes with which. For example, suppose you want .EQs have no special significance to neqn. Modify the file "Example" by adding the "delim" lines to the beginning, and check that age .ND .tr %$ .EQ delim $$ .EN .LP Let's do one more example of from-to for practice before we go on to the next topic. Modify  7.1a L7.1aE T#once #create message .ND .tr %$ .EQ delim $$ .EN .LP The next construction we're going to look $alpha$ and $sum$ characters in "Example" and make them into in-line equations. Use % and % as the delimiter characters. (This i sum from {pi = 0} to {pi = n} .EN Then you have to ensure that the $pi =0$ and $pi =n$ parts are included in braces or they wil$ signs are now significant. Type "ready" when you are done. #once #create Ref .EQ delim $$ .EN .LP Now is the $times$ for all "Example" so it produces output that looks like this, then type "ready". .pl 1 #once #create Ref .EQ delim $$ .EN .LP Let $Q( piat is one for putting things above and below other things, in a rather specialized way. For example, if you want something like s the most frequent choice, by the way.) Type "ready" when you're done. .pl 1 #once #create Ref .EQ delim $$ .EN .LP This line cl not work right. Modify file "Example" so the output looks like the example above, then type "ready". .pl 1 #once #create Ref good $mu$ $epsilon$ $nu$ to come to the aid of their party. .pl 1 #once #create Example .LP Now is the $times$ for all good $mu$ )$ be $sum from {i= pi sub 1} to {i= pi sub 2} x sub i$. .pl 1 #once #create Example .EQ delim $$ .EN .LP .pl 1 # #once neqn Re.EQ sum from i to j .EN you type .EQ sum from i to j .EN The words "from" and "to" are more magic, like sub or sup or overontains some $pi$ and $alpha$ Greek and $sum$ as well. Don't forget that spaces inside dollar signs are ignored, while spaces o.LP .EQ sum from {pi = 0} to {pi =n} .EN .pl 1 #once #create Example .LP .EQ sum from pi = 0 to pi = n .EN .pl 1 # #once neqn Re $epsilon$ $nu$ to come to the aid of their party. .pl 1 #user #cmp Ref example #log #next 6.1c 10 eL6.1c #pf | nroff >X1 & #once neqn message Ref | nroff -T$term %s/tinyms - #user neqn Example | nroff >X2 #cmp X1 X2 #fail Don't forget . The "from" part is centered under the main piece; the "to" part is centered above it. As a warmup, modify "Example" so it proutside them are significant. .pl 1 #once #create Example .EQ delim $$ .EN .LP This line contains some pi and alpha Greek and sumf | nroff >X1 & #once neqn message Ref | nroff -T$term %s/tinyms - #user neqn Example | nroff >X2 #cmp X1 X2 #log #next 7.1c 10 rint One thing to keep in mind is that outside of $ signs, spaces are significant just as they were before. Inside $ signs, spato set delimiters before the .LP line, and get the spaces right around the dollar signs. #log #next 8.1a 10 L7.2b duces output that looks like the following, then type ready. .pl 1 #once #create Ref .EQ delim $$ .EN .LP Let $Q( pi )$ be $sum  as well. Don't forget that spaces inside dollar signs are ignored, while spaces outside them are significant. .pl 1 #once neqn7.2b 5 oL7.1cE 2#once #create message .ND .tr %$ .EQ delim $$ .EN .LP It is also quite permissible to leave ouces are significant only as delimiters, and will not add any space to the output. Furthermore, inside delimiters, new lines also#print Does the input sum from {i = -n} to {i = +n} produce the same output as the input sum from i=-n to i=+n Ansfrom {i= pi sub 1} to {i= pi sub 2} x sub i$. .pl 1 #once #create Example .EQ delim $$ .EN .LP .pl 1 # #once neqn Ref | nroff >X Ref | nroff >X1 & #once neqn message Ref | nroff -T$term %s/tinyms - #user neqn Example | nroff >X2 #cmp X1 X2 #log #next 6.1b t either the "from" part or the "to" part of a from-to construction. For example, modify "Example" so its output looks like thi don't matter, just as they didn't matter between the .EQ and .EN. Do the lines Let $alpha$ be the size of the vector $pi$. awer yes or no. #copyin #user #uncopyin #match yes #log #next 7.1c L7.2cE s#once #create message .ND .tr %$ .EQ1 & #once neqn message Ref | nroff -T$term %s/tinyms - #user neqn Example | nroff >X2 #cmp X1 X2 #log #next 7.1b 10 L7.1bL6.1b I#print There is one other thing you have to do before you can use a character as a delimiter - you havs, then type "ready". .pl 1 #once #create Ref .LP .EQ lim from {x-> pi /2} ( tan~x) sup {sin~2x}~=~1 .EN .pl 1 #once #create Exand Let $ alpha $ be the size of the vector $ pi $. produce the same output? Answer yes or no. #copyin #user #uncopyin #match y delim $$ .EN .LP Modify file "Example" so it looks like this, then type "ready". .pl 1 #once #create Ref .LP .EQ sum to N+n-m xE y#once #create message .ND .tr %$ .EQ delim $$ .EN .LP As you might expect from our previous discussions, any part e to tell neqn that you are going to. To do this, as the very first thing in your input you must put these three lines: .EQ delmple .LP .EQ lim from xxx ( tan~x) sup {sin~2x}~=~1 .EN .pl 1 # #once neqn Ref | nroff >X1 & #once neqn message Ref | nroff -T$tes #log #next 6.1d 10 L6.1d #print Do the inputs Let $x sub i$ and $y sub i$ be $>= z sub i$. and Let $x G0 ( ) *!+",#-$.%/ &0 ' sub mn > 0 .EN .pl 1 #once #create Example .LP .EQ xxx .EN .pl 1 #once neqn Ref | nroff >X1 & #once neqn message Ref | nroff -Tone to make the output .EQ {x sub i} bar .EN Find out (by putting braces in the right place if necessary) in the file "Example",d "thing" itself. For example, you can say .EQ 1 over sqrt {ax sup2 +bx+c} .EN to produce .EQ 1 over sqrt {ax sup 2 +bx+c}r no. #copyin #user #uncopyin #match no #log #next 10.1a 10 tinymsǰ .\" short set of macros to simulate behavii under makes $i under$. Except for "bar" and "under", these are almost always attached to just a single letter. If you want to$term %s/tinyms - #user neqn Example | nroff >X2 #cmp X1 X2 #log #next 7.1d 10 $L8.1aE b#once #create message  then type "ready" after you have successfully modified it. .pl 1 #once #create Ref .EQ delim $$ .EN .LP .EQ {x sub i} bar .EN . .EN Does the input .EQ e sup sqrt {pi x} .EN produce the same output as .EQ e sup {sqrt {pi x}} .EN Answer yeor of .\" most common -ms macros: .\" .PP, .LP, .EQ, .EN .\" .de PP .br .sp .ll 60n .fi .ti +5n .. .de LP .br .sp .ll 60n .fi  put a bar over something longer, like ${2 pi +1} bar$, simply enclose the thing in braces: {2 pi +1} bar Modify "Example" t.ND .LP The next neqn operation is called "sqrt" - it makes square root signs over things, like this: .EQ sqrt a+b .EN (They donpl 1 #once #create Example .EQ delim $$ .EN .LP .EQ x sub i bar .EN .pl 1 # #once neqn Ref | nroff >X1 & #once neqn message Ref s or no. .pl 1 # #once neqn message | nroff -T$term %s/tinyms - #copyin #user #uncopyin #match yes #log #next 9.1a 10 8.2b 5 NL8.. .de EQ .sp .ce .. .de EN .sp .. sInitQ if test x$term != x then true exit fi echo 'I need to know what o produce output that looks like this, then type "ready". .pl 1 #once #create Ref .EQ delim $$ .EN .LP Let $x bar$, $y bar$, and't look very good on a terminal, unfortunately.) This one is very easy - to print the line above, you say .EQ sqrt a+b | nroff -T$term %s/tinyms - #user neqn Example | nroff >X2 #cmp X1 X2 #log #next 10.1a 10 9.2b 5 L9.2aE #onc.2b #print Does the input .EQ e sup sqrt {pi x} .EN produce the same output as .EQ e sup sqrtkind of terminal you are using. I will put you out of learn. Type these two commands term=xxx (where xxx is one of 300, 300S, 4 $z bar$ be the components of $pi bar$. Let ${alpha +1} bar$ be the mean value of $alpha hat$. .pl 1 #once #create Example .EQ d.EN The "sqrt" operates on the first thing it finds so if you want something more complicated, like .EQ sqrt {pi +1} .EN you have #create message .ND .tr %$ .EQ delim $$ .EN .LP Modify "Example" to produce output that looks like this, then type "ready". .p pi x .EN Answer yes or no. #copyin #user #uncopyin #match no #log #next 9.1a 10 L9.1aE #once #create mess50, etc.) (with no spaces!) export term Then type "learn eqn" again.' false f.\" short set of macros to simulate behavielim $$ .EN .LP Let x bar, y bar, and z bar be the components of pi bar. Let alpha +1 bar be the mean value of alpha hat. .pl 1 e to use braces to enclose the entire thing. This one was printed with .EQ sqrt {pi +1} .EN And that's all there is tol 1 #once #create Ref .LP .EQ x bar ~=~ E(x) bar ~/~ E( x bar ) .EN .pl 1 #once #create Example .LP .EQ xxxx .EN .pl 1 # #once nage .ND .tr %$ .EQ delim $$ .EN .LP The next step is to learn about "diacriticals", which is a big word for funny marks on symbo# #once neqn Ref | nroff >X1 & #once neqn message Ref | nroff -T$term %s/tinyms - #user neqn Example | nroff >X2 #cmp X1 X2 #fai sqrt. Modify "Example" so it looks like this, then type "ready". .pl 1 #once #create Ref .LP .EQ f(x) ~=~ sqrt {ax sup 2 +bx+ceqn Ref | nroff >X1 & #once neqn message Ref | nroff -T$term %s/tinyms - #user neqn Example | nroff >X2 #cmp X1 X2 #log #next 9.ls, like a bar over something ($x bar$), or a tilde or hat on something ($x tilde ,~a hat$), or perhaps a dot or dotdot ($T dotl Don't forget to set delimiters at the beginning, and get the spaces right around the dollar signs. #log #next 9.1b 10 9.2a 5 d} .EN .pl 1 #once #create Example .LP .EQ f(x).... .EN .pl 1 # #once neqn Ref | nroff >X1 & #once neqn message Ref | nroff -T$te1b 10 L9.2b #print Which equation prints a longer bar? xyz sub i bar or x yz sub i bar Type "answe ,~U dotdot$), or even an underlining like $abc under$. These are all easy. Each funny character has a name, and all you have L9.1bE #once #create message .ND .tr %$ .EQ delim $$ .EN .LP You sometimes have to make explicit what you mearm %s/tinyms - #user neqn Example | nroff >X2 #cmp X1 X2 #log #next 8.1b 10 L8.1bE #once #create message .ND r N", where N is 1 if it's the first one, 2 if it's the second, and 0 if they are the same length. #copyin #user #uncopyin #matcto do is put the name after the thing you want the character on. Thus x hat makes $x hat$ y bar makes $y bar$ T dot makes n when you say "bar", by putting in braces to enclose the parts that you want the bar to be over. For example, what has to be d.LP Since "sqrt thing" is really a single object, you often don't need braces around it, although there may well be braces arounh 0 #log #next 10.1a 10 9.3b 5 nL9.3b #print Does ax bar produce the same output as a x bar Answer yes o$T dot$ x tilde makes $x tilde$ (notice that we spell tilde) u dotdot makes $u dotdot$ (looks ugly on a terminal) .br and H0 ( ) *!+",#-$.%/ &0 'I0 ( ) *!+",#-$.%/ &0 'J0 ( ) *!+",#-$.%/ &0 'K0 ( ) *!+",#-$.%/ &0 'L0 ( ) *!+",#-$.%/ &0 '