@@ -18,7 +18,6 @@ cd newproject
1818
1919mkdir analysis output
2020touch README.md
21- echo " # Project Name: DSI Consulting Inc." > README.md
2221touch 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!"
0 commit comments