News for hackers. Stuff that matters.
Re:Bash code generator for command-line arguments by lysium on Friday October 02, 2020 @08:04AM (#24661741)
I've tried that path with little success. Usually, arg parsing makes me try some other language (perl, python) but other things got complicated there, mostly running other processes, capturing their exit status, pipe-ing their output etc.

In the end, it was easier to hammer onto bash. Also, there are great linters for bash scripts, so things work out.

Re:Bash code generator for command-line arguments by lou1306 on Friday October 02, 2020 @10:33AM (#24663006)
> but other things got complicated there, mostly running other processes, capturing their exit status, pipe-ing their output

Note that Python's subprocess module [0] has received many updates since v3.5, and now I find it relatively painless. Most of the times, subprocess.check_output() or subprocess.run() will do the trick.

[0]: https://docs.python.org/3/library/subprocess.html

Re:Bash code generator for command-line arguments by lysium on Sunday October 11, 2020 @08:11AM (#24745243)
Thx, I’ll check it out again!
Re:Bash code generator for command-line arguments by kortex on Friday October 02, 2020 @12:31PM (#24664284)
I've been in a similar boat, yet despite as my experience with it grows, bash just wears on me. Everything feels like a hack. Sure, piping is easy, but if statements are atrocious.

Starting to get into Xonsh. Still a learning curve, cause it's neither bash nor python, but it's really refreshing.

Re:Bash code generator for command-line arguments by IggleSniggle on Friday October 02, 2020 @10:00AM (#24662677)
tcl is designed for this situation
Re:Bash code generator for command-line arguments by lysium on Sunday October 11, 2020 @08:12AM (#24745253)
Thx, I’ll give it a shot!