Home

zhangyiqun

Thoughts, stories and ideas.

Notes Blog Archives About
14 Feb 2009

[AWK]提取每行第一次出现的单词

awk -F’[^a-zA-Z]+’ ‘/.$/{if ( $1~/[a-zA-Z]+/) print $1 ;else print $2}’

精髓在于分隔符的使用。

Notes Blog Archives About