mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-08 11:30:12 +08:00
quests requirement update
This commit is contained in:
1 parent
821386a0e4
commit
814ca72040
12 files changed
+337
-247
No files matched your search
@@ -4,6 +4,9 @@ instruction: |
|
|||||||
|
|
||||||
請輸入 `echo start` 來開始這一關。
|
請輸入 `echo start` 來開始這一關。
|
||||||
|
|
||||||
|
requirements:
|
||||||
|
- get-started
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- id: warning-01
|
- id: warning-01
|
||||||
repeatable: true
|
repeatable: true
|
||||||
|
|||||||
@@ -5,6 +5,9 @@ instruction: |
|
|||||||
2. 如何使用 `mkdir` 建立資料夾
|
2. 如何使用 `mkdir` 建立資料夾
|
||||||
準備好就輸入 `echo start` 開始吧!
|
準備好就輸入 `echo start` 開始吧!
|
||||||
|
|
||||||
|
requirements:
|
||||||
|
- read
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- id: start
|
- id: start
|
||||||
task: 輸入 `echo start` 來開始
|
task: 輸入 `echo start` 來開始
|
||||||
|
|||||||
+56
-9
@@ -6,6 +6,9 @@ instruction: |
|
|||||||
|
|
||||||
請輸入 `echo start` 來開始這一關。
|
請輸入 `echo start` 來開始這一關。
|
||||||
|
|
||||||
|
requirements:
|
||||||
|
- get-started
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- id: warning-01
|
- id: warning-01
|
||||||
repeatable: true
|
repeatable: true
|
||||||
@@ -22,8 +25,7 @@ stages:
|
|||||||
output:
|
output:
|
||||||
- ^start$
|
- ^start$
|
||||||
responses:
|
responses:
|
||||||
- type: narrative
|
- content:
|
||||||
content:
|
|
||||||
- 在終端機中,並沒有圖形介面可以讓你查看資料夾的內容。
|
- 在終端機中,並沒有圖形介面可以讓你查看資料夾的內容。
|
||||||
- 但是你可以透過 `ls` 指令來查看資料夾的內容。
|
- 但是你可以透過 `ls` 指令來查看資料夾的內容。
|
||||||
- '`ls` 指令是 list 的縮寫,也就是列出檔案的意思。'
|
- '`ls` 指令是 list 的縮寫,也就是列出檔案的意思。'
|
||||||
@@ -39,11 +41,6 @@ stages:
|
|||||||
condition:
|
condition:
|
||||||
command:
|
command:
|
||||||
- ^ls$
|
- ^ls$
|
||||||
files:
|
|
||||||
- path: folder1
|
|
||||||
type: folder
|
|
||||||
- path: folder2
|
|
||||||
type: folder
|
|
||||||
responses:
|
responses:
|
||||||
- type: dialogue
|
- type: dialogue
|
||||||
speaker: Unix 精靈
|
speaker: Unix 精靈
|
||||||
@@ -90,7 +87,7 @@ stages:
|
|||||||
- 你成功的進入 `folder1` 資料夾了。
|
- 你成功的進入 `folder1` 資料夾了。
|
||||||
- 你可以發現指令提示符從原本的
|
- 你可以發現指令提示符從原本的
|
||||||
- '`commander:~ $` 變成了'
|
- '`commander:~ $` 變成了'
|
||||||
- '`commander:~/folder1 $'
|
- '`commander:~/folder1 $` 。'
|
||||||
- 這表示你現在正位在 `folder1` 資料夾中。
|
- 這表示你現在正位在 `folder1` 資料夾中。
|
||||||
- 現在,請試著查看 `folder1` 資料夾的內容。
|
- 現在,請試著查看 `folder1` 資料夾的內容。
|
||||||
hints:
|
hints:
|
||||||
@@ -140,4 +137,54 @@ stages:
|
|||||||
- type: narrative
|
- type: narrative
|
||||||
content:
|
content:
|
||||||
- 你成功的回到上一層資料夾了。
|
- 你成功的回到上一層資料夾了。
|
||||||
- 現在,請你試著進入 `folder2` 資料夾。
|
- 現在,請你剛才所學的指令,進入 `folder2` 資料夾,檢查 `folder2` 資料夾的內容,最後回到這個資料夾。
|
||||||
|
hints:
|
||||||
|
- ➤ 使用 `cd` 指令進出資料夾
|
||||||
|
- ➤ 使用 `ls` 指令查看資料夾的內容
|
||||||
|
|
||||||
|
- id: cd-folder2
|
||||||
|
task: 進入 `folder2` 資料夾
|
||||||
|
requirements:
|
||||||
|
- cd-..
|
||||||
|
condition:
|
||||||
|
pwd:
|
||||||
|
- /home/commander/folder2
|
||||||
|
responses:
|
||||||
|
- content:
|
||||||
|
- 你成功的進入 `folder2` 資料夾了。
|
||||||
|
- 現在,請你查看 `folder2` 資料夾的內容。
|
||||||
|
hints:
|
||||||
|
- ➤ 使用 `ls` 查看資料夾的內容
|
||||||
|
|
||||||
|
- id: ls-folder2
|
||||||
|
task: 查看 `folder2` 資料夾的內容
|
||||||
|
requirements:
|
||||||
|
- cd-folder2
|
||||||
|
condition:
|
||||||
|
pwd:
|
||||||
|
- /home/commander/folder2
|
||||||
|
command:
|
||||||
|
- ls
|
||||||
|
responses:
|
||||||
|
- type: narrative
|
||||||
|
content:
|
||||||
|
- 你看到了 `folder2` 資料夾中的檔案,分別是 `file3.txt` 跟 `file4.txt`。
|
||||||
|
- 現在你可以離開 `folder2` 回到原本的資料夾了。
|
||||||
|
hints:
|
||||||
|
- ➤ 使用 `cd ..` 回到上一層資料夾
|
||||||
|
|
||||||
|
- id: END
|
||||||
|
task: 回到原本的資料夾
|
||||||
|
requirements:
|
||||||
|
- ls-folder2
|
||||||
|
condition:
|
||||||
|
pwd:
|
||||||
|
- /home/commander
|
||||||
|
responses:
|
||||||
|
- type: narrative
|
||||||
|
content:
|
||||||
|
- 你成功的回到原本的資料夾了。
|
||||||
|
- 恭喜你學會了 `ls` 和 `cd` 指令的用法。
|
||||||
|
hints:
|
||||||
|
- ➤ 使用 `cd` 指令進出資料夾
|
||||||
|
- ➤ 使用 `ls` 指令查看資料夾的內容
|
||||||
@@ -4,6 +4,9 @@ instruction: |
|
|||||||
你感到腦中有某個聲音跟你說:
|
你感到腦中有某個聲音跟你說:
|
||||||
「使用 `echo [ 咒語 ]` 指令來朗誦咒語 "help" 」
|
「使用 `echo [ 咒語 ]` 指令來朗誦咒語 "help" 」
|
||||||
|
|
||||||
|
requirements:
|
||||||
|
- remove
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- id: help
|
- id: help
|
||||||
task: 輸入 `echo help` 來朗誦咒語
|
task: 輸入 `echo help` 來朗誦咒語
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ quests:
|
|||||||
- get-started
|
- get-started
|
||||||
|
|
||||||
- cast
|
- cast
|
||||||
|
|
||||||
- explore
|
- explore
|
||||||
|
|
||||||
- read
|
- read
|
||||||
|
|||||||
+107
-92
@@ -1,9 +1,14 @@
|
|||||||
title: 在終端機上顯示文字
|
title: 在終端機中查看檔案的內容
|
||||||
instruction: |
|
instruction: |
|
||||||
在這一關,你將會學到如何使用 `echo` 指令,以及它在遊戲中的特殊功能。
|
在這個關卡中,你將會學到:
|
||||||
|
1. 如何使用 `cat` 查看檔案的內容
|
||||||
|
|
||||||
請輸入 `echo start` 來開始這一關。
|
請輸入 `echo start` 來開始這一關。
|
||||||
|
|
||||||
|
requirements:
|
||||||
|
- cast
|
||||||
|
- explore
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- id: warning-01
|
- id: warning-01
|
||||||
repeatable: true
|
repeatable: true
|
||||||
@@ -15,119 +20,129 @@ stages:
|
|||||||
|
|
||||||
- id: start
|
- id: start
|
||||||
task: 輸入 `echo start` 來開始教程
|
task: 輸入 `echo start` 來開始教程
|
||||||
repeatable: false
|
|
||||||
condition:
|
condition:
|
||||||
output:
|
output:
|
||||||
- ^start$
|
- ^start$
|
||||||
responses:
|
responses:
|
||||||
- type: narrative
|
- content:
|
||||||
content:
|
- 在終端機中,並沒有圖形介面可以讓你查看檔案的內容。
|
||||||
- 你剛才使用的指令叫做 `echo`。
|
- 但是你可以透過 `cat` 指令來查看檔案的內容。
|
||||||
- '`echo` 指令可以將後方接續的文字輸出到終端機上。'
|
- '`cat` 指令是 concatenate 的縮寫,也就是串接的意思。'
|
||||||
- 例如你輸入 `echo Hello`,終端機就會顯示 `Hello`。
|
- 在輸入 `cat [檔案名稱]` 指令後,終端機會輸出檔案的內容。
|
||||||
- 你可以試著輸入 `echo` 並在後面加上一些文字,然後按下 Enter 鍵,就可以看到終端機上顯示了你剛才輸入的文字。
|
- 請你先查看這個資料夾中哪些檔案。
|
||||||
hints:
|
hints:
|
||||||
- ➤ 輸入 `echo` 並在後面加上一些文字
|
- ➤ 請輸入 `ls` 來查看這個資料夾中的檔案。
|
||||||
- ➤ 例如:`echo example`
|
|
||||||
|
|
||||||
- id: echo
|
- id: ls-~
|
||||||
task: 在終端機上顯示顯示任意文字
|
task: 查看資料夾中的檔案
|
||||||
repeatable: false
|
|
||||||
requirements:
|
requirements:
|
||||||
- start
|
- start
|
||||||
condition:
|
condition:
|
||||||
|
pwd:
|
||||||
|
- ^/home/commander$
|
||||||
command:
|
command:
|
||||||
- ^echo .*
|
- ^ls$
|
||||||
responses:
|
responses:
|
||||||
- type: narrative
|
- content:
|
||||||
content:
|
- 這個資料夾中有一個檔案和一個資料夾。
|
||||||
- 你應該可以看到終端機上顯示了你在 `echo` 指令後面的文字。
|
- 現在你可以使用 `cat` 指令來查看 `file.txt` 的內容。
|
||||||
- 接下來,請你試著在終端機上顯示 `How are you?`。
|
|
||||||
hints:
|
hints:
|
||||||
- ➤ 利用 `echo` 指令來在終端機上顯示 `How are you?`
|
- ➤ 請輸入 `cat file.txt` 來查看檔案的內容。
|
||||||
|
|
||||||
- id: how-are-you
|
- id: cat-file
|
||||||
task: 在終端機上顯示 `How are you?`
|
task: 查看 `file.txt` 的內容
|
||||||
repeatable: false
|
|
||||||
requirements:
|
requirements:
|
||||||
- echo
|
- ls-~
|
||||||
condition:
|
condition:
|
||||||
output:
|
pwd:
|
||||||
- ^[Hh]ow are you\??$
|
- ^/home/commander$
|
||||||
|
command:
|
||||||
|
- ^cat file.txt$
|
||||||
responses:
|
responses:
|
||||||
- type: narrative
|
- content:
|
||||||
content:
|
- 你應該能看到檔案的內容了。
|
||||||
- 你成功的在終端機上顯示了 `How are you?`。
|
- 檔案的內容是一首李白的詩,叫做「靜夜思」。
|
||||||
- 相信你已經了解 `echo` 指令的用法了。
|
- 另外,如果我們在指令的後面加上 `-n` 參數,就可以用顯示行數的方式查看檔案時。
|
||||||
- 接下來,要像你介紹 `echo` 在遊戲中的特殊功能,那就是詠唱咒語。
|
- 請試著用這個方式來查看 `file.txt` 的內容。
|
||||||
- 你可以通過輸入 `echo [咒語]` 來詠唱咒語,並產生對應的特殊效果。
|
|
||||||
- 但是要注意,詠唱咒語只有在 Linux Odyssey 中才會有特殊效果。
|
|
||||||
- 在真實的 Linux 環境中,詠唱咒語並不會有任何特殊效果。
|
|
||||||
- 現在,有一段咒語叫做 `HELP`,請你試著使用 `echo` 詠唱這段咒語。
|
|
||||||
hints:
|
hints:
|
||||||
- ➤ 試著使用 `echo` 來詠唱 `HELP` 咒語
|
- ➤ 請輸入 `cat -n file.txt` 來查看檔案的內容並顯示行數。
|
||||||
- ➤ 注意:咒語要使用大寫
|
|
||||||
exceptions:
|
|
||||||
- condition:
|
|
||||||
command:
|
|
||||||
- ^[Hh]ow are you\??$
|
|
||||||
hints:
|
|
||||||
- ➤ 在 `How are you?` 前面必須加上 `echo`
|
|
||||||
- condition:
|
|
||||||
command:
|
|
||||||
- ^echo$
|
|
||||||
hints:
|
|
||||||
- ➤ 在 `echo` 後面還需要加上一些文字
|
|
||||||
|
|
||||||
- id: help
|
- id: cat-n-file
|
||||||
task: 詠唱 `HELP` 咒語
|
task: 查看 `file.txt` 的內容並顯示行數
|
||||||
repeatable: false
|
|
||||||
requirements:
|
requirements:
|
||||||
- how-are-you
|
- cat-file
|
||||||
condition:
|
condition:
|
||||||
output:
|
pwd:
|
||||||
- ^HELP$
|
- ^/home/commander$
|
||||||
|
or:
|
||||||
|
- command:
|
||||||
|
- ^cat -n file.txt$
|
||||||
|
- command:
|
||||||
|
- ^cat file.txt -n$
|
||||||
responses:
|
responses:
|
||||||
- type: narrative
|
- content:
|
||||||
content:
|
- 你應該能看到檔案的內容和行數了。
|
||||||
- 你詠唱了 `HELP` 咒語,一位精靈出現了。
|
- 接下來,請你進入 `folder` 資料夾,並查看資料夾內有哪些檔案。
|
||||||
- type: dialogue
|
|
||||||
speaker: Unix 精靈
|
|
||||||
content:
|
|
||||||
- 你好,我是 Unix 精靈。
|
|
||||||
- 既然你使用了 `HELP` 咒語呼喚我,就讓我來教你一個咒語吧。
|
|
||||||
- 讓我想想... 好了,我想到了一個咒語,叫做 `WATER`。
|
|
||||||
- 這是施展水魔法的咒語。詠唱這個咒語可以施展水魔法,產生少量的水。
|
|
||||||
- 試著使用 `echo` 詠唱這個咒語吧。
|
|
||||||
hints:
|
hints:
|
||||||
- ➤ 詠唱 `WATER` 咒語
|
- ➤ 輸入 `cd folder` 來進入 `folder` 資料夾
|
||||||
|
|
||||||
|
- id: cd-folder
|
||||||
|
task: 進入 `folder` 資料夾
|
||||||
|
requirements:
|
||||||
|
- cat-n-file
|
||||||
|
condition:
|
||||||
|
pwd:
|
||||||
|
- ^/home/commander/folder$
|
||||||
|
responses:
|
||||||
|
- content:
|
||||||
|
- 現在你已經進入 `folder` 資料夾了。
|
||||||
|
- 請查看資料夾內有哪些檔案。
|
||||||
|
hints:
|
||||||
|
- ➤ 請輸入 `ls` 來查看資料夾中的檔案。
|
||||||
|
|
||||||
|
- id: ls-folder
|
||||||
|
task: 查看 `folder` 資料夾中的檔案
|
||||||
|
requirements:
|
||||||
|
- cd-folder
|
||||||
|
condition:
|
||||||
|
pwd:
|
||||||
|
- ^/home/commander/folder$
|
||||||
|
command:
|
||||||
|
- ^ls$
|
||||||
|
responses:
|
||||||
|
- content:
|
||||||
|
- 這個資料夾中有一個檔案,叫做 `words.txt`。
|
||||||
|
- 請用 `cat` 指令找出檔案中第 139 行的內容。
|
||||||
|
hints:
|
||||||
|
- ➤ 請輸入 `cat -n words.txt` 來查看檔案的內容。
|
||||||
|
|
||||||
|
- id: cat-n-words
|
||||||
|
task: 查看 `words.txt` 的內容
|
||||||
|
requirements:
|
||||||
|
- ls-folder
|
||||||
|
condition:
|
||||||
|
pwd:
|
||||||
|
- ^/home/commander/folder$
|
||||||
|
or:
|
||||||
|
- command:
|
||||||
|
- ^cat -n words.txt$
|
||||||
|
- command:
|
||||||
|
- ^cat words.txt -n$
|
||||||
|
responses:
|
||||||
|
- content:
|
||||||
|
- 你應該能看到檔案的內容和行數了。
|
||||||
|
- 請用 `echo` 指令來在終端機顯示檔案中第 139 行的內容。
|
||||||
|
hints:
|
||||||
|
- ➤ 請輸入 `echo [第 139 行的內容]` 來顯示檔案中第 139 行的內容。
|
||||||
|
|
||||||
- id: END
|
- id: END
|
||||||
task: 詠唱 `WATER` 咒語
|
task: 這是教學的結束
|
||||||
repeatable: false
|
|
||||||
requirements:
|
|
||||||
- help
|
|
||||||
condition:
|
condition:
|
||||||
output:
|
command:
|
||||||
- ^WATER$
|
- ' '
|
||||||
responses:
|
responses:
|
||||||
- type: narrative
|
- content:
|
||||||
content:
|
- 這是教學的結束。
|
||||||
- 你施展了水魔法,一個水球出現在你的手中。
|
- 請輸入 `echo end` 來結束這一關。
|
||||||
- type: dialogue
|
hints:
|
||||||
speaker: Unix 精靈
|
- ➤ 請輸入 `echo end` 來結束這一關。
|
||||||
content:
|
|
||||||
- 很好,你已經學會了水魔法。
|
|
||||||
- type: narrative
|
|
||||||
content:
|
|
||||||
- 真厲害,你已經了解如何使用 `echo` 指令,並且學會了詠唱咒語的方法。
|
|
||||||
- 最後複習一下,你可以通過輸入 `echo [文字]` 來在終端機上顯示文字。
|
|
||||||
- 你也可以通過輸入 `echo [咒語]` 來詠唱咒語,並產生對應的特殊效果。
|
|
||||||
- 不要忘了,詠唱咒語只有在 Linux Odyssey 中才會有特殊效果。
|
|
||||||
- 在真實的 Linux 環境中,咒語只會被視為一串文字顯示出來而已。
|
|
||||||
- 以上就是 `echo` 指令的用法,請繼續努力,完成接下來的關卡吧!
|
|
||||||
hints: |
|
|
||||||
複習:
|
|
||||||
通過輸入 `echo [文字]` 來在終端機上顯示文字
|
|
||||||
通過輸入 `echo [咒語]` 來詠唱咒語
|
|
||||||
咒語只有在 Linux Odyssey 中才會有特殊效果
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
This is file.txt
|
||||||
@@ -0,0 +1,164 @@
|
|||||||
|
book
|
||||||
|
study
|
||||||
|
purple
|
||||||
|
mouth
|
||||||
|
plant
|
||||||
|
windy
|
||||||
|
bread
|
||||||
|
tree
|
||||||
|
summer
|
||||||
|
grandma
|
||||||
|
chair
|
||||||
|
cloudy
|
||||||
|
mom
|
||||||
|
cake
|
||||||
|
jump
|
||||||
|
rabbit
|
||||||
|
orange
|
||||||
|
white
|
||||||
|
hands
|
||||||
|
eyes
|
||||||
|
dog
|
||||||
|
draw
|
||||||
|
fish
|
||||||
|
eight
|
||||||
|
winter
|
||||||
|
bird
|
||||||
|
desk
|
||||||
|
seven
|
||||||
|
sing
|
||||||
|
brother
|
||||||
|
banana
|
||||||
|
pencil
|
||||||
|
five
|
||||||
|
fall
|
||||||
|
run
|
||||||
|
milk
|
||||||
|
nose
|
||||||
|
teacher
|
||||||
|
drink
|
||||||
|
grass
|
||||||
|
sunny
|
||||||
|
rice
|
||||||
|
lion
|
||||||
|
eraser
|
||||||
|
three
|
||||||
|
purple
|
||||||
|
student
|
||||||
|
dad
|
||||||
|
elephant
|
||||||
|
mouth
|
||||||
|
four
|
||||||
|
spring
|
||||||
|
feet
|
||||||
|
cake
|
||||||
|
grandma
|
||||||
|
play
|
||||||
|
six
|
||||||
|
apple
|
||||||
|
head
|
||||||
|
sister
|
||||||
|
black
|
||||||
|
hands
|
||||||
|
juice
|
||||||
|
pen
|
||||||
|
nine
|
||||||
|
pizza
|
||||||
|
autumn
|
||||||
|
cat
|
||||||
|
legs
|
||||||
|
flower
|
||||||
|
drink
|
||||||
|
eyes
|
||||||
|
cloudy
|
||||||
|
orange
|
||||||
|
winter
|
||||||
|
mom
|
||||||
|
bread
|
||||||
|
sunny
|
||||||
|
study
|
||||||
|
lion
|
||||||
|
four
|
||||||
|
desk
|
||||||
|
summer
|
||||||
|
chair
|
||||||
|
windy
|
||||||
|
drink
|
||||||
|
tree
|
||||||
|
bread
|
||||||
|
grandma
|
||||||
|
study
|
||||||
|
nose
|
||||||
|
book
|
||||||
|
orange
|
||||||
|
legs
|
||||||
|
sister
|
||||||
|
grass
|
||||||
|
rainy
|
||||||
|
eyes
|
||||||
|
white
|
||||||
|
rabbit
|
||||||
|
play
|
||||||
|
black
|
||||||
|
dad
|
||||||
|
jump
|
||||||
|
mom
|
||||||
|
fish
|
||||||
|
sunny
|
||||||
|
winter
|
||||||
|
pen
|
||||||
|
flower
|
||||||
|
purple
|
||||||
|
brother
|
||||||
|
hands
|
||||||
|
cat
|
||||||
|
spring
|
||||||
|
cake
|
||||||
|
mouth
|
||||||
|
eraser
|
||||||
|
grandma
|
||||||
|
juice
|
||||||
|
run
|
||||||
|
dog
|
||||||
|
school
|
||||||
|
feet
|
||||||
|
apple
|
||||||
|
elephant
|
||||||
|
chair
|
||||||
|
sister
|
||||||
|
tiger
|
||||||
|
yellow
|
||||||
|
windy
|
||||||
|
pizza
|
||||||
|
study
|
||||||
|
dad
|
||||||
|
summer
|
||||||
|
plant
|
||||||
|
red
|
||||||
|
monkey
|
||||||
|
book
|
||||||
|
fall
|
||||||
|
cloudy
|
||||||
|
mom
|
||||||
|
drink
|
||||||
|
winter
|
||||||
|
sunny
|
||||||
|
fish
|
||||||
|
play
|
||||||
|
head
|
||||||
|
hands
|
||||||
|
banana
|
||||||
|
pencil
|
||||||
|
autumn
|
||||||
|
legs
|
||||||
|
eyes
|
||||||
|
drink
|
||||||
|
teacher
|
||||||
|
grass
|
||||||
|
run
|
||||||
|
cake
|
||||||
|
ears
|
||||||
|
grandma
|
||||||
|
dog
|
||||||
|
white
|
||||||
|
jump
|
||||||
@@ -1 +0,0 @@
|
|||||||
Hello
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Note
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
World
|
|
||||||
@@ -1,142 +0,0 @@
|
|||||||
title: 在資料夾中移動
|
|
||||||
instruction: |
|
|
||||||
在這一關,你將會學到如何使用 `echo` 指令,以及它在遊戲中的特殊功能。
|
|
||||||
|
|
||||||
請輸入 `echo start` 來開始這一關。
|
|
||||||
|
|
||||||
stages:
|
|
||||||
- id: 00
|
|
||||||
task: 輸入 `echo start` 來開始教程
|
|
||||||
repeatable: false
|
|
||||||
condition:
|
|
||||||
output:
|
|
||||||
- ^start$
|
|
||||||
responses:
|
|
||||||
- type: narrative
|
|
||||||
content:
|
|
||||||
- 你剛才使用的指令叫做 `echo`。
|
|
||||||
- '`echo` 指令可以將後方接續的文字輸出到終端機上。'
|
|
||||||
- 例如你輸入 `echo Hello`,終端機就會顯示 `Hello`。
|
|
||||||
- 你可以試著輸入 `echo` 並在後面加上一些文字,然後按下 Enter 鍵,就可以看到終端機上顯示了你剛才輸入的文字。
|
|
||||||
hints: |
|
|
||||||
➤ 輸入 `echo` 並在後面加上一些文字
|
|
||||||
➤ 例如:`echo example`
|
|
||||||
|
|
||||||
- id: 00.1
|
|
||||||
repeatable: true
|
|
||||||
condition:
|
|
||||||
command:
|
|
||||||
- ' '
|
|
||||||
hints: |
|
|
||||||
!! 請勿使用全形空格 !!
|
|
||||||
|
|
||||||
- id: 01
|
|
||||||
task: 在終端機上顯示顯示任意文字
|
|
||||||
repeatable: false
|
|
||||||
requirements:
|
|
||||||
- 00
|
|
||||||
condition:
|
|
||||||
command:
|
|
||||||
- ^echo .*
|
|
||||||
responses:
|
|
||||||
- type: narrative
|
|
||||||
content:
|
|
||||||
- 你應該可以看到終端機上顯示了你在 `echo` 指令後面的文字。
|
|
||||||
- 接下來,請你試著在終端機上顯示 `How are you?`。
|
|
||||||
hints: |
|
|
||||||
➤ 利用 `echo` 指令來在終端機上顯示 `How are you?`
|
|
||||||
|
|
||||||
- id: 02.1
|
|
||||||
repeatable: false
|
|
||||||
requirements:
|
|
||||||
- 01
|
|
||||||
condition:
|
|
||||||
command:
|
|
||||||
- ^echo$
|
|
||||||
hints: |
|
|
||||||
➤ 在 `echo` 後面還需要加上一些文字
|
|
||||||
|
|
||||||
- id: 02.2
|
|
||||||
repeatable: false
|
|
||||||
requirements:
|
|
||||||
- 01
|
|
||||||
condition:
|
|
||||||
command:
|
|
||||||
- ^[Hh]ow are you
|
|
||||||
hints: |
|
|
||||||
➤ 在 `How are you?` 前面必須加上 `echo`
|
|
||||||
|
|
||||||
- id: 02
|
|
||||||
task: 在終端機上顯示 `How are you?`
|
|
||||||
repeatable: false
|
|
||||||
requirements:
|
|
||||||
- 01
|
|
||||||
condition:
|
|
||||||
command:
|
|
||||||
- echo [Hh]ow are you
|
|
||||||
responses:
|
|
||||||
- type: narrative
|
|
||||||
content:
|
|
||||||
- 你成功的在終端機上顯示了 `How are you?`。
|
|
||||||
- 相信你已經了解 `echo` 指令的用法了。
|
|
||||||
- 接下來,要像你介紹 `echo` 在遊戲中的特殊功能,那就是詠唱咒語。
|
|
||||||
- 你可以通過輸入 `echo [咒語]` 來詠唱咒語,並產生對應的特殊效果。
|
|
||||||
- 但是要注意,詠唱咒語只有在 Linux Odyssey 中才會有特殊效果。
|
|
||||||
- 在真實的 Linux 環境中,詠唱咒語並不會有任何特殊效果。
|
|
||||||
- 現在,有一段咒語叫做 `HELP`,請你試著使用 `echo` 詠唱這段咒語。
|
|
||||||
hints: |
|
|
||||||
➤ 試著使用 `echo` 來詠唱 `HELP` 咒語
|
|
||||||
➤ 注意:咒語要使用大寫
|
|
||||||
|
|
||||||
- id: 03
|
|
||||||
task: 詠唱 `HELP` 咒語
|
|
||||||
repeatable: false
|
|
||||||
requirements:
|
|
||||||
- 02
|
|
||||||
condition:
|
|
||||||
command:
|
|
||||||
- echo HELP
|
|
||||||
responses:
|
|
||||||
- type: narrative
|
|
||||||
content:
|
|
||||||
- 你詠唱了 `HELP` 咒語,一位精靈出現了。
|
|
||||||
- type: dialogue
|
|
||||||
speaker: Unix 精靈
|
|
||||||
content:
|
|
||||||
- 你好,我是 Unix 精靈。
|
|
||||||
- 既然你使用了 `HELP` 咒語呼喚我,就讓我來教你一個咒語吧。
|
|
||||||
- 讓我想想... 好了,我想到了一個咒語,叫做 `WATER`。
|
|
||||||
- 這是施展水魔法的咒語。詠唱這個咒語可以施展水魔法,產生少量的水。
|
|
||||||
- 試著使用 `echo` 詠唱這個咒語吧。
|
|
||||||
hints: |
|
|
||||||
➤ 詠唱 `WATER` 咒語
|
|
||||||
|
|
||||||
- id: END
|
|
||||||
task: 詠唱 `WATER` 咒語
|
|
||||||
repeatable: false
|
|
||||||
requirements:
|
|
||||||
- 03
|
|
||||||
condition:
|
|
||||||
command:
|
|
||||||
- echo WATER
|
|
||||||
responses:
|
|
||||||
- type: narrative
|
|
||||||
content:
|
|
||||||
- 你施展了水魔法,一個水球出現在你的手中。
|
|
||||||
- type: dialogue
|
|
||||||
speaker: Unix 精靈
|
|
||||||
content:
|
|
||||||
- 很好,你已經學會了水魔法。
|
|
||||||
- type: narrative
|
|
||||||
content:
|
|
||||||
- 真厲害,你已經了解如何使用 `echo` 指令,並且學會了詠唱咒語的方法。
|
|
||||||
- 最後複習一下,你可以通過輸入 `echo [文字]` 來在終端機上顯示文字。
|
|
||||||
- 你也可以通過輸入 `echo [咒語]` 來詠唱咒語,並產生對應的特殊效果。
|
|
||||||
- 不要忘了,詠唱咒語只有在 Linux Odyssey 中才會有特殊效果。
|
|
||||||
- 在真實的 Linux 環境中,咒語只會被視為一串文字顯示出來而已。
|
|
||||||
- 以上就是 `echo` 指令的用法,請繼續努力,完成接下來的關卡吧!
|
|
||||||
hints: |
|
|
||||||
複習:
|
|
||||||
通過輸入 `echo [文字]` 來在終端機上顯示文字
|
|
||||||
通過輸入 `echo [咒語]` 來詠唱咒語
|
|
||||||
咒語只有在 Linux Odyssey 中才會有特殊效果
|
|
||||||
Reference in new issue
Block a user