[ILUG] Shell script

Francis Daly francisdaly at gmail.com
Wed Nov 16 17:37:49 GMT 2011


On 16/11/2011, Frank Murphy <frankly3d at gmail.com> wrote:

Hi there,

> 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

> Syntax error line 12 "fi"

man bash:

if list; then list; [ elif list; then list; ] ... [ else list; ] fi

If you don't want an "else" list, omit "else" altogether.

  f


More information about the ILUG mailing list