Pages

Creating a christmas tree on linux terminal

Here is a script that,when executed, will draw a christmas tree using the characters choosen by the user on the linux terminal.

The script will prompt the user to enter the character using which the tree has to be drawn. Then it will prompt the user to enter two characters that will be used to decorate the tree. The last input it will ask for is the character using which the base of the tree has to be drawn.

chritstmas_tree.sh



Save the script as chritstmas_tree.sh and give it execute permissions



You should see the following on your screen.



Related Posts

Colorful christmas tree on linux terminal

6 comments:

  1. I get

    chritstmas_tree.sh: 14: chritstmas_tree.sh: Syntax error: Bad for loop variable

    ReplyDelete
  2. Anonymous: ./christmass_tree.sh

    ReplyDelete
  3. How about this: http://smackerelofopinion.blogspot.co.uk/2012/12/and-now-something-seasonal.html

    ReplyDelete
  4. Interesting post sir ..Keep posting ..

    ReplyDelete