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,
ITYM "read -n1 -s"
(note that the character following the -n is a "digit one" (1) not a
"lowercase letter L" (l) )
> just hangs, as it waiting for some other command maybe
No, it's waiting for your input.
It's the equivalent to "Hit any key to continue", albeit a bit sparse
(The author could have written
read -n1 -s -p "Hit any key to continue"
)
For the "read" builtin, "One line is read from the standard input".
The -n1 causes "read" to return after reading 1 character
The -s causes "read" to not echo the consumed character back to the
terminal.
--
Lew Pitcher
"In Skills, We Trust"
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|