Awk Isn't Just A Command: Let's Learn The Basics

preview_player
Показать описание
Today we'll be covering chapter 1 of our awk programming tutorial series, this will be covering a lot of the aw basics, the main topics for today will be how to use the awk interpreter in the first place, the syntax structure, conditionals and variables. All of which are fundamental to working with the awk language and awk command.

==========Support The Channel==========

==========Resources==========

=========Video Platforms==========

==========Social Media==========

==========Time Stamps==========
0:00 Why
0:46 Executing Awk Programs
1:59 BEGIN And END Blocks
4:12 Script In A File
5:13 Awk Shebang
6:06 Variables
7:38 Search Strings
8:35 Multiple Regexes
9:29 Conditionals
10:06 If Statements
11:12 Curly Braces In If
11:40 Else and Else If
12:27 For Loops
13:07 While Loop
13:35 Practical Example
14:31 Special Variables

==========My Repos==========

==========Credits==========
🎨 Channel Art:
All my art has was created by Supercozman

🎵 Ending music

DISCLOSURE: Wherever possible I use referral links, which means if you click one of the links in this video or description and make a purchase we may receive a small commission or other compensation.

Рекомендации по теме
Комментарии
Автор

(@~7:30)You aren't enclosing var in double quotes. You are sorrounding it with 2 null strings (""). awk concatenates consecutive strings automatically, so it prints your variable with a null string on each side (ie just your variable).
Using this video to learn awk and just figured that out. This is not a flex, I am a noob.
Thanks for this video!

BeauKpad
Автор

Awk is a greatly misunderstood language. Some people still thing that awk is a command.

Maybe someday later I'll dig into awk a little more because you did show some cool stuff.

shubhampawar
Автор

14:37 `NR` stands for Number of Record

BluesManPeich
Автор

I've always wanted to learn awk but never got around to it. Thanks for the video Based Brodie.

scalawagmax
Автор

7:31 why would you do that? you're just surrounding the value with empty strings o.O

fuseteam
Автор

Such a huge work to write some i3blocks modules in Python and now I discover that I could do the same with AWK with just one line of command. I'm glad but frustrated for not knowing this before, lol

estevaomendes
Автор

You're doing lords work. I probably don't need most of this series, but awk is life.

maxim
Автор

NR is the ‘record number’ like NF is the field number

bobtatar
Автор

At t=7:35 the var value will also print if you use no quotes around it.

isaacnaughton
Автор

Showing awk examples from your own scripts would be a good way to keep the tutorials more relevant and interesting.

petewest
Автор

This kind of courses I so wanted.
Please go in depth next time and cover sed, xargs ...etc please.
Thank you so much for your efforts sir.

abessesmahi
Автор

I've got some of the way thorugh Effective Awk. The thing with awk is that it's at its best doing in one-liners what would take a script with a dozen or so lines otherwise. If it takes more than one line of awk, quite possibly awk isn't the right program for your needs.

Chalisque
Автор

This is best awk tutorial.
Just went right into my head.
Sadly, video is too underated.

window.location
Автор

Thanks Brodie, very good video. Cheers

patrickprucha
Автор

Awesome tutorial. Thanks for making the effort.

kahlschlag
Автор

The reason why you need to "double quote" a variable is because that way it is not inside of the string. That way there is a string left and a string right of it. It might just be confusing if you have empty strings for some reason.

AtomToast
Автор

Amazing content!
Congrats, my friend!
Keep it up!

UlissesOliva
Автор

I know this was 4 years ago but awk can do much more and i suspect you already know it by now. awk can be used in shell scripts such as bash, zsh, fish you name it and extend functionality of shell script much more than usual script can really do.

raughboy
Автор

Very helpful, thanks for sharing your knowledge!

adamaleksander
Автор

Is there a way to define the input file from within the awk script itself?

uxkkvpm
welcome to shbcf.ru