터미널 명령 채점의 어려운 부분: 문자열 매칭이 작동하지 않는 이유

작성자

카테고리:

← 피드로
DEV Community · KARATAS · 2026-09-02 개발(SW)
Cover image for The Hard Part of Grading a Terminal Command: Why String Matching Doesn't Work

KARATAS

1. The problem: I wanted to auto-grade a terminal task

2. First attempt: compare the typed command to an expected command as a string — why it broke (infinite commands do the same job)

3. Second attempt: parse the output with regex — why it broke (different commands, equally valid output)

4. The fix: check simulated filesystem/process state at the end of the task instead

5. How I built this in JS (short code sample)

6. Result: this is how ShellPer’s Lab module works, try it here
ShellPer On Google Play Store !

👇🏻

library

search

lab-mission

danger-radar

playbook

toolkit

Top comments (0)

Subscribe

Code of ConductReport abuse

For further actions, you may consider blocking this person and/or reporting abuse

원문에서 계속 ↗