seed: curriculum content
This commit is contained in:
36
1.solar-system/1.welcome/08.the-searcher/index.md
Normal file
36
1.solar-system/1.welcome/08.the-searcher/index.md
Normal file
@@ -0,0 +1,36 @@
|
||||
---
|
||||
type: challenge
|
||||
title: "The Searcher"
|
||||
xp: 75
|
||||
duration: 30
|
||||
difficulty: 3
|
||||
---
|
||||
|
||||
# The Searcher
|
||||
|
||||
> **[INCOMING — Mission Control, Earth]**
|
||||
>
|
||||
> Cadet, an archive arrived. Somewhere in it, a single log file
|
||||
> mentions the word `BREACH`. We need it found.
|
||||
>
|
||||
> Two commands:
|
||||
>
|
||||
> - `find <path> -name "<pattern>"` — locate files by name
|
||||
> - `grep -rl "<text>" <path>` — search file contents recursively,
|
||||
> list only the matching file paths
|
||||
>
|
||||
> Your script must produce two files:
|
||||
>
|
||||
> 1. `logs.txt` — every `.log` file under `archive/`
|
||||
> 2. `breach.txt` — the path to the file containing `BREACH`
|
||||
>
|
||||
> [END TRANSMISSION]
|
||||
|
||||
## Your Task
|
||||
|
||||
In `starter/starter.sh`, write the two commands.
|
||||
|
||||
## Objectives
|
||||
|
||||
- `logs.txt` lists every `.log` file under `archive/`
|
||||
- `breach.txt` contains the path to the file mentioning `BREACH`
|
||||
Reference in New Issue
Block a user