- #1
Bimpo
- 9
- 0
Homework Statement
Trying to find how many numbers contains 5 between 1 to 4321
Homework Equations
n/a
The Attempt at a Solution
#!/bin/bash
typeset -i current=1
typeset -i times=0
while [ $current -le 4321 ] ; do
if [ ] ; then <<<<<<<<<<< stuck here, not sure what to put in if, tried grep etc nonthing works yet
times=times+1
fi
current=current+1
done
echo there are $times numbers that has a 5