Re: Locate with exclude?

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

 



Steven W. Orr wrote:
> On Monday, Feb 19th 2007 at 13:37 -0600, quoth Mikkel L. Ellertson:
> 
> If you don't mind me getting picky... 
> 
> Shell commandlines have no idea about regular expressions. They do however 
> know about globbing which is still a powerful construct but nowhere near 
> as powerful as what regular expressions can do.
> 
> Had the above example been a regex, it would have been written 
> differently:
> 
> ls /dev/[sh]d.*
> 
> In the first case, "Expand to /dev/ followed by either an s or an h 
> followed by a d followed by anything or possibly nothing."
> 
> In the second case, "Expand to /dev/ followed by either an s or an h 
> followed by a d followed by any character which is allowed to repeat zero 
> or more times.
> 
> Just so you don't either feel stupid or think I am ;-) right now, the 
> example here is the worst possible to demonstrate the point because this 
> glob doesn't need anything more than what a regex could provide. But 
> suffice it to say that there is a huge difference.
> 
I do feel stupid - as you say, I picked a bad example, and didn't
even think about the difference between globbing and regular
expressions. I know better then that, but I was not thinking. Thank
you for clearing this up!

Mikkel
-- 

  Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!

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

  Powered by Linux