Estoy actualizando un script que fue escrito por alguien anteriormente en mi puesto pero no compila debido al error anterior.
Es la primera vez que utilizo AppleScript, así que soy muy principiante. Originalmente había copiado y pegado el código, pero en caso de que las comillas y otros caracteres fueran "embellecidos" lo escribí yo mismo. Esto no solucionó el problema, que parece estar en las primeras líneas del script. Al acortar el script a las siguientes líneas sigo obteniendo el error.
#!/bin/sh
*Change computer name and local name to TechLoaner in case changed by user*
/usr/sbin/scutil --set ComputerName TechLoaner
/usr/sbin/scutil --set LocalHostName techloaner
echo Set machine name to TechLoaner
#cleanup local User’s home dir
rm -rf ~/Desktop/*
rm -rf ~/Documents/*
rm -rf ~/Downloads/*
rm -rf ~/Library/Caches/*
rm -rf ~/Library/Logs/*
rm -rf ~/Movies/*
rm -rf ~/Music/*
rm -rf ~/Pictures/*
rm -rf ~/Public/Drop\ Box/*
rm -rf ~/.Trash/*
echo Cleaned up local User’s home directory
#clean up global caches and temp data
rm -rf /Library/Caches/*
rm -rf /System/Library/Caches/*
rm -rf /Users/Shared/*
echo Cleaned up global caches and temp data
#log cleanup. We touch the log file after removing it since syslog
#won't create missing logs
rm /private/var/log/alf.log
touch /private/var/log/alf.log
rm /private/var/log/cups/access_log
touch /private/var/log/cups/access_log
rm /private/var/log/cups/error_log
touch /private/var/log/cups/error_log
rm /private/var/log/cups/page_log
touch /private/var/log/cups/page_log
rm /private/var/log/daily.out
rm /private/var/log/ftp.log*
touch /private/var/log/ftp.log
rm /private/var/log/lpr.log*
rm /private/var/log/mail.log*
touch /private/var/log/lpr.log
rm /private/var/log/mail.log*
touch /private/var/log/mail.log
rm /private/var/log/monthly.out
rm /private/var/log/run_radmind.log
rm /private/var/log/secure.log
touch /private/var/log/secure.log
rm /private/var/log/system.log*
touch /private/var/log/system.log
rm /private/var/log/weekly.out
rm /private/var/log/windowserver.log
touch /private/var/log/windowserver.log
echo Log file cleanup completed
echo Setting Chrome to Use the Standard MacOS Print Window now....
cp com.google.Chrome.plist ~/Library/Preferences/
defaults write com.google.Chrome DisablePrintPreview -bool true
echo Success!
lpstat -p | cut -d' ' -f2 | xargs -I{} lpadmin -x {}
echo Reset printing system completed
networksetup -removeallpreferredwirelessnetworks en0
echo Removed all WiFi SSIDs
rm -rf /Users/*/Library/Keychains
#sudo security -q delete-keychain /Library/Keychains/System.keychain
echo Cleaned WiFi keychain
echo Success!
echo Please quit this app and logout now...
exit