awk -F "" '{for(i=1;i<=NF;++i) if($i=="a") ++sum}END{print sum}' test.c
[root@xiaobb 5906]# awk '{for(i=1;i<=NF;++i) if($i=="test") ++sum}END{print sum}' test.c
6
[root@xiaobb 5906]# cat test.c
test test
ktest
test
a test
test a
l test
ltest
最近发表
- Centos7 metasploit-framework安装部署
- 记录systemd内存占用过多
- 错误提示open_basedir restriction in effect. File is not within the allowed path:的解决方法
- EUserv自动续期shell脚本配合crontab
- Elasticsearch 7.9.1集群安装配置
- 判断磁盘空间使用率是否达到阈值shell脚本
- TypeError: Unicode-objects must be encoded before hashing
- Unverified HTTPS request is being made
- Centos7 部署DHCP服务
- LVS负载调度NAT及DR教程
标签列表
- win11 (20)
- win11教程 (20)
- win11桌面 (1)
- 远程桌面 (1)
- 远程链接 (1)
- 清理缓存 (1)
- Win11如何设置右键经典模式 (2)
- Win11右键怎么设置原来的模样 (2)
- Win11图标 (2)
- Win11 (4)
- 本地磁盘 (1)
- win11正式版退回win10 (1)
- win10 (1)
- 管理员权限 (1)
- 帝国cms教程 (36)
- 火焰效果 (2)
- 火焰制作 (2)
- 火焰动图 (2)
- ps教程 (9)
- Office 2010 (2)
- Office2010 (2)
- Office2010激活 (2)
- Office2007 (4)
- Office2007安装 (4)
- Office2007激活 (4)
