代码搜索:Command
找到约 10,000 项符合「Command」的源代码
代码结果 10,000
www.eeworm.com/read/101082/6243189
1a l3.1a
#print
The editor accepts commands one per line,
just like the other programs in UNIX; but its
commands are unique to it.
Like the normal command interpreter,
the editor has a prompt sign to let you k
www.eeworm.com/read/101082/6243215
1b l32.1b
#print
Note that the substitute command changes the first
instance of something that matches. Consider the
line
now is the time for all good men
and the substitute command
s/tim/TIM/
applied to
www.eeworm.com/read/101082/6243230
2c l18.2c
#print
Again, remembering that "5i" is the same as "4a"
what command is the same as
.-1a
to the editor? Respond "answer XX" where XX is that
command.
#copyin
#user
#uncopyin
#match i
#match .i
#log
www.eeworm.com/read/101082/6243231
2a l14.2a
#print
You can also use the "=" command to find out what
the 'current' line is. Since the current line
is named '.', the appropriate command is
.=
and so if you say
3p
.=
the second command
www.eeworm.com/read/101082/6243263
2c l15.2c
#print
Note that every set of lines to be appended ends
with the character '.' alone on a line. This is essential
to get back to editor command level. Whenever you have
been appending, and you later
www.eeworm.com/read/101082/6243297
3b l18.3b
#print
Remembering that 'i' inserts one line before
the 'a' command, so that after
3a
the first input line is number 4 while after
3i
the first input line is number 3, what command
using 'i' is t
www.eeworm.com/read/101082/6243311
1a l14.1a
#print
You can also use the "=" command to find out what
the 'current' line is. Since the
current line is referred to as '.', do you see that
.=
is the appropriate command to print the current line
www.eeworm.com/read/101082/6243330
2c l16.2c
#print
You can see that the 'a' command adds lines after the
line addressed. So 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
www.eeworm.com/read/101082/6243342
1a l45.1a
#print
There is one last class of substitutions that
you should know about: converting one line
into two or more by substituting a newline
into the middle. Suppose you want to split the line
Now
www.eeworm.com/read/101082/6243364
01b l20.01b
#print
The undo command actually "undoes" the effects of the
last command that changed something.
So, though it is often used to recover deleted lines,
it can also be used to remove lines you just app