Luke, rambling…

Search

SearchSearch

Recent Writings

  • Day in the Life of someone who potentially has ADHD maybe

    Aug 21, 2023

    • #post/self
  • Preparing this site

    Jul 30, 2023

    • #post/selfhosting
    • #meta
  • Why I don't write

    Apr 06, 2023

    • #post/self

See 1 more →

linux-cli-awk

Sep 20, 2022, 1 min read

  • #tool

↑ linux-cli

awk 'pattern {action}'
 
awk '$0 ~ /500/ { print $0 }' access.log
# This is equivalent to
awk '$0 ~ /500/' access.log
  • example taken from Intro to awk – passionplay
  • $0 – search each line and find if there’s a 500 in it
  • print the line (this is the default behaviour)

Links §

Awk - A Tutorial and Introduction by Bruce Barnett | The Grymoire – home for UNIX wizards
An Awk Primer – Wikibooks

POSIX-2017 Shell & Utilities | Wikimedia
sed & awk, 2nd Edition | O’Reilly

Graph View

Backlinks

  • linux-cli-sed
  • RegEx

©2023. Unless stated otherwise, content on this site is licensed under CC BY-SA 4.0.

  • Mastodon
  • Discord