exercise9

Exercise 9. Change previous exercise that if user has not pass the arguments at runtime the message will be display that "please pass the argument at script runtime." 
Script: We use '$#' here which will store the passed number of arguments at runtime. So we store the number of passed arguments in variable 'a' then we check in if condition that the number of passed arguments are 0, if yes then we will display the message. Else if the arguments are passed then we process further to check that which file type it is.
Output1: Here arguments are not passed.
 Output2: Here arguments are passed in which file and directory are there.

No comments:

Post a Comment