Skip to content

Commit 16b00df

Browse files
committed
I completed part 1 assignment
1 parent 871d0a5 commit 16b00df

1 file changed

Lines changed: 13 additions & 8 deletions

File tree

02_activities/assignments/assignment.sh

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,26 @@ unzip -q rawdata.zip
2828
# Complete assignment here
2929

3030
# 1. Create a directory named data
31-
31+
mkdir data
3232
# 2. Move the ./rawdata directory to ./data/raw
33-
33+
mv rawdata data/raw
3434
# 3. List the contents of the ./data/raw directory
35-
35+
ls data/raw
3636
# 4. In ./data/processed, create the following directories: server_logs, user_logs, and event_logs
37-
37+
mkdir data/processed
38+
mkdir data/processed/server_logs
39+
mkdir data/processed/user_logs
40+
mkdir data/processed/event_logs
3841
# 5. Copy all server log files (files with "server" in the name AND a .log extension) from ./data/raw to ./data/processed/server_logs
39-
42+
cp data/raw/*server*.log data/processed/server_logs
4043
# 6. Repeat the above step for user logs and event logs
41-
44+
cp data/raw/*user*.log data/processed/user_logs
45+
cp data/raw/*event*.log data/processed/event_logs
4246
# 7. For user privacy, remove all files containing IP addresses (files with "ipaddr" in the filename) from ./data/raw and ./data/processed/user_logs
43-
47+
rm -f data/raw/*ipaddr*
48+
rm -f data/processed/user_logs/*ipaddr*
4449
# 8. Create a file named ./data/inventory.txt that lists all the files in the subfolders of ./data/processed
45-
50+
find data/processed -type f > data//inventory.txt
4651

4752
###########################################
4853

0 commit comments

Comments
 (0)