Advertisement
Guest User

Untitled

a guest
Jan 18th, 2018
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. echo "Miesiac: "
  2. read miesiac
  3. echo "Dzien: "
  4. read dzien
  5.  
  6. awk -v dz=$dzien '
  7. /'$miesiac'/ { printf("%s",$1)
  8. if(dz=="poniedzialek")
  9. {
  10. printf"%d\n",$2
  11. }
  12. if (dz=="wtorek")
  13. {
  14. printf"%d\n",$3
  15. }
  16. if (dz=="sroda")
  17. {
  18. printf"%d\n",$4
  19. }
  20. if (dz=="czwartek")
  21. {
  22. printf"%d\n",$5
  23. }
  24. if (dz=="piatek")
  25. {
  26. printf"%d\n",$6
  27. }
  28. if (dz=="sobota")
  29. {
  30. printf"%d\n",$7
  31. }
  32. if (dz=="niedziela")
  33. {
  34. printf"%d\n",$8
  35. }
  36.  
  37. }' $1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement