May 12, 2003 #1 unixwhoopie Programmer Joined May 6, 2003 Messages 45 Location US Can some one tell what the -s and -a here do? if [ -s ${CHECK_FILE_REP_FAIL} -a ${REP_TOTAL_CNT} -ne ${REP_FAILED_CNT} ] Thanks
Can some one tell what the -s and -a here do? if [ -s ${CHECK_FILE_REP_FAIL} -a ${REP_TOTAL_CNT} -ne ${REP_FAILED_CNT} ] Thanks
May 12, 2003 #2 vgersh99 Programmer Joined Jul 27, 2000 Messages 2,146 Location US -s filename True if filename exists and has a size greater than zero. '-a' is a logical 'AND' 'logically' speaking (no pun intended): if [ (-s ${CHECK_FILE_REP_FAIL}) -a (${REP_TOTAL_CNT} -ne ${REP_FAILED_CNT}) ] vlad +----------------------------+ | #include<disclaimer.h> | +----------------------------+ Upvote 0 Downvote
-s filename True if filename exists and has a size greater than zero. '-a' is a logical 'AND' 'logically' speaking (no pun intended): if [ (-s ${CHECK_FILE_REP_FAIL}) -a (${REP_TOTAL_CNT} -ne ${REP_FAILED_CNT}) ] vlad +----------------------------+ | #include<disclaimer.h> | +----------------------------+
May 12, 2003 Thread starter #3 unixwhoopie Programmer Joined May 6, 2003 Messages 45 Location US I am in the process of transformation, so if you could help me with this it would be great. if [ `eval echo 'REP_FAILED_CNT'${RUN_CNT}` -gt 0 ] Thanks Upvote 0 Downvote
I am in the process of transformation, so if you could help me with this it would be great. if [ `eval echo 'REP_FAILED_CNT'${RUN_CNT}` -gt 0 ] Thanks
May 12, 2003 #4 vgersh99 Programmer Joined Jul 27, 2000 Messages 2,146 Location US you probably meant: if [ `eval echo '${REP_FAILED_CNT}'${RUN_CNT}` -gt 0 ] vlad +----------------------------+ | #include<disclaimer.h> | +----------------------------+ Upvote 0 Downvote
you probably meant: if [ `eval echo '${REP_FAILED_CNT}'${RUN_CNT}` -gt 0 ] vlad +----------------------------+ | #include<disclaimer.h> | +----------------------------+