Question
Try running 'phone4 xyz' and see what happens. Modify your program so that if no matching name is found, an appropriate message is displayed: Name
Try running 'phone4 xyz' and see what happens.
Modify your program so that if no matching name is found, an appropriate message is displayed: "Name 'xyz' not in directory".
You could use an 'if' statement to check the value of $? to see if the grep command was successful (remember, '0' indicates success).
If the grep is NOT successful, then echo the message (which includes the value of $name).Give it a try.
Make sure this works with both command line arguments and with a name read in from the user, and make sure you use the message
EXACTLY as shown.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get StartedRecommended Textbook for
Applying Communication Theory For Professional Life A Practical Introduction
Authors: Marianne Dainton, Elaine D. Zelley
4th Edition
150631547X, 978-1506315478
Students also viewed these Computer Network questions
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
View Answer in SolutionInn App