Advertisement
Hiteshw11

Arrays In Bash Using For Loop

Jul 13th, 2020
683
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.21 KB | None | 0 0
  1. #!/bin/bash
  2. echo "Enter the number of numbers"
  3. read a
  4. for ((count=0; count<a; count++))
  5. do
  6. echo "Enter number"
  7. read b
  8. area[$count]=$b
  9. done
  10. for  (( count=0;count<a;count++ ))
  11. do
  12. echo ${area[$count]}
  13. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement