#!/bin/bash 

array=('90', "23" "73" "11" "5" "31" "129" "678" "7" "5")
$size = "10"

$i = '1'
$val = '0'

function max (i,val)
{
    if [ $i -lt $size ];
    then
         if [ "${array[i]}" -gt ${array[i+1]} ];then
             val=${array[i]}
          else
            val=${array[i+1]}
          fi

          max(i+1,val)
    else
      return val
    fi
  
}



