Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

please tell me what this statement returns ?

Status
Not open for further replies.

RajShekar

Programmer
May 27, 2004
14
0
0
US
Could somebody please explain this statement and what it returns?

rc=$(rsh -l admin server1 "ls ${ZW_MONTHLY_PATH}${SD_FILE}.sum 2>/dev/null")
 
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top