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



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

please can show me shell script takes string input user , outputs number of characters in it? have tried numerous times can't right.

use wc function that:

echo -n abc | wc -c

or

echo -n abc | wc -m

the -n supresses final newline count character. check manual wc.

shell raspberry-pi

Comments

Popular posts from this blog

c - Compilation of a code: unkown type name string -

java - Bypassing "final local variable defined in an enclosing type" -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -