5 ms·
> "And, purely subjectively, I think the .ps1 syntax is a lot more readable than the old .bat syntax." The Author does say "subjectively" but in my experience,
by SeanDav 11y ago
> "And, purely subjectively, I think the .ps1 syntax is a lot more readable than the old .bat syntax."
The Author does say "subjectively" but in my experience, both personally and with others, the reverse is true. Powershell can seem to be really cryptic.
- sz4kerto 11y agoBash can be _extremely_ cryptic as well, we just learned it over time. Look at awk :)
- agumonkey 11y agothen perl, then python, then bash.
- typon 11y agoWhy use bash when you can use Python with os and sys modules?
- TallGuyShort 11y agoI prefer Python when appropriate, but if you're going to "shell out" a lot and pipe a bunch of commands together it starts getting too verbose and loses it's elegance. I agree with other posters that bash is not intuitive, but if you've worked with it for a long time, there's nothing like being able to cat | grep | sed in a one-liner, rather than creating a bunch of Process objects, etc.
- typon 11y agoIf you're doing cat, grep, sed I'd say that bash is very intuitive and I use it for that purpose all the time. If you're writing bash scripts, with if structures and loops and everything, then just python.
- pritambaral 11y agoPerhaps an unpopular opinion, but I still prefer to stay in bash even when I need loops and conditionals. If I'm already writing in Python, then sure, Python it is. Or ruby, or js, or whatever I'm in. But when I'm in bash and I can do it easily enough in bash, why complicate?
- Retra 11y agoPython is great for writing scripts, but not so great for doing interactive maintenance.