bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Command substitution before while loop


From: Krystian Wojtas
Subject: Re: Command substitution before while loop
Date: Wed, 01 Apr 2020 18:22:47 +0000

I see. Thank you for your answers.


Best regards,
Krystian Wojtas

Sent with ProtonMail Secure Email.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
środa, kwiecień 1, 2020 8:20 PM, Chet Ramey <chet.ramey@case.edu> napisał(a):

> On 4/1/20 1:47 PM, Andreas Schwab wrote:
>
> > On Apr 01 2020, Krystian Wojtas via Bug reports for the GNU Bourne Again 
> > SHell wrote:
> >
> > >         Making comments in pipes using command substitution is very 
> > > helpful. But there is syntax error it it is done just before while loop. 
> > > Could it be considered as bug?
> > >
> >
> > Not a bug. Reserved words are only recognized at the start of a
> > command, before any expansions. For the same reason a compound command
> > cannot be preceded by redirections.
>
> Yes, and also please note that the historical `` form of command
> substitution isn't guaranteed to be able to parse arbitrary commands.
> Use $(...) for that.
>
> Chet
>
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> `The lyf so short, the craft so long to lerne.'' - Chaucer`Ars longa, vita 
> brevis'' - Hippocrates
> Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]