Skip to content

Commit 01c9145

Browse files
Merge pull request #6 from thesecondchude-spec/assignment
assignment for chude
2 parents 210e0f1 + 5835420 commit 01c9145

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

02_activities/assignments/assignment.sh

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,22 @@ 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+
cd data
38+
mkdir -p processed/server_logs processed/user_logs processed/event_logs
3839
# 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-
40+
cp raw/*server*.log processed/server_logs/
4041
# 6. Repeat the above step for user logs and event logs
41-
42+
cp raw/*user*.log processed/user_logs/
43+
cp raw/*event*.log processed/event_logs/
4244
# 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-
45+
rm -f raw/*ipaddr*
46+
rm -f processed/user_logs/*ipaddr*
4447
# 8. Create a file named ./data/inventory.txt that lists all the files in the subfolders of ./data/processed
4548

4649

0 commit comments

Comments
 (0)