From the course: Learning Linux Command Line
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
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
-
-
-
-
-
-
The Unix philosophy2m 29s
-
(Locked)
Use pipes to connect commands together2m 41s
-
(Locked)
View text files with cat, head, tail, and less4m 44s
-
(Locked)
Search for text in files and streams with grep4m 30s
-
(Locked)
Manipulate text with awk, sed, and sort6m 50s
-
(Locked)
Edit text with Vim4m 35s
-
(Locked)
Edit text with nano2m 49s
-
(Locked)
Working with tar and zip archives8m 17s
-
(Locked)
Challenge: Create and share a file28s
-
(Locked)
Solution: Create and share a file1m 48s
-
(Locked)
Output redirection5m 11s
-
(Locked)
Exploring environment variables and PATH3m 54s
-
(Locked)
Challenge: Extract information from a text file1m 8s
-
(Locked)
Solution: Extract information from a text file3m 28s
-
-
-