We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
shell命令实现group by功能
The text was updated successfully, but these errors were encountered:
https://blog.51cto.com/u_15104381/2621904
Sorry, something went wrong.
1、以文件名后缀分组统计数量(分组统计)
ls -rtl |awk ‘{print $9}’|awk -F “.” ‘{print $2}’|sort|uniq -c
2、以文件名后缀统计总容量(分组求和)
ls -rtl |awk ‘{print $9,$5}’|awk -F “.” ‘{print $2}’|awk ‘{a[$1] += $2; }END{ for(i in a){ print i,a[i] } }’
©著作权归作者所有:来自51CTO博客作者Joker的原创作品,请联系作者获取转载授权,否则将追究法律责任 利用shell命令实现group by功能 https://blog.51cto.com/u_15104381/2621904
No branches or pull requests
shell命令实现group by功能
The text was updated successfully, but these errors were encountered: