Advertisement
FaisalAhemdBijoy

while

Sep 17th, 2019
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.21 KB | None | 0 0
  1. # Hello World Program in Bash Shell
  2.  
  3. echo while loop
  4.  
  5. n=1
  6. while [ $n -le 10 ]
  7. do
  8.     echo "$n"
  9.     n=$((n+1))
  10. done
  11.  
  12. echo print 1-10
  13.  
  14.  
  15. n=1
  16. while (( $n <= 10 ))
  17. do
  18.     echo "$n"
  19.     ((n++))
  20. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement