raspberry pi - shell script that takes a string input by the user and outputs the number of characters in it? -


Can you show me a shell script that takes string input by the user and outputs the number of characters in it? I've tried many times but I can not get it right.

Use wc functions like this:

Echo-N ABC | Wc -c

or

  echo -n abc. Wc -m  

- Check the manual for the last press Newline which will be counted as an additional character


Comments

Popular posts from this blog

c# - SignalR: "Protocol error: Unknown transport." when navigating to hub -

class - Kivy: how to instantiate a dynamic classes in python -

Registering an Interceptor For All Interface Implementaions in Castle Windsor -