Question: UNIX #C SCRIPT USING VIM This script takes two arguments, a text file and a folder. It should report an error if the file does

UNIX #C SCRIPT USING VIM

This script takes two arguments, a text file and a folder.

It should report an error if the file does not exist, is not a regular file, or is not readable.

It should report an error if the folder does not exist, is not a folder, or is not readable.

The text file will have one filename per line.

The script should go through the filenames (remember a for-in loop can get its list of words from any source, such as a using a command substition to cat out a file), and print out names of files which are on the list but not in the folder. The command './checkfiles CF-list.txt DirTest' should print:

Checking folder DirTest against file list CF-list.txt

Missing files: c

Hint: loop through the names in the list and then test for file existence with -e.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!