News for hackers. Stuff that matters.
Re:Pure Sh Bible by bee_rider on Sunday April 30, 2023 @08:17PM (#35767783)
I enjoy using bash, and throw together little scripts now and then. It is convenient to be able to wrap up some bash commands and turn them into a script, when I realize I’ve been using them repeatedly.

But, every time I see examples of how to write sh scripts properly, it makes me wonder if this is just the wrong way to look at the world. Maybe it would be easier to extend Python down to make it better for command line use. Xonsh or something.

Re:Pure Sh Bible by rubatuga on Sunday April 30, 2023 @09:21PM (#35768164)
Ansible is like Python but for scripting (orchestration). They used a YAML format and with all the curly braces and quoting, made it just as bad as shell.
Re:Pure Sh Bible by wirthjason on Monday May 01, 2023 @08:05AM (#35771644)
What would make Python better for command line use? Better alternatives to argparse in the standard library?
Re:Pure Sh Bible by bee_rider on Monday May 01, 2023 @09:49AM (#35772739)
Sorry, I was sloppy. I meant using it as the system shell. So, processing arguments, I guess, would be less of a big deal.

Convenience features, like ls and other classic shell commands being run without parentheses would have to be handled… I’m not breaking any new ground here, actually this has gotten me to look into xonsh and it looks pretty decent.

Re:Pure Sh Bible by awaythrow98765 on Monday May 01, 2023 @05:33PM (#35779481)
Easier, lightweight syntax for shell-like pipes, command execution and catching stdin/stdout/stderr.

Something like Perl's IPC::Run.

Also, more shell-relevant stuff in the default distribution, so that one doesn't need to care about any modules (which is the primary reason for using bash or even sh, those are installed practically everywhere along with at least coreutils and stuff).

But the sister comment clarified it in another way, so this maybe irrelevant.