DispersedNet
SiteMap
Unix Concepts
Shell Programming
Shell Scripting
Unix Questions
vi editing
«Prev
Next»
Unix Concepts
File Management
List Files Command
Copy Directories Command
Removing Directories Quickly
Unix About Links
Creating File Link
Find Command Search
File Management Conclusion
Unix Customization
Creating Aliases Unix
list current Aliases
Displaying Previous Commands
Repeating Previous Commands
Modifying Previous Command
Changing System Prompt
Storing shell Settings
Customize-environment
Grep Regular Expression
Define Regex
Using Quotes with Regex
Matching Pattern Occurrences
Matching Pattern Position
Turnoff Character Meaning
Regex Conclusion
Pattern Matching - Quiz
editing with vi
vi Review
Text in vi
Creating Text
Creating Command Shortcuts
Configure Editing Environment
Storing Custom Settings
Esditing Multiple Files
Pasting Text Files
vi Editing Conclusion
Managing Disk Space
Checking Disk Usage
Compressing Uncompressing Files
Viewing Compressed Files
File Archives
Create Archive
Listing Archives
Extracting Archive Files
Managing Disk Space Conclusion
Searching Text in vi - Exercise
Searching for text in vi
Practicing forward and backward searches
Objective:
Use
/
and
?
to search for text.
Exercise scoring
You will receive2 points for this exercise.
Submitting your exercise
This exercise is auto-scored. When you have finished, just click the
Submit
button to receive full credit.
Background/overview
In this exercise, you will practice using vi's search commands.
Instructions
Log in to your course account.
Change to the practice directory, and use the vi editor to open the
phonelist
file.
Use the
/
command to search forward for the regular expression
2.
(2 followed by any single character).
Press
n
several times to repeat the search.
Use the ? command to search backward for the regular expression
3[0-5]
(3 followed by any digit 0 to 5).
Press
n
several times to repeat the search in the same direction. Because you previously used the
?
command, the search is repeated backward.
Press
N
several times to repeat the search in the opposite direction, or forward, in this case.
Quit vi, and log out when you are done.
Hints
Press Enter after the
/
or
?
commands.