(Solved) : Question Write Bash Shell Script Called Myfind Display Total Number Files Given Directory Q44069356 . . .

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 <targetDir> <startChar> <length> 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 <extl> <ext2>., 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 <“string” >< fileName > 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 <string> <fileName> * phone sam phoneData.txt Sam Smith (519) 999-1234 * phone Tina phoneData.txt Tina Wu (514) 999-8765 Tina Hilton (416) 944-4675 Show transcribed image text 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
Expert Answer
Answer to Question I: Write a bash shell script, called myFind, that will display the total number of files in a given directory, …
OR