代码搜索:L
找到约 10,000 项符合「L」的源代码
代码结果 10,000
www.eeworm.com/read/101082/6243278
2b l70.2b
#print
You can use any command with 'g', not just 'p'. For example
g/xx/s/a/b/
changes 'a' to 'b' on every line containing 'xx'. As an
example of the global command used with 'd', try this:
In file
www.eeworm.com/read/101082/6243279
2d l35.2d
#print
A useful operation is to replace a string of several blanks
by exactly one blank. Note that you can't just write
s/ */ /
because the " *" willl match any number of blanks
including zero. Th
www.eeworm.com/read/101082/6243280
2e l30.2e
#print
Now edit the file named "town" and change
the 'q' on the last line to a 'p'. Rewrite the
corrected file and type 'ready'.
#create Ref
south orange
maplewood
millburn
short hills
summit
new pro
www.eeworm.com/read/101082/6243281
1b l64.1b
#print
Another exercise in the effective use of the 't'
command: What command should be typed to make
a second copy of the current line?
Type "answer XX", where XX is the command.
#copyin
#user
#unco
www.eeworm.com/read/101082/6243282
2c l30.2c
#print
As with other commands, you can specify a line number
with the 's' command. Thus
3s/x/a/
will change the first 'x' on line 3 to an 'a'. Here is
a file "street" in which the fifth line has a
www.eeworm.com/read/101082/6243283
2b l42.2b
#print
Now pick up the file 'stuff', change all instances of "green"
everywhere to "red", and then rewrite the file and type "ready".
#create Ref
red light, village red
red book, red paper, red pencil
www.eeworm.com/read/101082/6243286
1b l16.1b
#print
So far you've only appended to empty files. If the file
you are appending to has something in it, you have to
decide where you want the new material to be placed.
You can give a line address w
www.eeworm.com/read/101082/6243287
1c l16.1c
#print
The current directory contains a file
named 'hand'. The third line is missing:
add the line
middle finger
after line 2 of this file.
Check what you're doing by printing the file
with
1,$p
www.eeworm.com/read/101082/6243288
2c l42.2c
#print
Remember the procedures with '*' for changing one or more
of something into one something. Pick up the file
"sloppy" and on every line, whereever there are several
blanks in a row change them
www.eeworm.com/read/101082/6243289
2c l33.2c
#print
Suppose the current line is
now is the time for all good men
and you type the substitute command
s/t[ijk]/xx/
what word is changed? Type "answer WORD" where
WORD is the word changed in the