diff options
author | Ian Darwin <ian@cvs.openbsd.org> | 1998-09-28 16:01:46 +0000 |
---|---|---|
committer | Ian Darwin <ian@cvs.openbsd.org> | 1998-09-28 16:01:46 +0000 |
commit | 8d70bdbdf6fd88bf88b9a384cfaafb6668c804ec (patch) | |
tree | 034fd6a68d5b6928d6fe4e51de71c9868bb460b1 /usr.bin/learn/lib/editor/L70.1a | |
parent | e9be7faad5fbf61edcad3700142615e315e407bc (diff) |
import BTL learn(1) lessons/editor
Diffstat (limited to 'usr.bin/learn/lib/editor/L70.1a')
-rw-r--r-- | usr.bin/learn/lib/editor/L70.1a | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/usr.bin/learn/lib/editor/L70.1a b/usr.bin/learn/lib/editor/L70.1a new file mode 100644 index 00000000000..01049894b87 --- /dev/null +++ b/usr.bin/learn/lib/editor/L70.1a @@ -0,0 +1,49 @@ +#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 command is to be executed. +For example + g/abc/s/def/ghi/p +says: "Find all lines in the file which +contain the string "abc"; change the first +"def" on any such line into "ghi". The command +after the 'g' may be any command, of course. +Needless to say, the expressions after the 'g' may +include all the special characters. +Edit the file "towns" so that each line beginning +with "-" has " (county seat)" added at its end. +Rewrite the file and type "ready". +#create Ref +-newark (county seat) + east orange + south orange + maplewood +-elizabeth (county seat) + linden + cranford + westfield +-morristown (county seat) + madison + chatham + dover +#create towns +-newark + east orange + south orange + maplewood +-elizabeth + linden + cranford + westfield +-morristown + madison + chatham + dover +#user +#cmp towns Ref +#log +#next +71.1a 10 +70.2e 9 +70.2d 6 |