Unix/Linux Go Back    


Homework & Coursework Questions Students must use and complete the template provided. If you don't, your post may be deleted! Special homework rules apply here.

Display number from 10 to 1 using shell programming in while loop

Homework & Coursework Questions


Tags
display 10 to 1 ushing shell programming

Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 08-04-2015
aswin aswin is offline
Registered User
 
Join Date: Aug 2015
Last Activity: 4 August 2015, 1:44 PM EDT
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Display Display number from 10 to 1 using shell programming in while loop

echo "enter the number"
read n
while [ $n -ge 0 ]
do
echo "$n"
let n--
done

Last edited by aswin; 08-04-2015 at 12:39 PM.. Reason: show an error
Sponsored Links
    #2  
Old Unix and Linux 08-04-2015
Corona688 Corona688 is offline Forum Staff  
Mead Rotor
 
Join Date: Aug 2005
Last Activity: 20 January 2017, 5:46 PM EST
Location: Saskatchewan
Posts: 21,780
Thanks: 1,027
Thanked 4,038 Times in 3,746 Posts
Read the special homework rules.
Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Display number from 10 to 1 using shell programming in while loop aswin Shell Programming and Scripting 2 08-04-2015 12:59 PM
for loop iteration and shell programming startup kashif_islam Shell Programming and Scripting 3 01-13-2012 10:33 AM
loop to display whatever number use types gangsta Shell Programming and Scripting 3 12-05-2011 10:25 AM
Kernel Programming: Finding the number of I/O requests Ir1s UNIX for Advanced & Expert Users 2 06-11-2009 12:10 PM
obtaining a line number in ksh programming wilsontan Shell Programming and Scripting 1 02-22-2006 03:30 AM



All times are GMT -4. The time now is 03:36 PM.