News for hackers. Stuff that matters.
Re:Hush, a modern shell scripting language by dahart on Tuesday April 26, 2022 @10:00AM (#31167570)
You’re comparing Python and Bash as programming languages, not as shells. Python’s great as a programming language, but it’s a terrible shell. Likewise, Bash is a terrible programming language, but as a shell is pretty good and is probably the most used shell. The point parent was making is that it’s far more difficult in Python to run a process, capture the output, and grep something from it, than it is in Bash. In Bash this is a one liner with extremely minimal syntax. In Python, this is a big multi-line affair invoking several modules and multiple functions. Python isn’t a shell purely because you can’t execute an executable file by typing the bare name of the file. Python also doesn’t pass the cut & paste test - you normally can’t paste snippets from somewhere into a Python repl due to indentation issues, this alone makes it very difficult to use as an interactive shell. And Python is not meant to be an interactive shell, so there isn’t much of a problem.
Re:Hush, a modern shell scripting language by sverhagen on Tuesday April 26, 2022 @04:26PM (#31172715)
Sure, but the conversation had already evolved to "scripting languages" as opposed to command lines.
Re:Hush, a modern shell scripting language by dahart on Tuesday April 26, 2022 @09:47PM (#31175324)
Where did that happen? The comment you replied to emphasized “system level stuff”. The comment before that emphasized “shells”.