Unix/Linux Go Back    


Homework & Coursework Questions Students must use and complete the template provided. If you do not use the template 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   -   Original Discussion by aswin
aswin's Unix or Linux Image
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   -   Original Discussion by aswin
Corona688's Unix or Linux Image
Corona688 Corona688 is offline Forum Staff  
Mead Rotor
 
Join Date: Aug 2005
Last Activity: 18 January 2018, 3:03 PM EST
Location: Saskatchewan
Posts: 22,574
Thanks: 1,163
Thanked 4,293 Times in 3,961 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 01:52 AM.