Ph1lj2 wrote:So after a lot more trying, my hang-up appears to with Sbcontrol script, when I execute the command I get back the following error message :-
/usr/local/bin/sbcontrol: line 53: syntax errot neat unexpected token 'then'
/usr/local/bin/sbcontrol: line 53: ' if [ $index = $active ]; then'
previous to that I run the sudo sbload with no issues
As far as I can see my code matches that above (I simply copied it - not typed)
Any help would be appreciated
Did you typo the error message above, or did it really say "errot neat" rather than "error near"?
Anyway, I just cut and pasted the script to a file (I used vim as my editor), and I get:
Code: Select all
richard@bugsy:~$ wc /tmp/sbcontrol
141 358 3211 /tmp/sbcontrol
richard@bugsy:~$ md5sum /tmp/sbcontrol
33eab45cdb423df0123f16dcbfa45d76 /tmp/sbcontrol
richard@bugsy:~$
'wc' shows the number of lines, words, and characters in my file, 'md5sum' shows a sort of checksum for the file content. Do you get the same wc and md5sum, output for your file? I don't have any blank lines at the end of my file btw, the last line is "done". I didn't try to run the script this time, but when it was first posted I copy and pasted it and it ran ok. If your md5sum is different and you can't figure out what is going on, you could run "od -x /usr/local/bin/sbcontrol" and sending me the output in a private message.