统计文件中以某个字母开头的单词的数目

版权声明:本文系作者原创。未经许可,不得转载。

文件名为:try.txt
$ cat try.txt

The Younger Generation In the Twenty-first Century

  Good evening, ladies and gentlemen.

  We always say ‘we are the future’. Indeed. We, the younger generation represents modern knowledge, new concepts, ambiti and great desire for success. But, have you ever thought of this question: how can we be successful in the 21st century, which is full of great challenges and fierce competitions? In my opinion, there are two important factors.

脚本:
$ cat try.txt | xargs echo | awk '{gsub(/[^a-zA-Z0-9 -]/, "");print $0}' | awk 'BEGIN{i=0;j=0}{while(j

你可能感兴趣的:(shell)