Question: Write a bash shell code (say crtdir.sh) such that it will create a directory tree which is given as first argument. If dir create is

Write a bash shell code (say crtdir.sh) such that it will create a directory tree which is given as first argument. If dir create is successful code will change to that directory and then print the full path of that directory. Please include error checking at all levels. Make sure that all error messages are generated by your script. If you execute the command $ sh crtdit.sh /home/abc/prg/python, code will create the directory tree /home/abc/prg/python and if creation is successful it will go into that directory and print the path else it will generate appropriate error message.

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!