0

How would I apply the word count tool to a task of this nature:

Д

е

с

я

т

ь

д

н

е

й

I want to know how many characters appear but I want to ignore the white space in between the characters.

How can I specify that in the unix word count utility?

fedorqui
  • 275,237
  • 103
  • 548
  • 598

1 Answers1

1

If you use tr you can delete new lines and spaces like this:

$ tr -d '[\n ]' < file
Десятьдней

Then, pipe to wc with -m for chars:

$ tr -d '[\n ]' < file | wc -m
10
fedorqui
  • 275,237
  • 103
  • 548
  • 598