[ILUG] Shell script
Jean Francois Bucas
jfbucas at stp.dias.ie
Wed Nov 16 17:44:20 GMT 2011
Bash expect to see something between the "else" and the "fi" -> you can
use the ":" for that, but it's just simpler to get rid of the "else"
altogether.
#!/bin/bash
updates=$( yum check-update )
if [ $? = 100 ]
then
echo -e "<img>/usr/share/icons/oxygen/32x32/emblems/emblem-new.png</img>"
echo -e "<tool>Updates Available</tool>"
echo -e "<click>gpk-update-viewer</click>"
else
:
fi
--
Jean-Francois Bucas
IT System Administrator
School of Theoretical Physics
Dublin Institute for Advanced Studies
10 Burlington Road
Dublin 4
Tel. +353 1 614 0132
More information about the ILUG
mailing list