From the course: Command Line Data Analysis
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
AWK - Unix Tutorial
From the course: Command Line Data Analysis
AWK
- [Instructor] In this video we are going to look at Awk. The name Awk comes from the combination of the people who created it, Alfred Aho, Peter J. Weinberger, and Brian Kernighan. Awk is a full featured language geared towards data processing, but you can do a lot more with Awk. My good friend Raymond Hettinger wrote a flight simulator using Awk. Let's have a look at what we can do with Awk. So let's do the cat and we look at our data and the cart that we have there. Let's say I want to print the number of items and then the name of the item so I can pipe it through Awk and Awk by default, split the fields by white space so I can put in curly braces. This is going to happen for every line and I'm going to say print. And then I want number three, which is the amount and then I want a coma. And then I want dollar two, which is the name. And finally close. And you see now that I get in C3 format, the amount and the…