Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 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: downloader.sh [$1]"
  19. exit 1
  20. fi
  21.  
  22. printf "${white}Downloader\n:"
  23.  
  24. wget $1
  25.  
  26. dir="$(pwd)/*"
  27. for file in $dir
  28. do printf "${gray}$file\n${nocol}"
  29. done
  30.  
  31. printf "${green}Successfull Execution!\n$(date)\n${nocol}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement