Skip to content

djarecka/shell_dj2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Week 2

In the second week:

  • we will learn more about the Shell
  • we will use Shell commands that could be used to check the content of the files
  • we will use pipes in Shell commands

1 📖 More about Shell

Software Carpentry provide an excellent introduction to Shell, I recommend reading these two parts to learn about Shell and command syntax:

2 📖 Week 1 review

If you would like to read more from Software Carpentry to review week 1:

3. 👀 Working with files content

  • 👀 Video 👀: Continue watching the ABCD/ReproNim video (the video should open at timestamp 20m3s, and you should watch till 28m45s)
  • Use man to read more about commands:

4. ⌨️ Practice using new commands

In the new branch that was created for this week week2 you will find a new directory week2 that will be used as a working directory for this week. Practice using new commands (especially cat, head and tail) for the files in ex1 and ex2 directories. Use man to learn about different options.

Tip

If you don't remember how to open Codespace, create a new file and add to the repository, you can review instruction from the previous week here

5. ⌨️ ✅ Exercise 1: Merging content of the files

In the new branch that was created for this week week2 you will find a new directory week2 that will be used as a working directory for this week. You should specifically use week2/ex1 for the first exercise. The directory already have 3 files.

Your first exercise will be to open Codespace and merge content of the files in the alphabetic order to a new file week2/ex1/output.txt.

6. ⌨️ ✅ Exercise 2: Using Pipes to work with file content

In the week2/ex2 directory you have a file with Massachusetts cities ordered by the population size. I want you to use pipes to sort the cities alphabetically and create a new file week2/ex2/output.txt with the top 10 cities.

Important

Update the repository in order to move to the next week/part of the course:

  • Create a Pull Request to the main branch
  • Check the status of tests
  • If all tests pass, merge the Pull Request, this should update a new README.md on the main page of the repository (you can reload the page after 30-60s if you don't see the new content)

Get help: Submit an issue

Acknowledgment: This work was supported by the Better Scientific Software Fellowship Program, a collaborative effort of the U.S. Department of Energy (DOE), Office of Advanced Scientific Research via ANL under Contract DE-AC02-06CH11357 and the National Nuclear Security Administration Advanced Simulation and Computing Program via LLNL under Contract DE-AC52-07NA27344; and by the National Science Foundation (NSF) via SHI under Grant No. 2327079.

About

My fork

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •