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 20:07:55
Message-Id: olipu2$340$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 18:48, Grant Edwards wrote:
3 >
4 >> > PROMPT='Enter device (like /dev/sd(a1,b1,...): '
5 >> > read -p $PROMPT device
6 >>
7 >> Nit: that doesn't work quite right either. It should be
8 >>
9 >> PROMPT='Enter device (like /dev/sd(a1,b1,...): '
10 >> read -p "$PROMPT" device
11 >>
12 >> or
13 >>
14 >> read -p 'Enter device (like /dev/sd(a1,b1,...): ' device
15 >
16 > Correct. All my scripts run with IFS='' so for me it does work ;-)
17
18 Ah, I hadn't thought about that. I might have to thy that. It makes
19 code cleaner-looking when you don't have to put all varible references
20 inside double-quotes. But, in what ways is it going to trip me up
21 after all these decades of writing shell scripts the old way?
22
23 --
24 Grant Edwards grant.b.edwards Yow! Didn't I buy a 1951
25 at Packard from you last March
26 gmail.com in Cairo?

Replies

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