Online Linux Terminal Logo
OnlineLinuxTerminal
TextverarbeitungCLI Manual

$awk

Pattern scanning and column text processing language.

BefehlssyntaxPOSIX Standard
awk [OPTIONS] 'program' [FILE...]
Linux-Community2.4k Online

Tausche dich mit Linux-Nutzern aus, lerne Befehle und lade PDF-Cheatsheets herunter.

Live im interaktiven Terminal ausprobieren

Client-seitige Simulation ohne Installation mit sofortigem Feedback.

Im Vollbild-Terminal öffnen ↗
bash — terminal

Überblick & Funktionsweise

`awk` is a complete programming language designed for data extraction and reporting. It treats text files as tables divided into records (lines) and fields (columns delimited by spaces or commas), making it effortless to parse CSVs, log files, and system process tables.

Wichtige Optionen und Flags

Flag / OptionDescription
-F [separator]Define custom field separator character (e.g., -F: for /etc/passwd).
-v [var=val]Assign a value to an internal awk program variable.

Praktische Anwendungsbeispiele

#1Extract usernames from /etc/passwd
awk -F: '{print $1}' /etc/passwd

Splits lines by colon (:) and prints the first column containing account usernames.