How to find the specified arg is dir or file? If it’s the local host we can use the test operation using –d or –f .Any efficient way to find the remote host’s file / files / dir ?
For example if I give abc:/home/user1/files , the script is able to know the given one is a file or directory and returns the code.
If not exists the args , return some error code or whatever.