Bash while

Jmnote (토론 | 기여)님의 2019년 9월 9일 (월) 14:10 판 (새 문서: ==개요== ;Bash while <source lang='bash'> x=1 while [ $x -le 3 ]; do echo "x = $x" x=$(( $x + 1 )) done # x = 1 # x = 2 # x = 3 </source> <source lang='bash'> i=1 while [ $i -lt...)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

1 개요

Bash while
x=1
while [ $x -le 3 ]; do
  echo "x = $x"
  x=$(( $x + 1 ))
done
# x = 1
# x = 2
# x = 3
i=1
while [ $i -lt 4 ]; do
   echo "i = $i"
   i=`expr $i + 1`
done
# i = 1
# i = 2
# i = 3

2 같이 보기

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