[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: syntax error while parsing a case command within `$(...)'
From: |
Oğuz |
Subject: |
Re: syntax error while parsing a case command within `$(...)' |
Date: |
Wed, 17 Feb 2021 19:42:50 +0300 |
17 Şubat 2021 Çarşamba tarihinde Koichi Murase <myoga.murase@gmail.com>
yazdı:
> 2021年2月17日(水) 1:52 Oğuz <oguzismailuysal@gmail.com>:
> > They resemble `[ ... ]' (I know it's a simple command, but still), maybe
> that's why. I think it'd seem more inconsistent to ordinary user if
> >
> > if [[ x ]] then [[ x ]] fi
> >
> > worked but
> >
> > if [ x ] then [ x ] fi
> >
> > didn't.
>
> ``Ordinary users'' may consider it being inconsistent, but what would
> you think of this?
I wouldn't mind. I always put a semicolon before `then' anyway.
>
> Actually, as you have written, [ ... ] is a simple command, so there
> are already many differences that ``ordinary users'' would think
> inconsistent. For example, the word splitting and pathname expansion
> rules are different. For another example, `tempenv=1 [[ -v tempenv ]]'
> is disallowed while `tempenv=1 [ -v tempenv ]' is allowed. and more...
> Letting [[ ... ]] behave differently from either of [ ... ] and ( ...
> ) means that we create the third category of command which
> grammatically behaves like neither the simple command nor the compound
> command.
Yes, this makes sense. You obviously put more thought into this than I did,
my earlier post was just the first thing I could think of that is against
what you suggested.
--
Oğuz
- Re: syntax error while parsing a case command within `$(...)', (continued)
- Re: syntax error while parsing a case command within `$(...)', Koichi Murase, 2021/02/16
- Re: syntax error while parsing a case command within `$(...)', Andreas Schwab, 2021/02/16
- Re: syntax error while parsing a case command within `$(...)', Koichi Murase, 2021/02/16
- Re: syntax error while parsing a case command within `$(...)', Oğuz, 2021/02/16
- Re: syntax error while parsing a case command within `$(...)', Koichi Murase, 2021/02/16
- Re: syntax error while parsing a case command within `$(...)', Oğuz, 2021/02/16
- Re: syntax error while parsing a case command within `$(...)', Koichi Murase, 2021/02/16
- Re: syntax error while parsing a case command within `$(...)', Koichi Murase, 2021/02/16
- Re: syntax error while parsing a case command within `$(...)', Oğuz, 2021/02/16
- Re: syntax error while parsing a case command within `$(...)', Koichi Murase, 2021/02/17
- Re: syntax error while parsing a case command within `$(...)',
Oğuz <=
- Re: syntax error while parsing a case command within `$(...)', Chris Elvidge, 2021/02/16
- Re: syntax error while parsing a case command within `$(...)', Koichi Murase, 2021/02/16
- Re: syntax error while parsing a case command within `$(...)', Robert Elz, 2021/02/17
- Re: syntax error while parsing a case command within `$(...)', Koichi Murase, 2021/02/17
- Re: syntax error while parsing a case command within `$(...)', Andreas Schwab, 2021/02/17
- Re: syntax error while parsing a case command within `$(...)', Robert Elz, 2021/02/17
- Re: syntax error while parsing a case command within `$(...)', Chet Ramey, 2021/02/17
- Re: syntax error while parsing a case command within `$(...)', Koichi Murase, 2021/02/17
- Re: syntax error while parsing a case command within `$(...)', Robert Elz, 2021/02/17
- Re: syntax error while parsing a case command within `$(...)', Koichi Murase, 2021/02/17