7 ms·
DOS got a lot of thing wrong about command line parsing, but pushing wildcard expansion to the applications themselves prevented this whole class of errors And
by unilynx 5y ago
DOS got a lot of thing wrong about command line parsing, but pushing wildcard expansion to the applications themselves prevented this whole class of errors
And even allowed things like 'RENAME *.txt *.bak'.. one of the most surprising things when starting to use Linux was that there was no simple way using the default utilities to accomplish the same thing...
- mkl 5y agoI think on balance that's one of the things DOS got wrong. I find the Unix way of doing arguments much nicer. Part of that is consistency: that rename command may be convenient, but it's pretty strange and counterintuitive that it treats the wildcard differently from most other commands, and the same convenience could have been achieved with another syntax.
- dredmorbius 5y agoThe DOS approach means that glob expansion must be consistently implemented by each and every utility and since that is impossible it is inconsistent across tools. Unix/Linux takes the view that the shell is responsible for interpreting parameter expansion, and that once expanded, those parameters are then handed off to the invoked command. Yes, there are edge-cases, but they are the same edge cases for each command. There's only one set of knowledge to internalise. (I began that internalisation some 35 years ago and am tremendously grateful that much of the knowledge has been cumulative rather than substituting for earlier methods. The areas I consistently have the greatest challenges are those in which behaviours or methods have changed (in cases multiple times) over the years and/or decades. Especially for tools which are seldom used. The bash shell isn't fully consistent, I'll grant. But it's also what I'm using much of the day, every day for interactions, and even its inconsistencies become hardwired over time.