"Bash if - 첫번째 인수가 foo인지 아닌지에 따라 분기"의 두 판 사이의 차이

(새 문서: ==개요== ;Bash if - 첫번째 arg가 hello인지 아닌지에 따라 분기 ;Bash if - 첫번째 인자가 hello인지 아닌지에 따라 분기 <syntaxhighlight lang='console'> i...)
 
(차이 없음)

2024년 4월 4일 (목) 14:42 판

1 개요

Bash if - 첫번째 arg가 hello인지 아닌지에 따라 분기
Bash if - 첫번째 인자가 hello인지 아닌지에 따라 분기
if [[ "$1" == "hello" ]]; then
  # 첫번째 인수가 "hello"인 경우
else
  # 첫번째 인수가 "hello"가 아닌 경우
fi


2 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}