awk

awk can pretty much do it all. With awk, you can search, modify files, generate reports, and a lot more. awk performs these tasks by searching for patterns in lines of input (from standard input or from a file). For each line that matches the specified pattern, it can perform some very complex processing on that line. The code to process matching lines of input is a cross between a shell script and a C program.

Data manipulation tasks that would be very complex with combinations of grep, cut, and paste are very easily done with awk. Because awk is a programming language, it can also perform mathematical operations or check the input very easily ...

Get HP-UX 11i System Administration Handbook and Toolkit, Second Edition 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.