l10.1b

来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 1B 代码 · 共 39 行

1B
39
字号
#printYou can of course combine the various sortsof line addresses we have been using.Suppose the last line is line 6; then $ isline 6, and $-1 is line 5.  Thus $-1 is thenext to last line, and   1,$-1pprints all but the last line of a file.  Again,I'll put you in the editor: print the last three linesof the file.  End with the usual w, q, and ready.#create Ref: Gil Hodges Yogi Berra Roy McMillan:"file" 6 lines, 89 characters#create fileNew York Mets Managers Casey Stengel Wes Westrum Gil Hodges Yogi Berra Roy McMillan#copyout#pipeex +'set prompt noopt open' file#user#unpipe#uncopyouttail -4 .ocopy >X1#cmp X1 Ref 4#failI hope you realized the addresses had to be  $-2,$pto get the last three lines.#log#next11.1a 1011.2a 5

⌨️ 快捷键说明

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