logoalt Hacker News

phailhaustoday at 1:39 AM2 repliesview on HN

Bash syntax is anything but simple or logical. Just look at the insane if-statement syntax. Or how the choice of quotes fundamentally changes behavior. Argument parsing, looping, the list goes on.


Replies

akdev1ltoday at 2:45 AM

if statements are pretty simple

if $command; then <thing> else <thing> fi

You may be complaining about the syntax for the test command specifically or bash’s [[ builtin

Also the choice of quotes changing behavior is a thing in:

1. JavaScript/typescript 2. Python 3. C/C++ 4. Rust

In some cases it’s the same difference, eg: string interpolation in JavaScript with backticks

show 1 reply
Towaway69today at 6:50 AM

Are taxes simple?

Why does Bash syntax have to be "simple"? For me, Bash syntax is simple.