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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

not sure about the syntax here

Status
Not open for further replies.

unixwhoopie

Programmer
May 6, 2003
45
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
 
-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> |
+----------------------------+
 
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
 
you probably meant:

if [ `eval echo '${REP_FAILED_CNT}'${RUN_CNT}` -gt 0 ]

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top