I have a script I've written that works on my machine but when ran on a friend of mine's system tosses an error about one of my if statements. Here's the code I'm using
if [ -e /usr/bin/apt-show-versions ]
then touch ~/SysReport/versions.txt
chmod 777 ~/SysReport/versions.txt
apt-show-versions > ~/SysReport/versions.txt
echo " Sorting version list"
sort ~/SysReport/versions.txt >> ~/SysReport/software.html;
else echo "apt-show-versions not found, follow directions above to get this output" >> ~/SysReport/software.html;
Here is the error message it generates
adminmandi@Ub-desktop:~/Desktop$ sh SystemReport.sh
Creating SysReport Folder
SystemReport.sh: 686: Syntax error: "else" unexpected (expecting "fi")
Should I be using semi-colons after all statements in the then portion of the if?
Thanks for any help you can be.
Later, Ray Parrish[/code]