Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

. Write a program named check_directory.sh to examine a given directorys contents. run ./check_dir.sh path checks if each item in the path directory is a

. Write a program named check_directory.sh to examine a given directorys contents.

run ./check_dir.sh path

checks if each item in the path directory is a file or a directory.

outputs the number of files and number of directories in specified path directory.

2. Write a program named check_source_cp.sh to copy files. When run

Run ./check_source_cp.sh sourcefile targetfilename,

checks whether source file exists.

If source file exists, the copy sourcefile to targetfilename.

If source file does not exist, exit program with an error message Source file does not exist signed