Write a bash script called gendersh which takes one


Question

Single file word detection

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 /usr/local/linuxgym-data/census/femalenames.txt, and "male" otherwise.

Hint: Redirect grep's stdout so it doesn't get printed, or use the grep "quiet" option.

Question

Same frequency

Create a bash script called samefreq.sh which takes one argument - a name. The output should be the ALPHABETICALLY ORDERED list of all name's with the same frequency (popularity) as measured in the second column of the table:
/usr/local/linuxgym-data/census/femalenames.txt

For example

./samefreq.sh ANA

will return a list of two names (on separate lines) ANA and RENEE, both of which have frequency 0.120.

Solution Preview :

Prepared by a verified Expert
Macroeconomics: Write a bash script called gendersh which takes one
Reference No:- TGS01464916

Now Priced at $20 (50% Discount)

Recommended (94%)

Rated (4.6/5)