📄 l10.1b
字号:
#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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -