我想使用 unix 命令打印文本文件每行的字符数。我知道用 powershell 很简单
gc abc.txt | % {$_.length}
但是我需要unix命令。
最佳答案
使用awk。
awk '{ print length }' abc.txt
关于shell - 如何打印文本文件每行的字符数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8786634/