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 但它不计算空格和ctrlM字符

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.

如果您有不同的结果,请共享文件并输出。

更多相关文章

  1. linux shell脚本编程笔记(四): 获取字符串长度的七种方法
  2. 如何使用sed删除特殊字符
  3. Linux Shell编程(15)——操作字符串
  4. linux中常用时间和字符串之间相互转化
  5. Bash脚本删除目录中多个文件名末尾的'x'字符数量?
  6. 文本文件到字符串数组?
  7. 字符串处理函数strcat和strtok
  8. 对linux字符设备的理解(整体架构)
  9. gdb捕获syscall条件和字符串比较

随机推荐

  1. android中的content provider的使用
  2. Android(安卓)Service的onRebind方法调用
  3. Android中FloatingActionButton的基本使
  4. Android的内存机制
  5. Android 开发中使用 SQLite 数据库
  6. Android性能分析
  7. Android 安全攻防(一):SEAndroid的编译
  8. android 项目工程文件夹(zhuan)
  9. 安卓控件之图片控件(ImagView)
  10. Android(安卓)Init进程源码分析