← All Tools

⚙ AWK Command Builder & Tester

Build AWK one-liners visually and test them against sample input right in your browser.

Presets

Options
AWK Rules

Each rule has an optional pattern (condition) and an action (code block). Leave the pattern empty to match all lines.

Generated Command

awk '{print}'
Test Input & Output
Quick Reference
$0Entire line
$1, $2, ...Fields by position
NRCurrent line number
NFNumber of fields
FSField separator
OFSOutput field separator
RSRecord separator
length($0)String length
substr(s,i,n)Substring
split(s,a,fs)Split string into array
gsub(r,s)Global substitution
match(s,r)Regex match
tolower(s)Lowercase
toupper(s)Uppercase
printf fmt, ...Formatted output
/regex/Pattern match
Built with ☕ by Steven Li · No data leaves your browser