quest: checkpoint01

This commit is contained in:
Chen, Tai-Lin committed 2024-08-02 00:28:59 +08:00
1 parent 3745011504
commit 21d08b8156
6 files changed
+120

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
FROM linuxodyssey/quest-base
COPY home ${HOME}
+7
View File
@@ -0,0 +1,7 @@
echo start
echo next
ls
cd folder03
pwd
cd ../folder02
ls ../folder01
+110
View File
@@ -0,0 +1,110 @@
title: 測驗一
instruction: |
在這個關卡中,將會考驗你是否理解以下內容:
1. `echo`:用來輸出文字
2. `ls`:用來查看資料夾的內容
3. `cd`:用來在資料夾之間移動
4. `pwd`:用來顯示目前的路徑
requirements:
- path
stages:
- id: start
task: 按下 `開始` 按鈕開始
condition:
command:
- ^echo start$
responses:
- type: narrative
content: |
這個關卡將會測試你是否理解之前的教學內容。
因此不會告訴你要輸入什麼指令。
請思考並應用正確的指令來完成任務。
如果理解了,請讓終端機輸出 `next` 來繼續。
- id: next
task: 讓終端機輸出 `next`
requirements:
- start
condition:
output:
- ^next$
responses:
- type: narrative
content: |
現在請你查看目前資料夾的內容。
- id: ls-~
task: 查看目前資料夾的內容
requirements:
- next
condition:
pwd:
- ^/home/commander$
command:
- ^ls$
responses:
- type: narrative
content: |
請進入 `folder03` 資料夾。
- id: cd-folder03
task: 進入 `folder03` 資料夾
requirements:
- ls-~
condition:
pwd:
- ^/home/commander/folder03$
responses:
- type: narrative
content: |
請在終端機顯示目前的路徑。
- id: pwd-folder03
task: 顯示目前的路徑
requirements:
- cd-folder03
condition:
command:
- ^pwd$
output:
- ^/home/commander/folder03$
responses:
- type: narrative
content: |
現在請你進入 `folder02` 資料夾,
並查看 `folder02` 資料夾的內容。
- id: ls-folder02
task: 進入並查看 `folder02` 資料夾的內容
requirements:
- pwd-folder03
condition:
pwd:
- ^/home/commander/folder02$
command:
- ^ls$
responses:
- type: narrative
content: |
最後,請你留在 `folder02` 資料夾,
並查看 `folder01` 資料夾的內容。
- id: END
requirements:
- ls-folder02
task: 留在 `folder02` 資料夾,查看 `folder01` 資料夾的內容。
condition:
pwd:
- ^/home/commander/folder02$
command:
- ^ls
output:
- ^file1$
responses:
- type: narrative
content: |
恭喜你通過了這個測驗!
你可以繼續學習之後的教學內容了。
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.