代码搜索:L
找到约 10,000 项符合「L」的源代码
代码结果 10,000
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/6243336
2d l37.2d
#print
There is another file named "table" in this directory.
Find all numbers and surround them with "*" characters (that
is, "345" becomes "*345*". Then rewrite the file
and type "ready".
#create R
www.eeworm.com/read/101082/6243337
1b l50.1b
#print
You can use all the special characters in the
search commands. For example,
/^cat/p
prints the first line that BEGINS with 'cat'.
You can even leave out the 'p':
/^cat/
does the same thing.
www.eeworm.com/read/101082/6243339
3b l10.3b
#print
You can print an entire file making use
of the fact that "$" refers to the last line.
The command
1,$p
prints from the first line to the last one,
or the whole file. Try printing this
whole
www.eeworm.com/read/101082/6243341
2d l17.2d
#print
And, finally, what is the last line you type
to go to the shell from the editor? Again, respond
"answer X" where X is the command.
#copyin
#user
#uncopyin
#match q
#log
#next
18.1a 10
18.2a 5
www.eeworm.com/read/101082/6243343
2g l70.2g
#print
Here is a file "values". Whenever the word
"liter" appears in it, add at the end of that
line the characters
(1 liter = 1.06 quart)
The parentheses should appear in the final
file, and ther
www.eeworm.com/read/101082/6243344
2d l30.2d
#print
In this directory is a file named "airport"
whose second line says "xx" where it should say
"ne". Edit the file, change those letters, and
rewrite the file. Then type "ready".
#create Ref
idl
www.eeworm.com/read/101082/6243347
3f l15.3f
#print
Now make a file named "towns" that contains the lines
summit
chatham
westfield
cranford
madison
and print it out to check you did it right.
Then type "ready".
#create Ref
summit
chatham
westfie
www.eeworm.com/read/101082/6243348
2e l18.2e
#print
Just before the last line of file 'airlines'
in this directory insert the line
twa
and then rewrite the file with wq and
type "ready".
#create Ref
american
braniff
continental
delta
eastern
n
www.eeworm.com/read/101082/6243350
1b l52.1b
#print
Even more powerful is to use two context
searches for the pair of addresses
in front of a command. For example
/abc/,/def/p
will print all lines from the one that
contains "abc" to the one t