[gentoo-user] Re: Why bash script, that works in "Debian", does not work on "Gentoo" install CD?

2017-07-30 Thread Grant Edwards
On 2017-07-30, Rich Freeman wrote: > In my experience the people who are most likely to give you the most > helpful replies tend to also be the first people to hit mute on a > thread when the person asking for help seems determined to make this > as painful as possible.

[gentoo-user] Re: Why bash script, that works in "Debian", does not work on "Gentoo" install CD?

2017-07-30 Thread Ian Zimmerman
On 2017-07-30 16:03, Rich Freeman wrote: > In my experience the people who are most likely to give you the most > helpful replies tend to also be the first people to hit mute on a > thread when the person asking for help seems determined to make this > as painful as possible. This :-) --

Re: [gentoo-user] Re: Why bash script, that works in "Debian", does not work on "Gentoo" install CD?

2017-07-30 Thread Ста Деюс
Hi, Ian. On Sat, 29 Jul 2017 10:37:49 -0700, among other, you wrote: > > PROMPT='Enter device (like /dev/sd(a1,b1,...): ' > read -p $PROMPT device On "Debian" it does not work: Entera1 ./об: строка 6: read: «(like»: это недопустимый идентификатор > To the OP: How do you run the script? Are

[gentoo-user] Re: Why bash script, that works in "Debian", does not work on "Gentoo" install CD?

2017-07-29 Thread Ian Zimmerman
On 2017-07-29 20:07, Grant Edwards wrote: > > Correct. All my scripts run with IFS='' so for me it does work ;-) > > Ah, I hadn't thought about that. I might have to thy that. It makes > code cleaner-looking when you don't have to put all varible references > inside double-quotes. But, in

[gentoo-user] Re: Why bash script, that works in "Debian", does not work on "Gentoo" install CD?

2017-07-29 Thread Grant Edwards
On 2017-07-29, Ian Zimmerman wrote: > On 2017-07-29 18:48, Grant Edwards wrote: > >> > PROMPT='Enter device (like /dev/sd(a1,b1,...): ' >> > read -p $PROMPT device >> >> Nit: that doesn't work quite right either. It should be >> >> PROMPT='Enter device (like

[gentoo-user] Re: Why bash script, that works in "Debian", does not work on "Gentoo" install CD?

2017-07-29 Thread Ian Zimmerman
On 2017-07-29 18:48, Grant Edwards wrote: > > PROMPT='Enter device (like /dev/sd(a1,b1,...): ' > > read -p $PROMPT device > > Nit: that doesn't work quite right either. It should be > > PROMPT='Enter device (like /dev/sd(a1,b1,...): ' > read -p "$PROMPT" device > > or > > read -p 'Enter

[gentoo-user] Re: Why bash script, that works in "Debian", does not work on "Gentoo" install CD?

2017-07-29 Thread Grant Edwards
On 2017-07-29, Ian Zimmerman wrote: > On 2017-07-29 19:13, Vadim A. Misbakh-Soloviov wrote: > >> > read 'Enter device (like /dev/sd(a1,b1,...): ' device >> >> AFAIK, this is not valid syntax for `read` in any shell (even on >> Debian. I just checked) > > Indeed. That

[gentoo-user] Re: Why bash script, that works in "Debian", does not work on "Gentoo" install CD?

2017-07-29 Thread Ian Zimmerman
On 2017-07-29 19:13, Vadim A. Misbakh-Soloviov wrote: > > read 'Enter device (like /dev/sd(a1,b1,...): ' device > > AFAIK, this is not valid syntax for `read` in any shell (even on > Debian. I just checked) Indeed. That should probably be something like PROMPT='Enter device (like

Re: [gentoo-user] Re: Why bash script, that works in "Debian", does not work on "Gentoo" install CD?

2017-07-29 Thread Neil Bothwick
On Sat, 29 Jul 2017 16:31:34 +0700, Ста Деюс wrote: > > There was a bug in historic versions of bash, where it got confused > > if the POSIX syntax for command expansion, that is $( ) , occurred > > within a case statement. I don't know which version it was where it > > got fixed, but I think it

Re: [gentoo-user] Re: Why bash script, that works in "Debian", does not work on "Gentoo" install CD?

2017-07-29 Thread Ста Деюс
> There was a bug in historic versions of bash, where it got confused > if the POSIX syntax for command expansion, that is $( ) , occurred > within a case statement. I don't know which version it was where it > got fixed, but I think it wasn't before 4.*. So what versions of > bash do you have

[gentoo-user] Re: Why bash script, that works in "Debian", does not work on "Gentoo" install CD?

2017-07-28 Thread Ian Zimmerman
On 2017-07-28 22:31, Ста Деюс wrote: > Why bash script (the install script), that works in "Debian", does not > work on "Gentoo" install CD, giving me syntax errors (basically related > to '(', ')' and ''')? There was a bug in historic versions of bash, where it got confused if the POSIX syntax