Searching the File

Qedit 5.7 for HP-UX

Home Previous Next


Searching the File

So far, you typed line numbers to specify which lines you wanted to see. There is another way to list lines, and that is to specify an identifying string. Put anything in quotes and it's a string. Qedit lists all the lines that contain that exact same "anything".

/list "your"
  5    Please check your in-baskets daily and
  6    respond to your fan mail within a week.
2 lines found

There are two occurrences of "your" in the file, one on line 5 and one on line 6.

Strings can help you find a particular place in the file quickly.

With the commands Find and Findup, you can go to the next consecutive location of a string. Find searches the file from your current location to the end. Findup searches backwards from where you are to the beginning. So in order to search a file for a date scattered throughout it, type:

/find "January 18"       {search forward from current line}

Or, search back through the file with

/findup "January 18"

Qedit displays the next line containing "January 18". To search again for the same string, just type Find (or Findup). You can abbreviate "Find" to "F" and "Findup" to "^".

/f

To search for a different string, just type F "new string".


Home Previous Next