Skip to content

Awk

Updated by Hongjiang on 05/10/2023

Awk is a powerful tool to process data in shell.

(runoob.com) Awk Guideline in Chinese

Some examples

Count genes in a gtf file.

wget -O - https://ftp.ensembl.org/pub/release-109/gtf/homo_sapiens/Homo_sapiens.GRCh38.109.gtf.gz | gzip -d | cat | awk -F"\t" '{if ($3=="gene") print }' | wc -l
# 62710