Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- nocol="\e[0m"
- green="\e[1;32m"
- yellow="\e[1;33m"
- white="\e[1;37m"
- gray="\e[1;30m"
- red="\e[1;31m"
- trap 'printf "${red}\nPreustanoveno izpylnenie!\n${nocol}"; exit 1' 2
- printf "${yellow}Start Execution(yes/no) ${nocol}"
- read input
- if [ $input = "no" ]; then
- exit 1
- fi
- if [ $# -ne 1 ]; then
- printf "${red}Sample Usage: zipit.sh [filename]"
- exit 1
- fi
- printf "${white}Zipit\n:"
- zip $1.zip $1
- dir="$(pwd)/*"
- for file in $dir
- do printf "${gray}$file\n${nocol}"
- done
- printf "${green}Successfull Execution!\n$(date)\n${nocol}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement