原文: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