Skip to content

Commit

Permalink
Review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
illicitonion committed Dec 3, 2024
1 parent 008bd13 commit 7a41da6
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 11 deletions.
2 changes: 1 addition & 1 deletion common-content/en/module/tools/awk/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ emoji= "💻"

(Source, including text-only transcript: https://wizardzines.com/comics/awk/)

Learn about it from its man page (and the backlog exercises).
Learn about `awk` from its man page (and the backlog exercises).

Some awk programs you should understand and be able to write:
* `{print $2}`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ You can skip the Binary Logic section (but feel free to read it if you're curiou

Do every exercise listed in the chapters.

Make sure you have achieved the learning objectives listed on this page.
Check you have achieved each learning objective listed on this page.
2 changes: 1 addition & 1 deletion common-content/en/module/tools/cat-2/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ The man page contains a lot more information too. The man page lists everything

Both can be useful.

Make sure you have achieved the learning objectives, between reading the two sources.
Check you have achieved each learning objective listed on this page.
2 changes: 1 addition & 1 deletion common-content/en/module/tools/cpu-and-memory/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ Read chapter 7 of How Computers Really Work.

Do every exercise listed in the chapters.

Make sure you have achieved the learning objectives listed on this page.
Check you have achieved each learning objective listed on this page.
2 changes: 1 addition & 1 deletion common-content/en/module/tools/grep/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ For instance, the regular expression `^[0-9]*$` searches for a line which has on

You can learn more about Regular Expressions at [RegexOne](https://regexone.com/). Many engineers just know the basic concepts, and Google for help when they need something more complicated, and this is fine.

Learn about it from its man page (and the backlog exercises).
Learn about `grep` from its man page (and the backlog exercises).

Some commonly used flags you should understand:
* `-c`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ file1 file2
```

Here we are saying: At a terminal prompt (signified by the `%`), run the command `ls`.\
Below the command is some expected or example output (`file1 file2`) you will see when you run it.
Below the command is the output (`file1 file2`) you should expect to see after you run the command. Sometimes this is the exact output you should expect. Sometimes _example_ outputs are given: these could vary according to your filesystem, username, or other variables.

To call a program, we type its name and press enter. Open a terminal and run:

Expand Down Expand Up @@ -60,6 +60,6 @@ Some programs take extra arguments. These may be optional or required. Extra arg

Here we passed the optional argument `-r` and the optional argument `-B`. `-r` takes no value. We gave `-B` the value 1.

We could give flags in any order - `grep -B 1 -r "hello" .` works the same as `grep -r -B 1 "hello" .`.
We call arguments that start with a `-` or `--` flags. We could give flags in any order - `grep -B 1 -r "hello" .` works the same as `grep -r -B 1 "hello" .`.

`"hello"` and `.` are called positional arguments because they don't have a named flag before them. The program decides how to interpret them based on their position (order) in the command line, rather than a named flag coming before them. Their order matters.
2 changes: 1 addition & 1 deletion common-content/en/module/tools/ls/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ emoji= "💻"

`ls` is a tool for listing the files in a directory.

Learn about it from its man page (and the backlog exercises).
Learn about `ls` from its man page (and the backlog exercises).

Some commonly used flags you should understand:
* `-R`
Expand Down
20 changes: 18 additions & 2 deletions common-content/en/module/tools/sed/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,25 @@ emoji= "💻"

`sed` executes a list of commands on a file. The most common commands are to replace some text with some other text, or to show or hide or delete lines that meet some criteria.

Sed commands feature both a matcher (called an "address") specifying which lines to operate on, and an opeation (called a command) to perform on those lines.
Sed commands feature both a matcher (called an "address") specifying which lines to operate on, and an operation (called a command) to perform on those lines.

Learn about it from its man page (and the backlog exercises).
{{<note type="Example">}}
`sed '1,3 s/cat/dog/' some-file`

Address: `1,3` - lines 1-3 of `some-file`\
Command: `s/cat/dog/` - replace the first occurence of "cat" on each line with "dog"
{{</note>}}

If you don't specify an address, your command applies to the whole file:

{{<note type="Example">}}
`sed 's/cat/dog/' some-file`

Address: Not specified, so every line of `some-file`\
Command: `s/cat/dog/` - replace the first occurence of "cat" on each line with "dog"
{{</note>}}

Learn about `sed` from its man page (and the backlog exercises).

Some sed commands you should understand and be able to write:
* `s/cat/dog/`
Expand Down
2 changes: 1 addition & 1 deletion common-content/en/module/tools/wc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ emoji= "💻"

`wc` is a tool for counting the bytes, words, or lines in a file.

Learn about it from its man page (and the backlog exercises).
Learn about `wc` from its man page (and the backlog exercises).

Some commonly used flags you should understand:
* `-c`
Expand Down

0 comments on commit 7a41da6

Please sign in to comment.