Skip to content

Commit 32f273b

Browse files
committed
Uploadng script to folder
1 parent a315bf8 commit 32f273b

2 files changed

Lines changed: 11 additions & 63 deletions

File tree

02_activities/assignments/assignment.sh

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ cd newproject
1818

1919
mkdir analysis output
2020
touch README.md
21-
echo "# Project Name: DSI Consulting Inc." > README.md
2221
touch analysis/main.py
2322

2423
# download client data
@@ -29,24 +28,24 @@ unzip -q rawdata.zip
2928
# Complete assignment here
3029

3130
# 1. Create a directory named data
32-
31+
mkdir data
3332
# 2. Move the ./rawdata directory to ./data/raw (eg. move it into ./data and rename it to raw)
34-
33+
mv ./rawdata ./data/raw
3534
# 3. List the contents of the ./data/raw directory
36-
35+
ls ./data/raw
3736
# 4. Create the directory ./data/processed,
3837
# then create the following sub-directories within it: server_logs, user_logs, and event_logs
39-
38+
mkdir ./data/processed
39+
mkdir server_logs user_logs event_logs
4040
# 5. Copy all server log files (files with "server" in the name AND a .log extension) from ./data/raw to ./data/processed/server_logs
41-
41+
cp ./data/raw/*server*.log ./data/processed/server_logs
4242
# 6. Repeat the above step for user logs and event logs
43-
43+
cp ./data/raw/*user*.log ./data/processed/user_logs
44+
cp ./data/raw/*event*.log ./data/processed/event_logs
4445
# 7. For user privacy, remove all files containing IP addresses (files with "ipaddr" in the filename) from ./data/raw and ./data/processed/user_logs
45-
rf -rf ./data
46-
46+
rm ./data/raw/*ipaddr* ./data/processed/user_logs/*ipaddr*
4747
# 8. Create a file named ./data/inventory.txt that lists all the files in the subfolders of ./data/processed
48-
49-
48+
find ./data/processed -type f | sort > ./data/inventory.txt
5049
###########################################
5150

52-
echo "Project setup is complete!"
51+
echo "Project setup is complete!"

assignment.sh

Lines changed: 0 additions & 51 deletions
This file was deleted.

0 commit comments

Comments
 (0)