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

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

ubuntu - Bash Script to Check That Files Are Being Created -