rc=$(rsh -l admin server1 "ls ${ZW_MONTHLY_PATH}${SD_FILE}.sum 2>/dev/null")
rc will contains the list of filenames (if any), in the home directory of user admin in machine server1, matching the pattern ${ZW_MONTHLY_PATH}${SD_FILE}.sum, where ZW_MONTHLY_PATH and SD_FILE are shell variables probably defined earlier in the script.
Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
Thanks a lot.
I want this statement to return a value 2 if any files are returned in ls command? I would really appreciate if you could help me with this question.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.