Summery

awk

Summery

awk is a Linux command-line tool for processing text files. It reads input line by line and lets you filter, search, modify, or format text.

Commands

awk '{print $6}' - Show only the nth column
awk 'length($0) >= 12' rockyou-12+.txt > rockyou-min12.txt - Keep only lines containing at least 12 characters

cut
sed
tr
tee

Commands

grep, awk, sed & cut
awk '{print $6}'
cut -f2 -d"["
cut -d'_' -f1,2 - If you want to remove all after the second \, not the first one
sed
tr '_' ' ' - Change _ into space

Examples

cat all.raw | awk '{print $2}' | cut -d'_' -f1,2 | tr '_' ' ' | sed 's/ubuntu.*//' | sed 's/build.*//' | sed 's/+*//' | sed 's/+dfsg.*//'
cat binaries.raw | cut -d'/' -f1,4 | cut -d'/' -f2 > binaries.txt