Extra Regular Expression Wildcards Available Only in Perl

Perl is a complete programming language that runs under UNIX and Windows. While it usually does not come with any commercial UNIX distribution, it is readily available via the Internet for most UNIX systems. If Perl is available on your system, you can use it as a grep-like command-line utility that provides search and display capabilities not available in grep or egrep.

Perl is most commonly used as a programming language, but it does have command-line options that allow it to be used as a command-line filter (such as grep, sed, and awk) with this general syntax:

perl -ne 'print if /re/opt' file1 file2

The following are the options:

  • -ne are command options. The -e option to perl enables ...

Get Practical UNIX now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.