我想数一数文件中每个字的出现次数。我不习惯于计算一个单词是否在另一个单词中作为子字符串存在。例如,如果单词是"in“,我不想将”side“中的”“计算为世界之外的外观。#Stores the words of the file without duplicates获取作为命令行参数传递的文件中的所有单词。#Accessing all the words from the file
for WORD in
OS上的uniq命令缺少在Linux:-w, --check-chars=N : compare no more than N characters in lines下可用的-w开关,从而解决了这个问题在不需要在awk中重新实现uniq的情况下,可以这样做吗?
字段的数量不是固定的。我只想使用安装在OS上的默认工具。我经常使用Macports,但在这种情况下,我不想使用它们。
for file /usr/include/x86_64-linux-gnu/bits/types/timer_t.h: atomic_write_error: failed_to_create_uniq_fileshard for file /usr/include/x86_64-linux-gnu/sys/types.h: atomic_write_error: failed_to_create_uniq_fi