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# - NewtonSoft JArray - how to select multiple elements with LINQ -

c# - Process.Kill() returns access denied -

c# - Using the generic type 'System.Collections.Generic.List<T>' requires 1 type arguments -