afternoon all,
working on what i thought would be a simple script (well probably is for most of you). anyway, what i need to do is write the date to the file if it's 0 bytes do nothing if it's greater.
thougth the following would do it:
also tried using eq = 0 rather than ! -gt 1
any ideas?
regards,
longhair
working on what i thought would be a simple script (well probably is for most of you). anyway, what i need to do is write the date to the file if it's 0 bytes do nothing if it's greater.
thougth the following would do it:
Code:
if [ `wc -c </path/to/file/temp.txt` ! -gt 1]; then
cat date > /files/dsch820.txt
fi
any ideas?
regards,
longhair