PDA

View Full Version : File Size Comparison



Obi-Won-Knewbie
January 28th, 2010, 02:14 PM
I am new at scripting and need help developing a script that will look at a diff file sizehttp://kona.kontera.com/javascript/lib/imgs/grey_loader.gif
(http://www.computing.net/answers/programming/file-size-comparison-script/20724.html#) I've created from the original file and compare the size to the orignal and send a return code of 1 to the /etc/notify if the file is less than 6-% of its original size.


Basically:
If diff_file < 60% of original_file


then

send return code 1 to start paging.



else
send return code 0 to stop paging