[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: syntax error while parsing a case command within `$(...)'
From: |
Andreas Kusalananda Kähäri |
Subject: |
Re: syntax error while parsing a case command within `$(...)' |
Date: |
Sat, 13 Feb 2021 22:27:53 +0100 |
On Sat, Feb 13, 2021 at 03:41:30PM -0500, Lawrence Velázquez wrote:
> > On Sat, Feb 13, 2021, 21:34 Alex fxmbsw7 Ratchev <fxmbsw7@gmail.com> wrote:
> >
> > you didnt end the case, wrong syntax
> > echo $( case x in y) printf 1 ;; x) printf 2 ;; esac )
>
> $ case x in x) esac
> $ echo $?
> 0
>
> > On Feb 13, 2021, at 3:36 PM, Alex fxmbsw7 Ratchev <fxmbsw7@gmail.com> wrote:
> >
> > you have to specify something for <here>) even when its just a * wildcard
>
> Oğuz did specify a pattern. It's the second 'x'.
>
> vq
.. but he never had to:
% bash -c 'case x in esac; echo $?'
0
--
Andreas (Kusalananda) Kähäri
SciLifeLab, NBIS, ICM
Uppsala University, Sweden
.
- syntax error while parsing a case command within `$(...)', Oğuz, 2021/02/13
- Re: syntax error while parsing a case command within `$(...)', Robert Elz, 2021/02/13
- Re: syntax error while parsing a case command within `$(...)', Robert Elz, 2021/02/14
- Re: syntax error while parsing a case command within `$(...)', Stephane Chazelas, 2021/02/14
- Re: syntax error while parsing a case command within `$(...)', Robert Elz, 2021/02/14
- Re: syntax error while parsing a case command within `$(...)', Oğuz, 2021/02/14