---
type: link
tags: [public, command, linux, terminal, awk]
created: 2025-10-27T09:17:57.483Z
---# Count and print unique values in a column.

**URL:** [https://www.gnu.org/software/gawk/manual/gawk.html](https://www.gnu.org/software/gawk/manual/gawk.html)

awk | Count and print unique values in a column. awk '{count[$1]++} END {for (val in count) print val, count[val]}' file.txt


---
**Keywords:** public, command, linux, terminal, awk
