Hi
I have a problem using apt-get in my bash script.
Quote:
logFile='log.txt'
packageList='slapd'
for package in $packageList; do
echo -n "Installing $package : Please Wait "
if [ $(apt-get -y install "$package" | tee -a "$logFile") ]; then
echo '(Installed)'
else
echo "Error installing $package - view $logFile for details"
exit 1
fi
done
|
When I run this I get an error that says
" ./ubuntuSchoolServerInstaller.sh: line 63: [: too many arguments"
In my script line 63 is in bold above.