2.0.0 • Published 3 years ago
daily-scripts v2.0.0
Shellscript to automation of daily tasks
Usage
Thrid part dependencies
- jq: Process and work with JSON files
- aws: CLI AWS for work with the commands of this service
- rar: Enable extract rar files
add the folder in the terminal session
Add the location where you downloaded this project in your .bash_profile, this way you can easily run all command in the terminal
export PATH=$PATH:~/bin
Create configuration
Copy the file '.my_bash_profile.example' and replace the variables exported with your personal credentials, add to the reference for this file in your '.bash_profile' or the file name who contains your terminal session information
cp .my_bash_profile.example YOUR_LOCATION/.my_bash_profile
Recomendation
Always create the newly command files in the standard 'category-commandName.sh',
try use short names without use special char(e.g: _, -, .) for two word name use cameocase
default-variables usage
register in your script
source .default-variables
print a collored message
colloredValue [MESSAGE] [KIND=err|warn|succ]
use dinamic arguments, without order
$ my-command.sh --name "your name" --version "your version"
$ my-command.sh --version "your version" --name "your name"
display help of your command
Keep in mind the output will be the content of the filename in 'docs' folder, with the same name of your command in the extension 'txt'
$ my-command.sh --help
$ my-command.sh -h
2.0.0
3 years ago