Advertisement
Guest User

Untitled

a guest
May 23rd, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. declare -a arr
  4.  
  5. x=0
  6. chuj="test"
  7.  
  8. while [ "$x" -ne 5 ]
  9. do
  10. echo "podaj wartosc"
  11. read chuj
  12. if [ -n "$chuj" ]
  13. then
  14. arr[$x]=$chuj
  15. echo ${arr[$x]}
  16. fi
  17. x=$(($x+1))
  18. echo $x
  19. done
  20. clear
  21. i=0
  22. while [ "$i" -ne 5 ]
  23. do
  24. echo ${arr[$i]}
  25. i=$(($i+1))
  26. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement