I'm new to bash and unix for that matters. Just started yesterday, having to do a script for work, outputting HTML from various system info's. And me having coded Rexx for years ... then this is a little different
My question is simple .... I have an IF that does not work - > It seems to run the commmand instead.
I need to set a variable after a given percentage ...
Can you give me a hint.
regards
Mette
---------------------------------------------
while read inputline
do
filsyst="$(echo $inputline | awk '{print $2}')"
pct="$(echo $inputline | awk '{print $6}')"
if ["$pct" >= $DiskCritical]; then
BGC='FF0000'
else
if ["$pct" >= $DiskWarning]; then
BGC='EEDD11'
else
BGC='009900'
fi
fi
... bla bla HTML stuff
done < $limit
Where is the best place to learn the basic stuffs about scripting?
I dont do much work on the Unix/Linux machine in my daily work, but I have to develop some generic scripts for monitoring and sending status HTML stuff back to the customers.