Re: is fedora really bleeding edge?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2012-03-05 at 23:26 +0100, Marko Vojinovic wrote:

> Umm, now I'm confused. While I do understand what you are trying to say, I see 
> that the outputs of "yum list selinux*" and "yum list selinux\*" are exactly 
> the same:

That is because, in THIS case, "selinux*" doesn't match any files in the
current directory. Create an empty file called "selinux1" and repeat the
two commands and you will see what I mean.

Bash is the first shell I have ever used that will pass on an unmatched
wildcard as a literal. Try the same thing with an older shell such as
csh, for instance:

$ csh
$ yum list selinux*
yum: No match.
$ yum list selinux\*

(Produces a verbose list of matching packages)

In bash, both of these produce the package list as you saw.

Whether this is good or bad is a religious war. A good part of the time,
the bash way saves you from having to explicitly escape wildcards that
you know will not match. 

Both shells will give likely unexpected results for the unescaped form
if the wildcard should happen to match something. 

Which is better is a religious war. A good part of the time, the bash
way saves you from having to explicitly escape wildcards that you know
will not match. Since I have been using bash for a few years now, I have
become lazy and started depending on this bash behavior. But the csh way
forces you to always escape wildcards that you mean to pass on as
literals, so the unexpected behavior when the wildcard matches something
is less likely to occur. Every once in a while I do get a wildcard that
matches unexpectedly and I go, what the hell? Until I realize what
happened.

--Greg


-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux