Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a shell script program that contains a function calledfindFiles(). This function can list all files of a particular type in the current directory and

Write a shell script program that contains a function calledfindFiles(). This function can list all files of a particular type in the current directory and then copy them to a new director called MyFiles.The file type (such as shell script files with a appendix .sh ) will be passed as a parameter when the function is called. You program also needs a function call to thefindFiles() function to test it. For example:

findFilessh

Note: sh is the parameter to be passed intofindFiles(). Then the output of your program should be all shell script files with the appendix .sh and all of these files will be copied into a new directory calledMyFiles.

Hints: you can use built-inlinuxcommands in your shell scripts such as ls, mkdir...

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

Information Modeling And Relational Databases

Authors: Terry Halpin, Tony Morgan

2nd Edition

0123735688, 978-0123735683

More Books

Students also viewed these Databases questions