[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: coproc does not work with a lower case variable name
From: |
Dale R. Worley |
Subject: |
Re: coproc does not work with a lower case variable name |
Date: |
Sun, 14 Nov 2021 22:12:29 -0500 |
gd@as.lan writes:
> Description:
> coproc gives a syntax error if I try to use it with a lower case
> variable name and a compound command:
> bash: syntax error near unexpected token `}'
> bash: syntax error near unexpected token `('
>
> Repeat-By:
> coproc bc { bc; }
> coproc bc (bc)
What happens if give the coproc a name that is *not* a command you're
using?
I suspect that "bc" is an alias, and given that you can omit the NAME of
a coproc, bash is expanding the first use of "bc" as an alias, because
it might be the first word of a simple command.
Dale