Find the character break - sh script
-
What was the last thing you add or changed?
-
@black3dynamite At this point I don't recall.
-
The complaint is with the final line in the script, which simply searches for OSX updates, and installs them.
-
Paging @wirestyle22 since he commented on my last reply before this topic.
-
@DustinB3403 said in Find the character break - sh script:
The complaint is with the final line in the script, which simply searches for OSX updates, and installs them.
Don't you need to be root?
sudo softwareupdate -ia
-
@Pete-S While yes, this doesn't appear to be the issue.
I posted this same thing to my GH, here it is from 5 days ago.
Direct link https://raw.githubusercontent.com/Jarli01/OSX-Configuration/master/brew-setup.sh
-
So as is, the script bitches about the first blank line (2) with
unexpected end of file
and line (74) as well.: command not foundew/new.sh: line 2
/Volumes/NO NAME/Brew/new.sh: line 74: syntax error: unexpected end of file
-
Testing just the if statement works without issue.
-
This line with
open /usr/local/Caskroom/adobe-creative-cloud/latest/Creative Cloud Installer.app/
needs a quotes.open "/usr/local/Caskroom/adobe-creative-cloud/latest/Creative Cloud Installer.app/"
-
@black3dynamite doesn't fix it on my end.
-
@DustinB3403 said in Find the character break - sh script:
So as is, the script bitches about the first blank line (2) with
unexpected end of file
and line (74) as well.: command not foundew/new.sh: line 2
/Volumes/NO NAME/Brew/new.sh: line 74: syntax error: unexpected end of file
Oh, that's an easy one. Can't have space in the directory name. Need " around it or change space to _.
-
@pete-s except that isn't the issue, as I can run the individual command without any interference.
-
@DustinB3403 said in Find the character break - sh script:
@pete-s except that isn't the issue, as I can run the individual command without any interference.
Your output seems garbled but the first error is "command not found". If you get it on the second line then the first line is where the error is. Command not found is usually a problem with the directory or the path.
Try enable debugging on the bash script. http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_02_03.html
Makes it easier to see when and where the error/problem is.PS.I'm talking about softwareupdate where you get the error. It's bash script right?
-
@Pete-S yeah, the software update command has worked on 7 other systems.
-
Remove / at the end of dockutil lines. Is there any chance this script was written on Windows machine? Perhaps EOL needs converting from Windows CR LF to unix LF.
What happens if you change shebang to /bin/bash?
-
@marcinozga I was actually considering just rewritting the entire thing on a Apple computer for good measure.
I'll remove the / at the ends of the lines, but those were from autocomplete in apple terminal.
-
@DustinB3403 I'd try eliminating the problem line by line, or at least by sections. You also have admin user listed twice in kickstart line, fix that too.
-
@marcinozga that is to apply the user account that I want to have local admin rights
-
@DustinB3403 but why do you have admin there twice? It's a list of users, separated by comma, what you're doing is setting privileges for admin user, and then for admin user again. It doesn't make much sense.
-
Seems to be something with the if statement. Now I just need to figure out what since I haven't touched this part of the script at all. . .
Stupid Apple!