Live data from Hacker News

How bad is the Windows command line really?

blog.nullspace.io

21–30 of 110 posts

Re: How bad is the Windows command line really?

#21
post #5

In computing, "batch" connotes long running processes in addition to "script"'s connotation of collapsing multiple commands into a single one. The seemingly redundant parsing by the Batch interpreter is a feature, not a bug. 1. The parser allows modifying a .bat file during its execution and having those changes execute without restarting the Batch interperter. [1] This is in keeping with the rationale for batch proc…

But bash was around in the 80's, too, right? And it didn't seem to need those features. How did bash users get around your claimed need for this?

Re: How bad is the Windows command line really?

#23
post #15

Agree about Windows command prompt being lame compared to bash, but I really find PowerShell amazing, even more so then bash. If you look at all the recent (even not so recent) products from MS, it is clear that PowerShell is the shell for Windows, and not batch. I didn't get the cure for polio analogy that's in the article but I really think anyone that's comparing shells should compare with PowerShell.

The worse thing about PowersHell is its syntax and OOP-ifying of everything, even if it doesn't really need to be. The naming and general syntax reminds me of this:

http://steve-yegge.blogspot.ca/2006/03/execution-in-kingdom-...

I don't deny that it is much more powerful than cmd, but it feels a lot like "emacs rather than vi" in its design, and I much prefer the latter (which would be more (ba)sh-like.)

Re: How bad is the Windows command line really?

#24
I usually write shellscripts in PHP. Works pretty good, and PHP is by far easier to write than either bash scripts or Windows shell script - not to mention that one single syntax can be used for both OSes, which is nice when you do development on both Linux and Windows, and even nicer when you're also developing on OS X which ships a horribly outdated bash (and other coretools).

Re: How bad is the Windows command line really?

#25
post #21
post #5

In computing, "batch" connotes long running processes in addition to "script"'s connotation of collapsing multiple commands into a single one. The seemingly redundant parsing by the Batch interpreter is a feature, not a bug. 1. The parser allows modifying a .bat file during its execution and having those changes execute without restarting the Batch interperter. [1] This is in keeping with the rationale for batch proc…

But bash was around in the 80's, too, right? And it didn't seem to need those features. How did bash users get around your claimed need for this?

fork/exec is built in to bash, i.e. Unix.

Batch was restricted by DOS, I wish I had never learned it, but it did come in handy for launching games.

Re: How bad is the Windows command line really?

#26
post #9

There are, of course, choices beyond Bash, Batch and PowerShell. I'm a Microsoft fanboy and I find Python far more structured and faster than any of the above for anything beyond the most simple shell scripts. (If only the inventor of PowerShell had spent ten minutes outside the Microsoft ecosystem before locking himself in a seafoam green office for two years...) Doesn't solve the IT admin scenarios PowerShell is go…

Python seems to have its quirks, too (somewhat inconsistent ways of wrapping OS errors into exceptions, for example), but for structuring complex pieces of logic into files, funcs and classes, it's almost perfect.

Re: How bad is the Windows command line really?

#27
post #21
post #5

In computing, "batch" connotes long running processes in addition to "script"'s connotation of collapsing multiple commands into a single one. The seemingly redundant parsing by the Batch interpreter is a feature, not a bug. 1. The parser allows modifying a .bat file during its execution and having those changes execute without restarting the Batch interperter. [1] This is in keeping with the rationale for batch proc…

But bash was around in the 80's, too, right? And it didn't seem to need those features. How did bash users get around your claimed need for this?

Bash first came out in 1989, but the typical shell of the time was sh, and it ran on Unix systems with more memory, storage, and CPU power than the typical PC. Thus it's no surprise that the sh family started with more features, while COMMAND which cmd evolved from was extremely minimalistic. DOS 1.0's COMMAND.COM was just slightly more than 3 kilobytes and didn't have conditional nor goto statements:

http://www.os2museum.com/wp/dos/dos-1-0-and-1-1/dos-1-0-dir/

http://www.os2museum.com/wp/dos/dos-1-0-and-1-1/

Re: How bad is the Windows command line really?

#28

This isn't completely related to Windows command line but I thought I would post it out here. I was trying to run a Bash script from a Git repo mounted in a Docker container. When running the Bash script, I kept getting all kinds of errors. I ran the exact same script in the same Docker container on a different Linux computer that had cloned the repo. It turns out the \r Windows line endings (which I later normalized…

You can also normalize them using the dos2unix package, which is available on most distros.

Have the line ending wars ended yet? Apple is finally Unix \n, but most internet protocols are \r\n as are Windows.

Though honestly, Windows just doesn't even matter any more to me, I haven't needed to touch an MS product in years...

Re: How bad is the Windows command line really?

#30
post #21
post #5

In computing, "batch" connotes long running processes in addition to "script"'s connotation of collapsing multiple commands into a single one. The seemingly redundant parsing by the Batch interpreter is a feature, not a bug. 1. The parser allows modifying a .bat file during its execution and having those changes execute without restarting the Batch interperter. [1] This is in keeping with the rationale for batch proc…

But bash was around in the 80's, too, right? And it didn't seem to need those features. How did bash users get around your claimed need for this?

bash came out in 1989. The Bourne shell it's backwards compatible with is from 1977. But both were designed to run on Unix on multi-user multi-process machines. DOS batch language was designed to run on a single-user single-process machine. There's a reason they used to make a distinction between "minicomputers" and "microcomputers".
Post reply on HN