Shell script to print left traingle, Programming Languages

Left Triangle




#W.A.S.S. to create left triangle


echo -e "enter num:\c"

read n




while test $k -le $n       #this loop print as many line of * as the value of k



 while test $j -le $k      #this loop print as many * per line as the value of j


     echo -e " * \c"

     j=`expr $j + 1`


echo " "

k=`expr $k + 1`





enter num:7


 *  *

 *  *  *

 *  *  *  *

 *  *  *  *  *

 *  *  *  *  *  *

 *  *  *  *  *  *  *

Posted Date: 9/26/2012 4:34:57 AM | Location : United States

Related Discussions:- Shell script to print left traingle, Assignment Help, Ask Question on Shell script to print left traingle, Get Answer, Expert's Help, Shell script to print left traingle Discussions

Write discussion on Shell script to print left traingle
Your posts are moderated
Related Questions
1. A readme.txt file with: a. Instructions on how to compile and run your client and server code on the command line. (Also provide shell scripts if the commands are complicated

Write a pseudocode for a program that reads a temperature as a whole number from a user and outputs a “probable” season (winter, sprint, summer, or fall) depending on the temperatu

Let the player (denoted U in the diagram below) navigate around the board until she wins the game by finding the exit or is killed by a monster. A player begins the game with a sli

Define an Example of Switch Statement? estimate(number) int number; /* Estimate a number as none, one, two, several, many */ {       switch(number) { case 0 :

1. Logon to Linux. 2. Create a directory "Unix" under your home directory. Command(s): …………………………………………. 3. Create four sub-directories bin, conf, docs

Overview You will write a loadable kernel module. If you have an idea which you can convince me is a good idea that can not be done as a module, but only via direct modificatio

about how to create the program in c

Silver light uses WPF to provide included web handles Microsoft Technologies Silverlight uses WPF to provide included web handles similar to Adobe Display, but with more focus on a

Define a Prolog predicate flatten(List, FlattenedList)  that asserts List  is any nested list of atoms and  FlattenedList  is the same list with the nesting removed. The atom [] sh

I have a half done program that needs to be finished for a class by tomorrow night. The program will create a database and print out a menu ofoptions (already done). Ive already