Awk

From Linuxintro
Revision as of 15:16, 25 July 2009 by imported>ThorstenStaerk (New page: awk is a command for string operations. It allows you to only show the third ''column'' of a file for example. ;Examples: kill all processes of a user ps --no-header -fu <use...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

awk is a command for string operations. It allows you to only show the third column of a file for example.

Examples

kill all processes of a user

ps --no-header -fu <username> | awk '{ print $2 }' | grep -v $$ | xargs kill