[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: syntax error while parsing a case command within `$(...)'
From: |
Alex fxmbsw7 Ratchev |
Subject: |
Re: syntax error while parsing a case command within `$(...)' |
Date: |
Sat, 13 Feb 2021 21:34:49 +0100 |
you didnt end the case, wrong syntax
echo $( case x in y) printf 1 ;; x) printf 2 ;; esac )
On Sat, Feb 13, 2021, 21:21 Oğuz <oguzismailuysal@gmail.com> wrote:
> $ bash -c ': $(case x in x) esac)'
> bash: -c: line 1: unexpected EOF while looking for matching `)'
> bash: -c: line 2: syntax error: unexpected end of file
>
> `case x in x) esac' is a complete case command, a syntax error is
> unexpected here.
>
>
> --
> Oğuz
>