Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question I: Write a bash shell script, called myFind, that will display the total number of files in a given directory, whose names start with

image text in transcribed

Question I: Write a bash shell script, called myFind, that will display the total number of files in a given directory, whose names start with a certain character and consist of a given number of characters (length). All these three parame- ters, the name of the directory, the first character and the length are given as command line arguments at the shell prompt. Synopsis: myFind Hint: Use for loop, cut command and $(#name} for length of a variable Question II: Write a Bash script to compress a list of files with some given extensions. The compression could be done with any Unix compress utilities, such as gzip, bzip2, etc. Synopsis: myCompress ., E.g. myCompress doc jpg txt Hint: use for loop with with $* Question III: Write a bash script, called phone, that works as a simple phone directory. The script will output the full name and phone number of each matched record. phone where string is a name(first name or last name) and fileName is the phone database. A sample phone data file for example, phoneData.txt, is shown below. Each record in the file is made of a phone number and a person's name. This file could be used to test your script. Tom john (206) 123-4567 Sam Smith (519) 999-1234 Tina Wu (514) 999-8765 Jerry Seinfield Imran Haque (406) 984-6789 (519) 254-8796 Sandy Anderson (406) 657-8799 Tina Hilton (416) 944-4675 Satish Sharma (519) 544-5678 BigFoot ShortTail (999) 000-1111 Hint: use grep with filename A sample run is shown below. 8 phone Usage: phone * phone sam phoneData.txt Sam Smith (519) 999-1234 * phone Tina phoneData.txt Tina Wu (514) 999-8765 Tina Hilton (416) 944-4675

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application Development And Administration

Authors: Michael V. Mannino

3rd Edition

0071107010, 978-0071107013

More Books

Students also viewed these Databases questions

Question

10. Describe the relationship between communication and power.

Answered: 1 week ago