SHARE
TWEET

Untitled

a guest May 19th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3. while :
  4. do
  5. clear
  6. echo "Adresu knyga"
  7. echo "1. Prideti adresa"
  8. echo "2. Ieskoti adreso"
  9. echo "3. Istrinti adresa"
  10. echo "4. Perziureti adresu knyga"
  11. echo "5. Iseiti is programos"
  12. read -p "Iveskite pasirinkima" pasirinkimas
  13. clear
  14.  
  15. case $pasirinkimas in
  16. 1)echo "Prideti nauja adresa"
  17. read -p "Iveskite varda" vardas
  18. read -p "Iveskite pavarde" pavarde
  19. read -p "Iveskite el.pasto adresa" pastas
  20. read -p "Iveskite linkedin nuoroda" linkedin
  21. read -p "Iveskite skype varda" skype
  22. clear
  23. echo "Visi duomenys ivesti"
  24. echo "Naujo adreso duomenys"
  25. echo -e  "Vardas: $vardas.\nPavarde: $pavarde.\nEl.pastas: $pastas.\nLinkedin nuoroda: $linkedin.\nSkype vardas: $skype"
  26. echo "$vardas : $pavarde : $pastas : $linkedin : $skype >>adresuknyga.log
  27. echo "Adresas pridetas";;
  28. 2)echo "Adresu paieska"
  29. read -p "Iveskite ieskomo adreso varda" paieska
  30. clear
  31. echo "Paieskos rezultatai:"
  32. grep -i $paieska adresuknyga.log;;
  33. 3)echo "Adreso istrinimas"
  34. read -p "Iveskite varda adreso, kuri noresite istrinti" pasalinimas
  35. sed -i -e "/$pasalinimas/d" adresuknyga.log
  36. echo "Adresas istrintas";;
  37. 4)echo "Adresu knyga"
  38. cat adresuknyga.log;;
  39.  
  40. *) echo "Pasirinkimas negalimas";;
  41. esac
  42.  
  43. read -p "Paspauskite 5, jeigu norite baigti programa. Spauskite bet kuri mygtuka, jei norite grizti i adresu knygos meniu" iseiti
  44. if [iseiti -eq 5]
  45. then break
  46. fi
  47. done
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top