0

Team,

Could you let me know what the below function does which is part of my actual script..
Yeah as per my understanding it checks whether the TAR file has been completed or not.. but what is the 1; does below is it end of line or something other..


CheckRetStat "Move of ${FileType} TAR File Completed" "Unable to Move ${TARFile} to ${TargetDIR}" 1;

Many Thanks
Whizkid

4
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by thekashyap
0

Whizkid: I think we might need more context... If I had to guess, "CheckRetStat" is probably a function, defined elsewhere in the script.

verdascofernan: I'm not sure what you mean, but it doesn't appear to be related to this thread, so you might have better luck starting a new thread :)

0

READ YOUR CODE !

CheckRetStat() {
RetStat=$?;
SuccessMsg=$1;
ErrorMsg=$2;
ExitIfErr=$3;

if [ $RetStat -ne 0 ]; then
LogThis "***** ERROR - $ErrorMsg";
# Exit Script if the ExitIfErr value is 1";
if [ $ExitIfErr -eq 1 ]; then
WriteAlert 14112;
exit $RetStat;
fi
else
LogThis "SUCCESS - $SuccessMsg";
fi

}
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.