News for hackers. Stuff that matters.
Re:Something about functions in Bash (2017) by kps on Thursday July 05, 2018 @09:19PM (#17468241)
> Is there a strong reason why all shells have this crazy syntax?

Stephen Bourne was a fan of Algol.

The source to the shell is… interesting. Via a bunch of preprocessor macros, the (C) code looks like:

        IF !letter(*cp)
        THEN    return(FALSE);
        ELSE    WHILE *++cp
                DO IF !alphanum(*cp)
                   THEN return(FALSE);
                   FI
                OD
        FI
        return(TRUE);
Re:Something about functions in Bash (2017) by fanf2 on Friday July 06, 2018 @07:47AM (#17470611)