On Thu, Jan 04, 2018 at 03:34:40PM +0100, sky...@top-email.net wrote:
> Without the -n option, the read command is always terminated with a line break

Untrue.  Without -s, read simply echoes what the user types.  That
includes that newline (Enter) that normally terminates input (unless
overridden by -d or -n or -N).

E.g.:

wooledg:~$ read -s -p "Password: " password; echo "got it"
Password: got it
wooledg:~$ 

There's no "line break" after I enter the password, because the -s option
suppresses echoing back my input, which includes the Enter.  If I want
a newline there, it's my job as the script writer to print one.

Reply via email to