Christopher Wright wrote: > With Powershell, you need to be familiar with the tools for dealing with > System.Data.DataTable or whatever. Maybe it would only take ten minutes. > The most time it could save in that regard is an hour.
The syntax for these commands is so simple, you don't even really need to learn them. It's stuff like "get-columns" and "sort-list". I don't think I ever ran across a powershell command where I couldn't accurately guess it's purpose. Most of the time, I even got the syntax first try without needing to check the help. What's more, it's the SAME set of tools for EVERY kind of object. If it helps, imagine if in UNIX you could treat any file as a folder of files containing the parsed contents (each of which may, themselves, be folders of files.) You wouldn't need sed or awk for parsing any more because the environment has already done it for you. > The cost of learning is not a significant factor here. You might have > plenty of other good arguments (and I offered some), but this isn't one > of them. It took me a year or more to become fluent and comfortable with scripting in UNIX. I don't think you CAN learn things like sed or grep straight away because you've got to learn the regex language first (and they're always bloody different in every different environment.) You then have to learn how the program works, and which options are actually useful. And then you need to practice with it. When I first started using sed, I had to constantly check the man page because I forgot which options I wanted to use. Same thing with grep (I only recently started remembering when I needed the -v switch, for example, and I've been using it for years!) Powershell's learning curve is practically non-existent. There are no domain-specific languages; just standard commands with regular, obvious names that all do one thing really well. Within about an hour of first seeing powershell in action, I felt comfortable writing simple scripts to munge data. An hour versus a year+ with UNIX; that's not something you can simply ignore. If you're happy with UNIX, then that's fine. But discounting the things powershell does well is just doing yourself a disservice. What really saddens me is that, assuming powershell is better, UNIX will never match it; at least not for a very long time. UNIX has so much history in its CLI, whereas Windows doesn't. Microsoft can afford to "reboot" the Windows CLI and start from scratch; UNIX can't. Then again, Microsoft could just flub the whole thing anyway. :P -- Daniel
