I am trying to print the stars below on the screen using for or while loop. I don't know if I should treat as a string or what. If it is a string should I use foreach loop, just don't know where to start really.
******************
***********
*******
***
*
I am trying to get it to work even though I know it is wrong, but I am trying. Thanks for the advice.
#!/bin/bash
whilefunc() {
echo "*************"
echo" ****** "
echo" **** "
}
i=2
while [ $i = 2 ]
do
whilefunc
done
exit