I started to take lesson to learn bash script. I want to write a bash script that asks a user to enter an integer and counts the number of digits.
How can I use x=$(($x+1))
to increment my counter?
I started to take lesson to learn bash script. I want to write a bash script that asks a user to enter an integer and counts the number of digits.
How can I use x=$(($x+1))
to increment my counter?
simple_code.sh
echo "Enter a number"
read num
echo "Number of digits in your number = ${#num}"
run
bash simple_code.sh