퀘스트 36Documenter
+250 XP
Multi-Line Input with Here-Docs (<<EOF)
이 퀘스트를 위한 인터랙티브 터미널 시작→설치 불필요 • 브라우저에서 바로 실행
개념 및 개요
In automated scripts and cloud deployment routines (like Dockerfiles or cloud-init), opening an interactive text editor like nano is impossible. Instead, Bash uses Here-Documents (<
The syntax cat < tells the shell to capture all following lines into config.env until a line containing only the delimiter word EOF is reached.
미션 지침
Use a here-doc to create an environment configuration file! Run
NODE_ENV=production
PORT=3000
and terminate the here-doc with
cat < config.env , enter the lines:NODE_ENV=production
PORT=3000
and terminate the here-doc with
EOF on its own line.명령어 구문 참조
| Command / Syntax | Description |
|---|---|
cat <<EOF > config.env | Begin multi-line here-doc writing to config.env |
EOF | Delimiter word marking the end of here-doc input |
검증 목표
- ○Create config.env using a here-doc (<<EOF)
- ○Verify config.env contains NODE_ENV=production and PORT=3000