★ wanayoo — archive 1999 http://www.networkcomputing.com/unixworld/tutorial/009/009.ans.part2.htmlNouvelle recherche | Portail wanayoo

       
NWC     Internet   Site Map
Click Here to Vist CMPNET
Getting StartedTechnology GuideDepartmentsresearch CenterSales & Marketing
FAQs Site Map Staff Article Index Current Issue



Answers to Exercises

Solution to ``EXPORT'' Problem

Typing:


1 ; ?EXPORT? delete

will do it. By starting from the first line in the file and searching backwards, you guarantee the the first line to be searched will be the last line of the file (due to wraparound), then the second-to-last line, etcetera. As soon as the editor finds a match it stops, so there cannot be another ``EXPORT'' lower down in the file.





































Solution to First-Line Problem

This requires two commands:


$ print
/EXPORT/ delete

The first command prints the last line in the file, which is not helpful in itself, but also leaves that last line as the current line. Then, the address of the second command causes a forward search and, due to wraparound, the search must begin with the file's first line.











































Solution to Noninclusive Problem

Just add a plus sign after the address before the comma, and a minus sign to the address after it, like this:


?abc? + , /xyz/ -

Each of these offsets moves one line toward the center of the text section the combined address specifies, so each has the effect of leaving out the line where the match was found. (That the first search was backward and the second forward is not relevant. The point is that the address before the comma, whatever it is, receives the plus offset, while the address after the comma gets the minus offset.)

Print This Page


e-mail Send as e-mail
Advertisement
Click Here to Vist CMPNET

Our latest chapter, from Prentice Hall's Managing Bandwidth, will define the scope of bandwidth management, discuss QOS models, present an argument for a managed bandwidth section, and more.
Remote-Access Servers Guide
Article
Guide
Full Chart
Customize Chart
Product Directory
Search
Obtain the most complete coverage of networking products. Network Computing's new Internet search gives you one-stop access to networking information on the web.
Tool
arrow IT Training
arrow Company Directory
arrow Reader Service
Books on Topic


Keyword Search:



Get NWC
Subscribe to Network Computing magazine and our Free weekly, E-Mail newsletter.


Spotlight
The Security Express Newsletter cuts through the security clamor and delivers practical security solutions.
Learn more about this unique service and/or sign up at...



UnixWorld | Network Design Manual | Interactive Buyer's Guide | WANsites | Real-World Labs | Learn IT | Careers | Article Index |

Home | Technology Guides | Site Map | FAQ | Subscriptions | Contacts | Sales & Marketing | 2000 Edit Calendar |

Network Computing

Click Here to Vist CMPNET

TechWeb is brought to you by CMP Media, Inc.