Skip to content

Commit 51fb597

Browse files
committed
Attempted all parts of the assignment
1 parent cbd8a07 commit 51fb597

2 files changed

Lines changed: 18 additions & 7 deletions

File tree

02_activities/assignments/assignment.sh

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,30 @@ unzip -q rawdata.zip
3131
mkdir data
3232

3333
# 2. Move the ./rawdata directory to ./data/raw
34-
34+
cp ./rawdata/* ./data/raw
3535
# 3. List the contents of the ./data/raw directory
36-
ls
36+
cd ./data/raw
37+
ls
3738
# 4. In ./data/processed, create the following directories: server_logs, user_logs, and event_logs
38-
39+
cd ..
40+
cd processed
41+
mkdir server_logs user_logs event_logs
3942
# 5. Copy all server log files (files with "server" in the name AND a .log extension) from ./data/raw to ./data/processed/server_logs
40-
43+
cd..
44+
cp *server*.log ./data/processed/server_logs
4145
# 6. Repeat the above step for user logs and event logs
42-
46+
cp *user*.log ./data/processed/user_logs
47+
cp *event*.log ./data/processed/event_logs
4348
# 7. For user privacy, remove all files containing IP addresses (files with "ipaddr" in the filename) from ./data/raw and ./data/processed/user_logs
44-
49+
cd ./data/raw
50+
rm *ipaddr*
51+
cd ./data/processed/user_logs
52+
rm *ipaddr*
4553
# 8. Create a file named ./data/inventory.txt that lists all the files in the subfolders of ./data/processed
46-
54+
cd ../
55+
touch ./data/inventory.txt
56+
find ./data/processed -type f > inventory.txt
57+
cat inventory.txt
4758

4859
###########################################
4960

02_activities/inventory.txt

Whitespace-only changes.

0 commit comments

Comments
 (0)