os_cp:redirects_pipes
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| os_cp:redirects_pipes [2024/03/19 22:23] – [The details] jkonczak | os_cp:redirects_pipes [2026/03/24 13:33] (current) – [more, less] jkonczak | ||
|---|---|---|---|
| Line 14: | Line 14: | ||
| < | < | ||
| + | '' | ||
| + | parses two sorted files and prints their lines joined on specified fields. | ||
| + | |||
| '' | '' | ||
| forcing a line break whenever a line would exceed //width// (that defaults to 80). | forcing a line break whenever a line would exceed //width// (that defaults to 80). | ||
| Line 43: | Line 46: | ||
| ==== Printing text ==== | ==== Printing text ==== | ||
| - | '' | + | '' |
| - | The '' | + | < |
| - | becomes a tab and '' | + | '' |
| + | but there is no consensus on how to interpret switches and how to treat | ||
| + | backslashes in the text. | ||
| + | \\ | ||
| + | In Bash, the | ||
| + | escapes into corresponding characters, e.g., '' | ||
| + | a newline (cf. manual). | ||
| + | </ | ||
| '' | '' | ||
| < | < | ||
| - | '' | + | Here and there, the course materials make use of the following toy commands: |
| + | \\ | ||
| + | '' | ||
| + | \\ | ||
| '' | '' | ||
| </ | </ | ||
| Line 57: | Line 69: | ||
| ++++ Examples | {{page> | ++++ Examples | {{page> | ||
| - | ~~Exercise.# | + | ~~Exercise.# |
| ~~Exercise.# | ~~Exercise.# | ||
| Line 170: | Line 182: | ||
| ~~Exercise.# | ~~Exercise.# | ||
| + | |||
| + | ++++ Examples | {{page> | ||
| === Input redirections === | === Input redirections === | ||
| Line 198: | Line 212: | ||
| ~~Exercise.# | ~~Exercise.# | ||
| + | |||
| + | ++++ Examples | {{page> | ||
| < | < | ||
| Line 330: | Line 346: | ||
| ~~Exercise.# | ~~Exercise.# | ||
| in one terminal, and redirect output of '' | in one terminal, and redirect output of '' | ||
| - | \\ Then repeat the commands, running the'' | + | \\ Then repeat the commands, running the '' |
| </ | </ | ||
| + | |||
| + | ++++ Examples | {{page> | ||
| ===== Filters ===== | ===== Filters ===== | ||
| Line 360: | Line 378: | ||
| ~~Exercise.# | ~~Exercise.# | ||
| terminal and append (with output redirection) some data to //file//. | terminal and append (with output redirection) some data to //file//. | ||
| + | |||
| + | ++++ Examples | {{page> | ||
| ==== grep ==== | ==== grep ==== | ||
| Line 371: | Line 391: | ||
| < | < | ||
| The '' | The '' | ||
| - | POSIX [[https:// | + | POSIX [[https:// |
| basic (default for '' | basic (default for '' | ||
| '' | '' | ||
| Line 406: | Line 426: | ||
| \\ | \\ | ||
| List all files containing '' | List all files containing '' | ||
| + | |||
| + | ++++ Examples | {{page> | ||
| ==== cut ==== | ==== cut ==== | ||
| Line 427: | Line 449: | ||
| '' | '' | ||
| it. | it. | ||
| + | |||
| + | ++++ Examples | {{page> | ||
| ==== sort ==== | ==== sort ==== | ||
| Line 471: | Line 495: | ||
| ~~Exercise.# | ~~Exercise.# | ||
| </ | </ | ||
| + | |||
| + | ++++ Examples | {{page> | ||
| ==== wc, uniq, nl ==== | ==== wc, uniq, nl ==== | ||
| Line 503: | Line 529: | ||
| \\ | \\ | ||
| Then pipe it through '' | Then pipe it through '' | ||
| + | |||
| + | ++++ Examples | {{page> | ||
| < | < | ||
| Line 537: | Line 565: | ||
| * to squeeze all spaces | * to squeeze all spaces | ||
| * remove all the letters '' | * remove all the letters '' | ||
| + | |||
| + | ++++ Examples | {{page> | ||
| < | < | ||
| Line 579: | Line 609: | ||
| not human-readable file format. | not human-readable file format. | ||
| \\ | \\ | ||
| - | '' | + | '' |
| of this feature. | of this feature. | ||
| </ | </ | ||
os_cp/redirects_pipes.1710886985.txt.gz · Last modified: (external edit)