Gentoo Archives: gentoo-user

From: Grant Edwards <grant.b.edwards@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: Why bash script, that works in "Debian", does not work on "Gentoo" install CD?
Date: Sat, 29 Jul 2017 18:48:57
Message-Id: olila4$soi$1@blaine.gmane.org
In Reply to: [gentoo-user] Re: Why bash script, that works in "Debian", does not work on "Gentoo" install CD? by Ian Zimmerman
1 On 2017-07-29, Ian Zimmerman <itz@××××××××××××.org> wrote:
2 > On 2017-07-29 19:13, Vadim A. Misbakh-Soloviov wrote:
3 >
4 >> > read 'Enter device (like /dev/sd(a1,b1,...): ' device
5 >>
6 >> AFAIK, this is not valid syntax for `read` in any shell (even on
7 >> Debian. I just checked)
8 >
9 > Indeed. That should probably be something like
10 >
11 > PROMPT='Enter device (like /dev/sd(a1,b1,...): '
12 > read -p $PROMPT device
13
14 Nit: that doesn't work quite right either. It should be
15
16 PROMPT='Enter device (like /dev/sd(a1,b1,...): '
17 read -p "$PROMPT" device
18
19 or
20
21 read -p 'Enter device (like /dev/sd(a1,b1,...): ' device
22
23 --
24 Grant

Replies

Subject Author
[gentoo-user] Re: Why bash script, that works in "Debian", does not work on "Gentoo" install CD? Ian Zimmerman <itz@××××××××××××.org>