计算所有字符,包括linux中的空格
16lz
2021-01-22
Can someone tell me if there is a way to count all the characters in a file including spaces?
有人能告诉我是否有办法计算包含空格的文件中的所有字符?
I am using wc -c <filename>
but it does not count spaces
and ctrlM
characters
我使用wc -c
1 个解决方案
#1
1
wc -c
is what you need it does count the whitespace characters.
wc -c是你需要的,它会计算空白字符。
If you are having a different result please share the file, and output.
如果您有不同的结果,请共享文件并输出。
更多相关文章
- linux shell脚本编程笔记(四): 获取字符串长度的七种方法
- 如何使用sed删除特殊字符
- Linux Shell编程(15)——操作字符串
- linux中常用时间和字符串之间相互转化
- Bash脚本删除目录中多个文件名末尾的'x'字符数量?
- 文本文件到字符串数组?
- 字符串处理函数strcat和strtok
- 对linux字符设备的理解(整体架构)
- gdb捕获syscall条件和字符串比较