4 ms·
There are many answers, but one situation is 1. you already have a bash script (e.g. in your CI) 2. you want to use an array or dict Bash arrays and d
by chubot 3y ago
There are many answers, but one situation is
1. you already have a bash script (e.g. in your CI)
2. you want to use an array or dict
Bash arrays and dicts have all sorts of warts. You have to remember to use "${array[@]}" (exactly like that - https://www.oilshell.org/blog/2016/11/06.html https://www.oilshell.org/blog/2016/11/06.html )
You can upgrade to YSH, and start using our Python/JS like arrays and dicts instead. And then you can write them to JSON and upload them somewhere.
---
Another situation is if you use ShellCheck, but you want even more strictness at RUNTIME, then you can do
shopt --set strict:all
Oils is very ambitious -- a complete overhaul of shell -- but that's a couple immediate things.
https://www.oilshell.org/blog/2021/01/why-a-new-shell.html https://www.oilshell.org/blog/2021/01/why-a-new-shell.html
- chubot 3y agoIdioms - https://www.oilshell.org/release/latest/doc/idioms.html https://www.oilshell.org/release/latest/doc/idioms.html