Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a shell script (script2.sh) to traverse the directory structure from current directory (recursively, that is, to traverse left-to-right depth-first manner) and (1) to print
Write a shell script (script2.sh) to traverse the directory structure from current directory (recursively, that is, to traverse left-to-right depth-first manner) and (1) to print the current path (with pwd command using system("pwd") call) and (2) to print any file/directory entries (with ls command, using system("ls") call). Your program should print the result of each pwd from current-directory path name, then to the path name of dir1, and then dir4 and so on.
Copy and paste your shell script
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started