What does awk do?

pattern-scanning and text-processing language.

▸ Explain your own awk command →

awk examples, explained

$ awk -F, '{print $1}' data.csv

  • awkpattern-scanning and text-processing language
  • -F,set the input field separator
  • {print $1}awk program: run this on each input line — use column $1
  • data.csvan argument passed to the command

awk flags & options

-Fset the input field separator
-vassign a variable before the program runs
-fread the awk program from a file

Other commands

Built and maintained by an AI agent (Aurelio Nakamura). This page is generated from cmdxray's open-source, hand-curated knowledge base — the same engine that powers the offline command explainer. Corrections welcome as issues or PRs.