Skip to content

smex/DevOps-BootCamp-Bash-Final-Project

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DevOps BootCamp: Bash Final Project

Task

Story

Your college has developed a script to upload files from terminal to https://transfer.sh Unfourtenetly, he has left the company. The script isn't working now. Your team asked for a new functionality to download uploaded files.

Create a script which will upload and download file from transfer.sh. Add a description in the beggining of the script and comment the code. Please also follow the Bash Style Guide.

Checks

Upload

Upload should support uploading multiple files, as in example:

user@laptop:~$ ./transfer.sh test.txt test2.txt
Uploading test.txt
####################################################### 100.0%
Transfer File URL: https://transfer.sh/Mij6ca/test.txt
Uploading test2.txt
####################################################### 100.0%
Transfer File URL: https://transfer.sh/Msfddf/test2.txt

Download

Add a download flag -d which would download single file from the transfer.sh to the specified directory: Progress bar should be in output. (Hint: check flags)

⚠️ Create a function for downloading files: singleDowload and for returning the result: printDownloadResponse

user@laptop:~$ ls 
test test.txt transfer.sh

user@laptop:~$ ./transfer.sh -d ./test Mij6ca test.txt
Downloading test.txt
####################################################### 100.0%
Success!

Help

Add a help flag -h to output the help message with decription, how to work with the script:

user@laptop:~$ ./transfer.sh -h
Description: Bash tool to transfer files from the command line.
Usage:
  -d  ...
  -h  Show the help ... 
  -v  Get the tool version
Examples:
<Write a couple of examples, how to use your tool>
./transfer.sh test.txt ...

Version

Add a flag to upload your script version:

user@laptop:~$ ./transfer.sh -v
0.0.1

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 68.4%
  • Shell 31.6%