On 10 December 2011 18:51, Jochen Kunz <jkunz at unixag-kl.fh-kl.de> wrote:
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')"...
Yes, I understand this. I understand the arguments for it, too. But
*for me* it actually results in a less-usable tool that does not do
what I want, although it can do all manner of wonderful things that I
don't want.
BTW: "REN *.log *.old" in /bin/ksh is just:
for a in *.log ; do mv $a ${a%.log}.old ; done
;-)
O_o
I think writing a small program to do what would take a single command
on almost any other CLI OS I have ever used illustrates my point
rather well...!
--
Liam Proven ? Info & profile:
http://www.google.com/profiles/lproven
Email: lproven at cix.co.uk ? GMail/GoogleTalk/Orkut: lproven at
gmail.com
Tel: +44 20-8685-0498 ? Cell: +44 7939-087884 ? Fax: + 44 870-9151419
AIM/Yahoo/Skype: liamproven ? MSN: lproven at
hotmail.com ? ICQ: 73187508