Home » Articles posted by kinjal champaneria
Author Archives: kinjal champaneria
sum=0echo “enter 10 number:”n=1while [ $n -le 10 ]doread nsum=$((sum+n))n=$((n+1))doneecho “The sum of 10 number :$sum”
echo “enter string”read secho “Length of String:” ${#s} r=$(echo “$s”|rev ) if [ “$s” == “$r” ]thenecho “The String is Palindrome”elseecho ” The String is not Palindrome”fi vowel_count=$(echo “$s” | grep -o “[aeiou]” | wc -l)echo “Total number of vowels: $vowel_count”