exercise8

Exercise 8. Just modify the previous script, but rather than asking file_name to the user, user should pass the file name as runtime argument. And the number of arguments can be unlimited (not fixed).
Script: We used a variable 'a' to store the passed arguments at runtime  which are present in '$@'. So all the arguments will get store in 'a' and then we use a for loop and then check that the entered is a file or directory.
 Output: We passed 2 arguments one is regular file and other is directory. So we will get the output accordingly.
 
 
 
 
 

No comments:

Post a Comment