TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: MARTIN GREGORIE
from: ROBH
date: 2020-09-30 20:20:00
subject: Re: Error with ./install.

On 30/09/2020 18:48, Martin Gregorie wrote:
> On Wed, 30 Sep 2020 17:55:12 +0100, RobH wrote:
>
>> On 30/09/2020 16:14, Martin Gregorie wrote:
>>> read -n1 -s
>>
>> Running the read -nl -s in a terminal, just hangs, as it waiting for
>> some other command maybe
>
> NO! as I said, its asking for you to press any key. Read its manpage
>
> $ man read
>
> shows you the bash manual search down for the 'read' builtin command.
> This will tell you that:
>
> - 'read' defaults to reading from stdin, which is connected to the
>    terminal when you run it from the terminal)
>
> - that the -n option says how many characters it should read
>    (so -n1 will read one character)
>
> - that the -s option tells it not to echo its input
>
> In other words, you saw 'read' doing exactly what you asked: to wait for
> one keystroke and silently exit when you hit a key.
>
> Try running this script:
>
> ===========demo script starts on the next line ===================
> #! /bin/bash
> #
> echo "Hit any key to continue"
> read -n1 -s
> echo "Continuing..."
> ===========demo script ends on the previous line ===================
>
> save these 5 lines as a file called 'demo',
> make it executable ('chmod u+x demo')
> and run it. Now it may be clearer that 'read' is not your problem.
>
> You should also get used to using the 'man' and 'apropos' commands.
> 'man' describes how to use every command (and every function in the C
> standard library....) and 'apropos' searches for commands, functions, etc
> that match your search term, so the command 'apropos file' lists all the
> commands that work with files.
>
>

Thanks but as I posted lower down, I copied and pasted the 33 lines of
the script from where I got it from, github, and made a new file called
instal.sh.
Running this completed, but with an error:

Traceback (most recent call last):
   File "", line 1, in 
   File
"/home/rob/.local/lib/python2.7/site-packages/RPi/GPIO/__init__.py",
line 23, in 
     from RPi._GPIO import *
RuntimeError: This module can only be run on a Raspberry Pi!
./instal.sh: line 15: [: =: unary operator expected

I also posted this lower down.

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.