Check whether a .zip exist or not
I am trying to check whether the file classes.zip is present or not using below line.
it seems its not able to check it. it says file does not exist, even though the file is present Code:
if [ ! -f ${cacheFloc}/classes.zip ] |
Code:
if [ ! -f ${cacheFloc}/classes.zip ] Code:
if [ ! -f ${cacheFloc}/classes.zip ] Example: Code:
FILENAME=classes.zip Code:
FILENAME=classes.zip |
Are you sure 'cacheFloc' has the correct value in it?
|
There's nothing wrong in that line but it depends in the context. As someone said you should check the contents of that var. Also, if you couldn't use -f I'd rather use 'stat' than 'ls'.
|
All times are GMT -5. The time now is 03:59 AM. |