4 ms·
I write most of my CLI tools in Rust. I don't care for learning "good bash" like many of these comments are suggesting is the solution. It is not the solution.
by conradludgate 5y ago
I write most of my CLI tools in Rust. I don't care for learning "good bash" like many of these comments are suggesting is the solution. It is not the solution.
You most likely work in a team of people. Expecting everyone to understand the nuances of bash and not get them wrong is wishful thinking.
Some people say that bash is portable, and maybe they're kinda right, but the commands you use like sed and awk might have different args supported. Have fun supporting Linux/mac (and Windows).
I use Rust because it most likely works if it compiles. The easiest way to right functions is usually the correct way to proper error handling etc. Also its what we use for our services anyway so people know it. The only issue is binary size, but that's not a huge issue, we either just ship them in docker images or just store them in github releases where we can download them in CI
- subsection1h 5y ago> I don't care for learning "good bash" What language do you use for administering your own systems and automating your own tasks? In my experience, people who oppose shell scripting spend little if any time administering their own systems (because they have basic requirements?). Your comment, which includes multiple references to your co-workers and zero references to your own systems or tasks, is an example of what I've observed.
- conradludgate 5y agoTrue, I'm not a sys-admin. But I do monitor a few k8s clusters. Most automated tasks I will write jobs for in Rust (as mentioned, it's a language I and others know well). That's what the rest our company tends to agree with. I don't know anyone in our tech stack that makes grand use of bash to admin our systems. We're very strict that everything is in K8s. No ssh access to nodes. Only really CI uses bash and I'd rather it didn't