Learning Awk Is Essential For Linux Users

278,164
0
Published 2021-06-16
One of my favorite command line utilities is "awk" which is a text-processing program. It is mostly used for pattern scanning and processing. In this video, I will give examples of some of the basic awk commands, and show you some of the ways that I often use awk.

REFERENCED:
โ–บ www.gnu.org/software/gawk/manual/gawk.html - GNU Awk

WANT TO SUPPORT THE CHANNEL?
๐Ÿ’ฐ Patreon: www.patreon.com/distrotube
๐Ÿ’ณ Paypal: www.paypal.com/cgi-bin/webscr?cmd=_donations&businโ€ฆ
๐Ÿ›๏ธ Amazon: amzn.to/2RotFFi
๐Ÿ‘• Teespring: teespring.com/stores/distrotube

DONATE CRYPTO:
๐Ÿ’ฐ Bitcoin: 1Mp6ebz5bNcjNFW7XWHVht36SkiLoxPKoX
๐Ÿถ Dogecoin: D5fpRD1JRoBFPDXSBocRTp8W9uKzfwLFAu
๐Ÿ“• LBC: bMfA2c3zmcLxPCpyPcrykLvMhZ7A5mQuhJ

SOCIAL PLATFORMS:
๐Ÿ—จ๏ธ Mastodon: distrotoot.com/@derek
๐Ÿ‘ซ Reddit: www.reddit.com/r/DistroTube/
๐Ÿ“ฝ๏ธ LBRY/Odysee: odysee.com/$/invite/@DistroTube:2

DT ON THE WEB:
๐Ÿ•ธ๏ธ Website: distrotube.com/
๐Ÿฟ๏ธ Gemini Capsule: gemini://distro.tube
๐Ÿ“ GitLab: gitlab.com/dwt1

FREE AND OPEN SOURCE SOFTWARE THAT I USE:
๐ŸŒ Brave Browser - brave.com/dis872
๐Ÿ“ฝ๏ธ Open Broadcaster Software: obsproject.com/
๐ŸŽฌ Kdenlive: kdenlive.org/
๐ŸŽจ GIMP: www.gimp.org/
๐ŸŽต Audacity: www.audacityteam.org/
๐Ÿ’ป VirtualBox: www.virtualbox.org/
๐Ÿ—’๏ธ Doom Emacs: github.com/hlissner/doom-emacs

Your support is very much apprec

All Comments (21)
  • @TecnocraciaLTDA
    AWK is not just a text processing utility, awk is a complete programming language!!
  • awk is a must. So powerful. Btw. You actually did just square. Not square root :)
  • @SPSHOfficial
    At 8min, when you pipe uniq, note that 'uniq' does not detect repeated lines unless they are adjacent. You may want to sort the input first, or use 'sort -u' without 'uniq'. so it would be | sort | uniq OR | sort -u
  • @erics7004
    DT: AWK is important for linux users Luke Smith 1 hour later: Why AWK is useless for linux users
  • @BrutusHiatus
    This is a great tutorial about awk. I've learned quite a bit. The only thing that red flagged me was that NONE of those were square roots. They were squares.
  • @ecavero1
    In the square root example, very time DT said square root, he means square! Great video, DT!
  • @intrepidca80
    14:00 - /^[b,c]/ matches anything that begins with a "b" or a "c" *or a comma*.
  • @OscarFURIOUS
    I just came to say that I can see that you listened to the comments and now you are sharing your knowledge on simple but technical stuff that's really helpfull. I apreciate that and also can feel that effort
  • @driden1987
    Had to process a 120k line csv at work the other day. Awk was a god send
  • @psadi_
    I bet someone is already rewriting awk in rust for the memes.
  • @jeffcauhape6880
    That is the most clear demonstration of AWK I have ever seen. Amazing.
  • @tarekrahman1
    Glad you made this video. I was stumbling upon awk in everywhere and wanted to learn it but didn't have time to do so. Thanks
  • @4lc0h0l
    This is great, this video arrived just in time since currently I am on problem automating a lot of stuff with bash scripting and using awk for text-processing. Thanks for the content!
  • @skirnir393
    Good introduction to awk. Back in 2013 i had to parse huge log files that had no field separator, even worst each line could be completely different depending on certain conditions. Awk saved my life.
  • @gwgux
    This is one of the best explanations of awk I've seen! I'll save this one for some people I know that are still just learning Linux.
  • @milo_andrs
    Nice, thank you. I am beginning my journey on bash and this is awesome.
  • @OpusFocus1968
    Thank you Derek I appreciate the time and effort you put into making these videos. You help us "middle users" take things up a notch. Middle as in we are no longer beginners but won't ever be sysadmins. We do however want more out of their Linux system.
  • @DaveRogersEsq
    Needed a quick refresher on awk as I had no used it in years. This was a great video, covering the essentials. Cheers.
  • @Hexalyse
    awk is awesome, but if you just want the number of lines, using wc is less characters to type :)