Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. #!/bin/bash
  2. nocol="\e[0m"
  3. green="\e[1;32m"
  4. yellow="\e[1;33m"
  5. white="\e[1;37m"
  6. gray="\e[1;30m"
  7. red="\e[1;31m"
  8.  
  9. trap 'printf "${red}\nPreustanoveno izpylnenie!\n${nocol}"; exit 1' 2
  10.  
  11. printf "${yellow}Start Execution(yes/no) ${nocol}"
  12. read input
  13. if [ $input = "no" ]; then
  14. exit 1
  15. fi
  16.  
  17. if [ $# -ne 1 ]; then
  18. printf "${red}Sample Usage: zipit.sh [filename]"
  19. exit 1
  20. fi
  21.  
  22. printf "${white}Zipit\n:"
  23. zip $1.zip $1
  24.  
  25. dir="$(pwd)/*"
  26. for file in $dir
  27. do printf "${gray}$file\n${nocol}"
  28. done
  29.  
  30. printf "${green}Successfull Execution!\n$(date)\n${nocol}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement