Local β child scripts cannot see this
Behind a heavy iron door, the Vault holds the dungeon's most closely guarded secrets β not gold and jewels, but the invisible variables that shape every shell. Set them correctly, or the ghost devours you.
πΉοΈ Play This Chamber¶
This page is your walkthrough and strategy guide β play right here in the browser, then follow the steps below.
{% include bashcrawl-terminal.html room="Vault" %}
π― Quest Objectives¶
- Set and read shell variables with
=and$VAR - Export a variable with
exportso child processes see it - Use
envandprintenvto inspect the shell environment - Solve the goblet puzzle in the stronghold
- Survive the ghost encounter in the lab
- Collect the vault key fragment
πΊοΈ Quest Prerequisites¶
- Cellar side-quest complete
- Emerald amulet in inventory
β‘ Command Cheatsheet¶
| Command | What It Does |
|---|---|
VAR=value |
Set a shell variable (local to current shell) |
export VAR=value |
Set and export to child processes |
echo $VAR |
Print a variable's value |
env |
Show all exported environment variables |
printenv VAR |
Print a specific env variable |
unset VAR |
Remove a variable |
export -p |
List all exports in a reusable format |
Local vs Exported Variables¶
# Local β child scripts cannot see this:
SECRET=password
# Exported β child scripts and subshells inherit it:
export SECRET=password
# Verify inheritance:
export GREETING="Hello Dungeon"
bash -c 'echo $GREETING' # prints: Hello Dungeon
πΊοΈ Walkthrough¶
Step 1 β Enter the vault and read the stronghold scroll¶
cd .VAULT # The vault may be hidden β use ls -a
ls -F
# stronghold/ nursery/ lab/ vault_scroll
cat vault_scroll
The scroll explains that each sub-area requires a specific environment variable to be set correctly.
Step 2 β Stronghold: solve the goblet puzzle¶
cd stronghold
ls -F
# goblet* inscription
cat inscription
# "The goblet demands the colour of magic. Set MAGIC_COLOR before running ./goblet."
export MAGIC_COLOR="purple"
./goblet
# The goblet glows purple. Correct!
# Vault door unlocked.
Different game sessions may demand different values. Read the inscription carefully.
Step 3 β Nursery: learn about local variables¶
cd ../nursery
ls
# seeds growth_chart care_notes
cat care_notes
# "PLANT_NAME must be set to continue growing."
export PLANT_NAME="moonflower"
cat growth_chart
The nursery teaches that variables can store any string β command output, paths, names.
Step 4 β Lab: the ghost encounter¶
cd ../lab
ls -a
# ghost* .formula beakers/
cat .formula
# "To banish the ghost: set GHOST_BANISH to the name found in the beakers."
ls beakers/
cat beakers/vial_7
# Value: "iron_salt"
export GHOST_BANISH="iron_salt"
./ghost
# Ghost banished! The lab is safe.
If
GHOST_BANISHis not set or wrong,./ghostreduces your HP substantially.
Step 5 β Verify your environment¶
env | grep -E "MAGIC_COLOR|GHOST_BANISH|PLANT_NAME"
# MAGIC_COLOR=purple
# GHOST_BANISH=iron_salt
# PLANT_NAME=moonflower
Step 6 β Collect the vault key fragment¶
π‘ Common Pitfalls¶
| Problem | Cause | Fix |
|---|---|---|
$VAR prints empty |
Variable not exported | Use export VAR=value |
| Ghost still attacks | Wrong value in GHOST_BANISH |
Re-read .formula and beaker vial |
env shows nothing |
Non-exported variable | Use export or check with set | grep VAR |
./goblet says "wrong" |
Case mismatch | Variable values are case-sensitive |
β Validation¶
- You understand the difference between local and exported variables
- You ran
envand found your variables in the output - The goblet puzzle is solved
- The ghost is banished
- The vault key fragment is in your inventory
β‘οΈ Next Steps¶
- Complete other branches β Hidden Chapel Β· Scrap
- Enter the final gauntlet β The Rift
- Back to hub β Bashcrawl Hub
{% include bashcrawl-play-local.html %}
π External Resources¶
Continue your terminal adventure with these resources:
- Bashcrawl Web Demo β Play in your browser, no installation required
- Bashcrawl on GitHub β Source code, setup, and open contributions
- GNU Bash Manual β Environment β Variables and the shell realm
- IT-Journey Bashcrawl Hub β Full quest series and walkthroughs
- Linux Environment Variables β Master the realm of variables
The ghost dissolves. Variables mastered. The vault yields its secrets. π
πΈοΈ Knowledge Graph¶
Structured wiki-links connect this quest to the IT-Journey knowledge graph. Open the Obsidian Graph View to explore connections.
Level hub: [[Level 0000 - Foundation & Init World]] Overworld: [[π° Overworld - Master Quest Map]] Prerequisites: [[Bashcrawl Cellar: File Types, Aliases, and Emerald Amulet]] Unlocks: [[Bashcrawl Rift: Pipes, Redirection, and the Final Boss]] Sequel quests: [[Bashcrawl Rift: Pipes, Redirection, and the Final Boss]] Obsidian docs: [[Obsidian Knowledge Graph and Wiki Links]]