D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Checking size of file and running command depending on size

 

On Wednesday 19 September 2007 16:50:00 Rob Beard wrote:
> if [ $size < 15000 ]

That only works for integer comparison  within double parentheses
if (($size < 15000))

In brackets it should be:
if [ $size -lt 15000 ]

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html