Write echo statements that create three trees like these: * *** ***** *
Write echo statements that create three trees like these:
*
***
*****
*
Please provide three echo statements to create three trees. Please provide more echo statements.
echo command is used in shell script to display line of text/string that are passed as an argument.
The Syntax is:
echo [option] [string]
To enables the interpretation of backslash escapes sequence '-b' option is used.
The required echo statements to create three trees are:
echo -e " * \n *** \n***** \n *" # print tree 1
echo " " # to generate blank line between trees
echo -e " * \n *** \n***** \n *" # print tree 2
echo " " # to generate blank line between trees
echo -e " * \n *** \n***** \n *" # print tree 3
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images