Hi all,
I am new to bash and live off of php and mysql
I have been searching for the answer and found this on this website as well as a few others.
Code:
FILENAME=/home/heiko/dummy/packages.txt
FILESIZE=$(stat -c%s "$FILENAME")
echo "Size of $FILENAME = $FILESIZE bytes."
Changed
FILENAME=/home/heiko/dummy/packages.txt
to
FILENAME=/z-heartbeat.php
and gets the error "file not found".
I have no idea what the path is but the files are in jffs
Anyway this is what I am looking for
Code:
echo ============== with quotes ===============
if [ "z-heartbeat.php -s" ]
then
echo heartbeat file is empty
else
echo heartbeat File is full
fi
if [ "z-chilli.php -s" ]
then
echo chilli file is empty
else
echo chilli File is full
fi
echo =============== with out quotes ==============
if [ z-heartbeat.php -s ]
then
echo heartbeat file is empty
else
echo heartbeat File is full
fi
if [ z-chilli.php -s ]
then
echo chilli file is empty
else
echo chilli File is full
fi
with quotes is always empty
without quotes is always full
everyting I read tells me this should sort out the empty files.
After 5-6 hrs with no joy prompted me to join this forum and ask directions.
Any suggestions to sort this out are greatly appreciated.
I can tell there will be more questions as this progresses.
TIA
Loren