How does sed compare with awk, perl, and other utilities?
Awk is a much richer language with many features of a programming language, including variable names, math functions, arrays, system calls, etc. Its command structure is similar to sed: address { command(s) } which means that for each line or range of lines that matches the address, execute the command(s). In both sed and awk, an address can be a line number or a RE somewhere on the line, or both. In program size, awk is 3-10 times larger than sed. Awk has most of the functions of sed, but not all. Notably, sed supports backreferences (\1, \2, …) to previous expressions, and awk does not have any comparable function or syntax. Perl is a general-purpose programming language, with many features beyond text processing and interprocess communication, taking it well past awk or other scripting languages. Perl supports every feature sed does and has its own set of extended regular expressions, which give it extensive power in pattern matching and processing. (Note: the standard perl distri