From 06c694ee68b5853a10a79758c7235b837feb0996 Mon Sep 17 00:00:00 2001 From: wancat Date: Tue, 21 Nov 2023 22:54:12 +0800 Subject: [PATCH] quest: add check empty file stage --- quests/create/game.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/quests/create/game.yml b/quests/create/game.yml index fad30f0..426b08f 100644 --- a/quests/create/game.yml +++ b/quests/create/game.yml @@ -47,7 +47,22 @@ stages: - type: narrative content: - 你應該可以看到終端機上顯示了 `hello.txt` 這個檔案。 - - 我們再來試試建立其他的檔案吧! + - 我們來看看 `hello.txt` 檔案的內容吧! + - 我們可以使用之前學過的 `cat` 指令來查看檔案內容。 + hints: + - 輸入 `cat hello.txt` 來查看 `hello.txt` 檔案的內容 + + - id: cat + condition: + command: + - ^cat hello.txt$ + responses: + - type: narrative + content: + - 咦?竟然什麼都沒有! + - 沒錯,使用 `touch` 指令建立的檔案是空的。 + - 我們在未來會學習如何編輯檔案的內容。 + - 再來試試建立其他的檔案吧! - 請你試著在終端機上建立另一個檔案,檔名為 `world.txt`。 hints: - 輸入 `touch world.txt` 來建立一個檔案