On Wed, 30 Sep 2020 14:02:23 +0100, RobH wrote:
> I had to do a reinstall of my linux system due to a faulty ssd, and have
> a problem with a install.sh script.The said script is included in with
> lcd files. which I downloaded from github.
>
> It is a simple script which runs a realtime clock on a pi zero with an
> lcd screen.
>
> When I run ./install.sh, it fails at ./install.sh: line 34: syntax
> error: unexpected end of file.
>
> I don't know what the syntax should be here;
>
> These are the last 4 lines in the script, and if I count the spaces
> then:
>
> echo "Should be now all finished. Please press any key to now reboot.
> After rebooting run"
> echo "'sudo python demo_lcd.py' from this directory"
> read -n1 -s <<<<<<<<<<<<<<<<<<<<< I think this is the line in question
> sudo reboot
>
> Thanks
I don't see anything wrong with the "read" command. The script is
displaying a message about rebooting and waiting for a keypress before it
does the reboot: waiting for a keypress is exactly what "read -n1 -s"
does. Try running it from a command line: it waits for a keypress and
then exits.
Its more likely that there's an unclosed delimiter somewhere in the
script - a line like
echo "some text
will cause the exact same error, but there are a LOT of similar errors
that can occur in scripts: ' without a closing single quote, [ without a
matching ] etc - its quite a common mistake. Similarly, if you supplied a
parameter containing some sort of open bracket and the script's author
didn't enclose that parameter in quotes, that would also cause a similar
error.
--
Martin | martin at
Gregorie | gregorie dot org
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|