Bash Script

Tony Arnold tony.arnold at manchester.ac.uk
Mon Oct 23 11:02:41 UTC 2006


OOzy,

On Mon, 2006-10-23 at 13:41 +0300, OOzy Pal wrote:

>    if [$MaxIndex -lt $Num]; then

You need a space after the [ and before the ] for this to work, thus:

   if [ $MaxIndex -lt $Num ]; then

Or you could use the test command:

   if test $MaxIndex -lt $Num ; then

Regards,
Tony.
-- 
Tony Arnold, IT Security Coordinator, University of Manchester,
IT Services Division, Kilburn Building, Oxford Road, Manchester M13 9PL.
T: +44 (0)161 275 6093, F: +44 (0)870 136 1004, M: +44 (0)773 330 0039
E: tony.arnold at manchester.ac.uk, H: http://www.man.ac.uk/Tony.Arnold





More information about the ubuntu-users mailing list