Skip to content

nogibjj/zw-project2-bash

Repository files navigation

zw-project2-bash

Welcome to Zhonglin's project #2 bash command line tool development.

In project 2, I created a command line tool to help us pull the data of top 100 global brands with branditory - 2022. The data is downloaded from Kaggle https://www.kaggle.com/datasets/gauravarora1091/top-100-global-brands-by-brandirectory2022

Data looks like

WX20221009-171002@2x

* : I developed three commands that allow users to access to each brand information, sort by the brand information, and use a neat print table to present the information, and these commands can be used via

docker run -it b20ff7e1f60f /bin/bash sort.sh brandirectory-ranking-global-2022.csv

docker run -it b20ff7e1f60f /bin/bash read_n.sh brandirectory-ranking-global-2022.csv

docker run -it b20ff7e1f60f /bin/bash neat.sh brandirectory-ranking-global-2022.csv

to pull the data from the repository.

Run in AWS Cloud9

aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 766481746749.dkr.ecr.us-east-1.amazonaws.com

截屏2022-10-09 下午6 06 05

docker tag 766481746749.dkr.ecr.us-east-1.amazonaws.com/zw277/project2 766481746749.dkr.ecr.us-east-1.amazonaws.com/p2zw277:latest

截屏2022-10-09 下午6 03 50

docker push 766481746749.dkr.ecr.us-east-1.amazonaws.com/p2zw277:latest

截屏2022-10-09 下午6 07 14

Now we can use our command line tool in the Cloud9:

First make sure that we have login to dockerhub and aws:

docker login -u zw277 -p $DOCKER_HUB

截屏2022-10-09 下午6 39 23

Then type the following code in the Cloud9 repo and it should give the pulling data.

docker run -it 766481746749.dkr.ecr.us-east-1.amazonaws.com/p2zw277:latest /bin/bash read_n.sh brandirectory-ranking-global-2022.csv

docker run -it 766481746749.dkr.ecr.us-east-1.amazonaws.com/p2zw277:latest /bin/bash sort.sh brandirectory-ranking-global-2022.csv

docker run -it 766481746749.dkr.ecr.us-east-1.amazonaws.com/p2zw277:latest /bin/bash neat.sh brandirectory-ranking-global-2022.csv

To obtain three ways of accessing the top 100 global brands with branditory data in 2022.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published