From the course: Learning Linux Command Line

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Manipulate text with awk, sed, and sort

Manipulate text with awk, sed, and sort - Linux Tutorial

From the course: Learning Linux Command Line

Manipulate text with awk, sed, and sort

- [Instructor] One of the tasks of a system administrator, a systems analyst, a scientist, or a programmer is to make use of data from various logs or outputs. We've seen how to look at files and how to search within them. So now let's take a look at reaching in and extracting particular data and presenting it in different ways. There's a few common tools for this and which one we used is largely a matter of preference. So it's helpful to be at least a little bit familiar with both. These tools are called awk and sed. Both tools are widely used in command-line operations, and you'll see them both as you explore system administration and systems programming. What awk is great at and is commonly used for in scripts is pulling data out of a file according to a rule. To define this rule, we write an awk program either right at the command line or in a separate file if it's very complex to tell awk how to get the data we…

Contents