I am currently writing a program in the raspberry pi that will allow a user to enter a string, and have the program count the amount of letters in it. I am looking into expr
but I don't know how to use it, and what this actually does. Could you let me know what this means and how I can use it for my program.
This is what I currently have.
#!/bin/bash
echo "Enter a word."
read str
"help here please!"
Thanks
expr
since this will fork another process thus occupy more resources. It is as simple asecho "${#str}"
– Valentin Bajrami Oct 16 '14 at 08:24