QUESTION 4: Incomplete answer

Fredrick Mbilo:
QUESTION 4: Incomplete answer

Aaron Lockhart:
@Fredrick Mbilo, your script shouldn’t require sudo before the commands, and it should also be accomplished in a single tar command. Once you’ve rewritten it, remember to make it executable and run it.

Bruno Domingues:
tar cvzf archive.tar.gz dir1
chmod +x script.sh
./script.sh

Fredrick Mbilo:
Yeah, the former solution was incomplete.