If possible, use grep alone (BRE, basic regexps) or else try grep -E (ERE, extended regexps) rather than diving deeper into PCRE land. LibPCRE is much faster, but the simpler your regexps, the better performance you'll get. This is very rare (and kind of silly since there are plenty of potent rogue POSIX shell scripts). rootkits) depend on these and therefore cannot run. Note, there are servers that intentionally lack perl, python, and php for "security purposes," namely that many rogue scripts (e.g. Still, if you want PCRE with a better assurance of portability, don't rely on grep -P or pcregrep (9363th at 1k installs) or ack (21728th at 180 installs), use perl (88th at 175k installs) directly: perl -ne 'print if /regexp/' It should be safe to assume that modern desktop and servers running full Linux distributions will have versions of grep compiled with PCRE support. as previously mentioned - the dot is a wildcard character, and the star, when modifying the dot, means find one or more dot ie. If you want in regular expressions to act as a wildcard, you need to use. I cannot explain the discrepancy, but I also wouldn't worry about it. However, in regular expressions, is a modifier, meaning that it only applies to the character or group preceding it. grep (25th most common, 176k installs) depends ( not optionally) on libpcre3 (94th most common, 174k installs). PCRE is installed on pretty much all server and desktop Linux systems, but you can't necessarily expect it on lightweight systems or embedded systems (phones, routers, TVs, and other IoT), as they often have very trimmed versions of the standard userland (basically, anything with a busybox base is all but guaranteed to lack PCRE).ĭebian has a Popularity Contest feature that measures installation metrics on various packages.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |