Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions 02_activities/assignments/assignment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ cd newproject

mkdir analysis output
touch README.md
echo "# Project Name: DSI Consulting Inc." > README.md
touch analysis/main.py

# download client data
Expand All @@ -28,22 +29,40 @@ unzip -q rawdata.zip
# Complete assignment here

# 1. Create a directory named data
mkdir data

# 2. Move the ./rawdata directory to ./data/raw (eg. move it into ./data and rename it to raw)
mv ./rawdata ./data/raw

# 3. List the contents of the ./data/raw directory
ls ./data/raw

# 4. Create the directory ./data/processed,
# then create the following sub-directories within it: server_logs, user_logs, and event_logs
mkdir -p ./data/processed/{server_logs,user_logs,event_logs}

# the above creates -p parent directory processed followed by creation of the 3 folders. The /{} is crucial
# this is a two-command option I originally thought about
# mkdir ./data/processed
# mkdir ./data/processed/server_logs ./data/processed/user_logs ./data/processed/event_logs

# 5. Copy all server log files (files with "server" in the name AND a .log extension) from ./data/raw to ./data/processed/server_logs
cp ./data/raw/*server*.log ./data/processed/server_logs

# 6. Repeat the above step for user logs and event logs
cp ./data/raw/*user*.log ./data/processed/user_logs
cp ./data/raw/*event*.log ./data/processed/event_logs

# 7. For user privacy, remove all files containing IP addresses (files with "ipaddr" in the filename) from ./data/raw and ./data/processed/user_logs
rm -f ./data/raw/*ipaddr* ./data/processed/user_logs/*ipaddr*

# the -f avoids an error if there are no matches with *ipaddr*

# 8. Create a file named ./data/inventory.txt that lists all the files in the subfolders of ./data/processed
ls -R ./data/processed > ./data/inventory.txt

# there is also a way to list all the files in the subdirectories without mentioning the names of the subdirectories. Outputs include full path names for all files
# find ./data/processed -type f > ./data/inventory.txt

###########################################

Expand Down
1 change: 1 addition & 0 deletions README.md → README.MD
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Unix shell
This document is an overview/syllabus for a Unix shell learning module, describing what you’ll learn, the required and optional activities, how to get help, key contacts, and links to resources plus the module’s repository folder structure.

## Content

Expand Down
144 changes: 144 additions & 0 deletions bob.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
# Unix shell
This document is an overview/syllabus for a Unix shell learning module, describing what you’ll learn, the required and optional activities, how to get help, key contacts, and links to resources plus the module’s repository folder structure.

## Content

* [Description](#description)
* [Learning Outcomes](#learning-outcomes)
* [Activities](#activities)
* [Contacts](#contacts)
* [Delivery of the Learning Module](#delivery-of-the-learning-module)
* [Schedule](#schedule)
* [Requirements](#requirements)
* [Resources](#resources)
+ [Cheat sheet](#cheat-sheet)
+ [Videos](#videos)
+ [How to Get Help](#how-to-get-help)
* [Folder Structure](#folder-structure)

## Description

This module introduces the Unix shell language and covers file and directory navigation and manipulation. Participants gain proficiency in various commands, script creation, and writing basic functions using pipes, filters, and loops.

Participants will acquire problem-solving skills through live coding sessions. Additionally, they will explore the concept of reproducibility and its integration into their work.

## Learning Outcomes
By the end of the module, participants will be able to:
* Comfortably access and navigate the terminal
* Create, modify, and delete directories and files


## Activities
This module has two types of activities.
1. Assignments are mandatory, and form part of your evaluation.
1. Practice problems are not assessed, but are provided to you for extra practice. We encourage you to work on them together and discuss solutions during Work Periods and on Slack.

### Assignments
Participants should review the [Assignment Submission Guide](https://github.com/UofT-DSI/onboarding/blob/main/onboarding_documents/submissions.md) for instructions on how to complete assignments in this module.

1. [Shell script assignment](./02_activities/assignments/assignment_instructions.md)

### Practice Problems
1. [Shell Basics](https://uoft-dsi.github.io/shell/interactive_problems.html#shell_basics)
1. [Shell Moderate](https://uoft-dsi.github.io/shell/interactive_problems.html#shell_moderate)
1. [Shell Advanced](./02_activities/practice/shell_advanced/shell_advanced.md)


## Contacts

**Questions can be submitted to the #cohort-8-help channel on Slack**

* Technical Facilitator:
* **Simeon Wong**
me@simeon.dev

* Learning Support Staff:
* **Dmytro Bonislavskyi**
dmytro.bonislavskyi@gmail.com
* **Moniz Chan**
chanmoniz526@gmail.com
* **Xindi Zhang**
xindi.zhang@mail.utoronto.ca

## Delivery of the Learning Module

This module will include live learning sessions and optional, asynchronous work periods. During live learning sessions, the Technical Facilitator will introduce and explain key concepts and demonstrate core skills. Learning is facilitated during this time. Before and after each live learning session, the instructional team will be available for questions related to the core concepts of the module. Optional work periods are to be used to seek help from peers, the Learning Support team, and to work through the practice problems and assignments in the learning module, with access to live help. Content is not facilitated, but rather this time should be driven by participants. We encourage participants to come to these work periods with questions and problems to work through.

Participants are encouraged to engage actively during the learning module. The key to developing the core skills in each learning module is through practice. The more participants engage in coding along with the instructional team, and applying the skills in each module, the more likely it is that these skills will solidify.

## Requirements

* Participants are not expected to have any coding experience; the learning content has been designed for beginners.
* Participants are encouraged to ask questions, and collaborate with others to enhance their learning experience.
* Participants must have a computer and an internet connection to participate in online activities.
* Participants must not use generative AI such as ChatGPT to generate code in order to complete assignments. It should be used as a supportive tool to seek out answers to questions you may have.
* We expect participants to have completed the steps in the [onboarding repo](https://github.com/UofT-DSI/onboarding/blob/main/environment_setup/README.md).
* We encourage participants to default to having their camera on at all times, and turning the camera off only as needed. This will greatly enhance the learning experience for all participants and provides real-time feedback for the instructional team.

## Resources

Feel free to use the following as resources:

### Cheat sheet
- [Devhints](https://devhints.io/bash)
- [Bash-Cheat-Sheet](https://github.com/RehanSaeed/Bash-Cheat-Sheet)

### Videos
- [Change Directory](https://www.youtube.com/watch?v=6U4XV4w8qtE)
- [Deleting Files and Directories](https://www.youtube.com/watch?v=-L3XeZPwj_Y)
- [Bash in 100 seconds](https://www.youtube.com/watch?v=I4EWvMFj37g)

### How to Get Help
#### 1. Gather information about your problem
- Copy and paste your error message
- Copy and paste the code that caused the error, and the last few commands leading up to the error
- Write down what you are trying to accomplish with your code. Include both the specific action, and the bigger picture and context
- (optional) Take a screenshot of your entire workspace

#### 2. Try searching the web for your error message
- Sometimes, the error has common solutions that can be easy to find!
- This will be faster than waiting for an answer
- If none of the solutions apply, consider asking a Generative AI tool
- Paste your code, the error message, and a description of your overall goals

#### 3. Try asking in your cohort's Slack help channel
- Since we're all working through the same material, there's a good chance one of your peers has encountered the same error, or has already solved it
- Try searching in the DSI Certificates Slack help channel for whether a similar query has been posted
- If the question has not yet been answered, post your question!
- Describe your overall goals, the context, and the specific details of what you were trying to accomplish
- Make sure to **copy and paste** your code, your error message
- Copying and pasting helps:
1. Your peers and teaching team quickly try out your code
1. Others to find your question in the future

#### Great resources on how to ask good technical questions that get useful answers
- [Asking for Help - The Odin Project](https://www.theodinproject.com/lessons/foundations-asking-for-help)
- [How do I ask a good question? - Stack Overflow](https://stackoverflow.com/help/how-to-ask)
- [The XY problem: A question pitfall that won't get useful answers](https://xyproblem.info/)
- [How to create a minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example)

## Folder Structure
Below is an outline of the folder structure for this module:
```
.
├── .github
├── 01_materials
├── 02_activities
├── 03_instructional_team
├── 04_this_cohort
├── .gitignore
├── LICENSE
├── SETUP.md
└── README.md

```
* **.github**: Contains issue templates and pull request templates for the repository.
* **materials**: Module slides and interactive notebooks (.ipynb files) used during learning sessions.
* **activities**: Contains graded assignments and ungraded practice problems to apply concepts covered in the learning module.
* **instructional_team**: Resources for the instructional team.
* **this_cohort**: Additional materials for this cohort.
* **.gitignore**: Files to exclude from this repository, specified by the Technical Facilitator.
* **LICENSE**: The license for this repository.
* **SETUP.md**: Contains the steps required to set up this repo for the module.
* **README.md**: This file.