i have a problem i am working on and am completely new to bash commands. I writing a script to read another file and output the max and Min number in the script. I must use variables to output the max and min numbers. grades = file with numbers in them.
This is what i got so far. Thank You in advance
#! /bin/bash
hs=$(cat ./grades )
ls=$(cat ./grades )
test[1]=hs[0]
i=1
x=hs[@]
until [ i=x ]; do
test[2]=hs
if [test[2]>test[1]]
then
test[1]=test[2]
fi
i++
done
echo "Your highest quiz score is" $test[1]
echo "Your lowest quiz score is" $ls