On Sat, 10 Dec 2011 16:59:48 +0000
Liam Proven <lproven at gmail.com> wrote:
What is so tough is the way that the shell expands
them, not the
command.
That's The Unix Paradigm:
Every part does only one thing.
It does this thing well, but nothing else.
In the DOS way of wildcard expansion every command has to do the work
of expansion itself. You can mitigate this by using a library, but
still, every command has to do the work again, over and over. Even
worse when the commans don't use a common library, wildcard expansion
may (subtly) differ from command to command. When you wane use some
other, more powerfull wildecard syntax you have to rebuild all commands.
On Unix the commands are liberated from the wildcard expansion duties.
It is put into one single place: The shell. Wildcard expansion is easy
to change - just change the shell. You can even use more powerfull
forms of "wildcard expansion" like "$(find . -name
'*.txt')"...
BTW: "REN *.log *.old" in /bin/ksh is just:
for a in *.log ; do mv $a ${a%.log}.old ; done
;-)
--
\end{Jochen}
\ref{http://www.unixag-kl.fh-kl.de/~jkunz/}