Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Shell makes it unnecessarily hard to write robust shell scripts. I don't think filenames are to blame here.

I mean it's not an issue in Python for example.



It is an issue for Python, though this specific issue isn't the main issue for Python.

More generally, it's even harder to routinely call programs while connecting them with pipes and ensuring that the programs run in parallel. It's a pain to routinely call other programs and get results Python. It takes many many lines of Python to do tasks that are clearer one-liners in shell... and vice versa.

Python and shell are different; each are good at different things.


It's not an issue in Python. You would use https://docs.python.org/3/library/os.html#os.listdir in Python which returns a proper list of strings, not a string with in-band delimiters.

> Python and shell are different; each are good at different things.

I agree there. Shell is good for interactive use and throwaway scripts that you don't dare share with anyone.

Python is good for scripts that you want to actually work without supervision. (Though Python is just an example; I would recommend Deno if you are actually scripting stuff.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: