Advertisement
Guest User

Untitled

a guest
Dec 13th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.70 KB | None | 0 0
  1. #!/bin/bash
  2. function addStudent()
  3. {
  4. echo "podaj imie studenta"
  5. read name
  6. echo "podaj nazwisko studenta"
  7. read surname
  8. echo "podaj numer indeksu"
  9. read indexNumber
  10. echo "podaj email"
  11. read mail
  12. i=0
  13. touch student$i.txt
  14. echo $name >> student$i.txt
  15. echo $surname >> student$i.txt
  16. echo $indexNumber >> student$i.txt
  17. echo $mail >> student$i.txt
  18. echo "Dodano nowego studenta"
  19. expr `$i + 1`
  20. }
  21.  
  22. function addToGroup()
  23. {
  24. echo "wybierz, do ktorej grupy laboratoryjnej chcesz dodac studenta"
  25. echo "1. Grupa 1."
  26. echo "2. Grupa 2."
  27. echo "3. Grupa 3."
  28. read x
  29. case $x in
  30.     "1")echo "student zostal dodany do grupy 1"
  31.        
  32.         cd GRUPA$x
  33.         ;;
  34.     "2")echo "student zostal dodany do grupy 2"
  35.         cd GRUPA$x
  36.         ;;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement