Question: Write a bash script called gender.sh which takes one argument - a name. The script should print female if the word appears in the file
Write a bash script called gender.sh which takes one argument a name.
The script should print "female" if the word appears in the file courselinuxgymcensusfemalenamestxt and "male" otherwise.
Hint: redirect grep's stdout so it doesn't get printed, or use the grep "quiet" option. Check the exit status of grep with $
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
