代码搜索结果
找到约 10,000 项符合
L 的代码
l10.3a
#print
Often you want to refer to the last line
of the file. You don't have to know the number
of lines in the file to do that; there
is a special address, "$", that always
refers to the last line.
l17.2a
#print
You must always remember what the computer is expecting
from you: shell commands, editor commands, or input
text after an 'append'. Suppose you are
typing append text: what do you type to ge
l70.1a
#print
Perhaps the most powerful command in the editor is the 'g'
(global) command. This always precedes a second command
on the same command line; it selects those file lines
on which the second c
l66.1a
#print
The file "memo" contains several paragraphs,
where a paragraph starts at any line that begins with
a blank. It is desired to remove those blanks at the beginning
of lines, and instead mark the
l64.1a
#print
Another command similar to 'm' is 't';
the command
5,8t15
picks up lines 5 through 8 and makes a copy of them,
which it places after line 15. It differs from
'm' only in that the lines remai
l30.2a
#print
Changing a whole line with the 'c' command is a slow way
to work when you only want to change a few letters. The 's' (substitute)
command changes the letters within a line. For example, the c
l2.2a
#print
As an easier typing test, see if you can just get
the word "management" in correctly. Type it
in response to '%' and then type "ready".
#copyin
#user
#uncopyin
#match management
#log
#next
3.1
l6.1a
#print
You may well ask how the editor knows which line to print.
The editor keeps track of the 'current line', which
is usually the last line you touched in any way.
When you begin editing a file, fo
l9.1a
#print
Printing only one line at a time gets pretty
slow. You can 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 familiar fi
l38.1a
#print
Sometimes it is desirable to specify that
the characters to be changed are at the beginning
of the line. This uses the '^' character. For example,
s/^ab/xy/p
will change "ab" to "xy" ONLY i