link to content
Essentials at NC State Home
Help | ResNet | Computing@NC State | For OIT Staff | Publications | Search NC State | Feedback
your unity account
antivirus & security
email & messaging
connections & labs
your computer
software@nc state
files
web pages
education & training
publications
other resources
troubleshooting
ITD Sections

Searching a PICO File

If you're proofreading your file by looking at a printout of it, it can be tricky to find the specific line you want to revise. An easy way to get to the right line is to use PICO's search, or Whereis, command, which is ^w. This command lets you enter a string of characters to search for and then moves the cursor to the first occurrence of the string. PICO begins the search from the point in the file where the cursor is located. So, if the cursor is at the beginning of the second paragraph, for example, the search begins there.

To find a specific string of characters, press ctrl-w (for where is). A black strip with Search: will replace the two lines of commands at the bottom of the screen. You should then type the string you want to find. This search command is not case sensitive -- if you type Lamb at the search prompt, the system would find lamb. This search command is not limited to finding only whole words. For example, if you were to tell PICO to find th, it would find that, the and they.

Trying it out: searching your file

You can practice searching the text you entered in to mary_lamb.txt. Your file probably looks something like this:

Mary had a little lamb, its fleece was white as snow, and everywhere that Mary went the lamb was sure to go.

It followed her to school one week
to see what it could find,
it then learned French so well
it blew little Mary's mind.

Change "Mary" to "Fidel"

  1. Press ctrl-w to get the search prompt.
  2. At the prompt, type Mary and press [return].
  3. The cursor should move to the first "Mary".

  4. Move the cursor to the blank space after Mary and backspace over the word to delete it.
  5. Type "Fidel".
  6. Repeat the process to replace the other occurrences of the word Mary.


Go to the PICO tutorial main page.

 

Last modified July 20, 2004 by cawalker

jump to content
jump to content Go to page top Page Top | OIT | PolicyDisclaimer