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
Post a Comment