Question: This problem uses basic commands, documentation, file redirection - i.e. the bash shell), a Unix editor, the Unix file system using Unix filters (including Awk)

This problem uses basic commands, documentation, file redirection - i.e. the bash shell), a Unix editor, the Unix file system using Unix filters (including Awk) to solve text processing problems. Your task is to recurse through a subtree of the filesystem and put a file called dir.xml in each directory. You will pull data from 2 sources: the directory itself, and a file that may appear in each directory called README . You will write a script (or, scripts) that will take an optional argument, the directory to process. If not argument is supplied, use the current directory. In each subdirectory (including the top-level directory on which the script was called) you will place a file called dir.xml . If it already exists, simply overwrite it. Do not include it as one of the files listed. The root element will be direntry. It may contain up to 3 child nodes: index, required, and other. These three elements will contain text elements, either of type file or dir. Index and required data will be harvested from README (use AWK to parse this file). Other files will be found by taking a listing of the directory, looking for files or directories that weren't listed in README.

Sample Directory:

index.html Files/ Labs/ README labs.html 1/ README file1.1 file1.2 file1.3 index.html other4 other5 2/ Data/ README a b c README file2.1 file2.2 index.html other1 other4 other5 3/ README file3.1 file3.2 file3.3 file3.4 index.html other4 Lectures/ README lecs.html 

Example:

 version="1.0" encoding="ISO-8859-1"?>   index.html   file2.1 file2.2      Data  other1  other4  other5  README    

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!