![]() On Solaris, make sure to use /usr/xpg4/bin/grep. For portability, restrict to the list specified by POSIX. Some grep implementations have extra switches to recognise even more different regexp syntaxes like grep -P for PCRE (or perl-like, see also the pcregrep command shipped with the PCRE library), grep -X for augmented regexps.Īnd the list of operators supported by grep and grep -E varies from one system to another. That's the grep for the extended regexps (ERE), as opposed to the basic regexps (BRE) understood by grep/ sed/ ed/ vi.Īdditional operators like \ operator, some don't. The z is for zip (not for the pkzip compressed archive format, but for the zipping/compression of files).Įgrep was a command introduced in Unix V7 in the late 70s with a new regexp algorithm and syntax compared to the old grep (itself a standalone command to implement the g/re/p command of the ancient ed text editor). Zgrep is generally a script shipped with gzip (see also Stephen Kitt's comment below) that greps into compressed files (with compression formats that gzip recognises). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |