Online Linux Terminal Logo
OnlineLinuxTerminal
Обработка текстаCLI Manual

$awk

Pattern scanning and column text processing language.

Синтаксис командыPOSIX Standard
awk [OPTIONS] 'program' [FILE...]
Сообщество Linux2.4k Онлайн

Общайтесь с пользователями Linux, учите команды и скачивайте шпаргалки.

Попробуйте в интерактивной песочнице

Клиентская симуляция без установки с мгновенным результатом.

Открыть в полноэкранном терминале ↗
bash — terminal

Обзор и принцип работы

`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.

Основные флаги и параметры команды

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.

Практические примеры использования

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

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