seed: curriculum content

This commit is contained in:
2026-05-07 14:32:44 +00:00
parent 9258534803
commit ec76f4f56b
100 changed files with 2846 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
---
type: challenge
title: "Hello, World"
xp: 25
duration: 15
difficulty: 1
---
# Hello, World
> **[INCOMING — Mission Control, Earth]**
>
> Cadet, first signal. Write a script that creates `hello.txt`
> containing exactly:
>
> ```
> Hello, World
> ```
>
> Two commands:
>
> - `echo` prints text
> - `>` redirects what would print into a file
>
> [END TRANSMISSION]
## Your Task
In `starter/starter.sh`, write the command(s) that create `hello.txt`
with the content `Hello, World`.
## Objectives
- `hello.txt` exists in the working directory
- File contents match `Hello, World` exactly

View File

@@ -0,0 +1,6 @@
#!/bin/bash
# Hello, World — your first script.
# Write the line "Hello, World" into a file called hello.txt
# in the current directory.
# Your code here.

View File

@@ -0,0 +1,16 @@
#!/bin/bash
bash solution.sh > /dev/null 2>&1
if [ -f hello.txt ]; then
echo "ok 1 - hello.txt is created"
else
echo "not ok 1 - hello.txt is created"
fi
ACTUAL=$(cat hello.txt 2>/dev/null)
ACTUAL="${ACTUAL%$'\n'}"
if [ "$ACTUAL" = "Hello, World" ]; then
echo "ok 2 - hello.txt contains 'Hello, World'"
else
echo "not ok 2 - hello.txt contains 'Hello, World'"
fi