On 2/16/21 12:29 AM, Oğuz wrote:
16 Şubat 2021 Salı tarihinde Koichi Murase <myoga.mur...@gmail.com <mailto:myoga.mur...@gmail.com>> yazdı:

    bash -c ': $(case x in esac)'
    bash -c ': $(case x in (x) if :; then echo a; fi esac)'
    bash -c ': $(case x in (x) a() { echo a; } esac)'
    bash -c ': $(case x in (x) for ((i=0;i<10;i++)) { echo a; } esac)'
    bash -c ': $(case x in (x) while false; do echo a; done esac)'
    bash -c ': $(case x in (x) case y in (y) echo a;; esac esac)'


I'm lost. Are these even supposed to work outside command substitution? Why?

The same principle that you articulated earlier: the last command-list
doesn't need to be delimited by a DSEMI as long as the esac is recognized
as a separate token, and then it goes on from there to the conditions
under which reserved words are recognized.

This is just academic. No sane person would write these without some kind
of delimiter.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/

Reply via email to