原文:linux查找某個文件中單詞出現的次數

文件名稱:list 查找單詞名稱:test 操作命令: more list grep o test wc l cat list grep o test wc l grep o test list wc l ...

2015-04-02 15:40 0 2510 推薦指數:

查看詳情

linux shell 統計文件單詞出現次數

#! /bin/bash#文件名:word_freg.sh#用途:計算文件單詞的詞頻 if [ $# -ne 1 ] then echo "Usage:$0 filename" exit -1fi filename=$1 egrep -o "\b[[:alpha:]]+\b ...

Tue Jul 06 17:10:00 CST 2021 0 181
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM