Bash 배열

Jmnote (토론 | 기여)님의 2020년 11월 27일 (금) 11:46 판 (→‎같이 보기)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

1 개요[ | ]

bash 배열
ARR=("John Smith" "Jane Doe" "Mike Barnes")
echo ${ARR[0]}
# John Smith
echo ${ARR[1]}
# Jane Doe
ARR=(
"John Smith"
"Jane Doe"
"Mike Barnes"
)
ARR=()
ARR+=("John Smith")
ARR+=("Jane Doe")
ARR+=("Mike Barnes")
NAMES[21]="John Smith"
NAMES[99]="Jane Doe"
echo ${NAMES[21]}
# John Smith
echo ${NAMES[99]}
# Jane Doe

2 같이 보기[ | ]

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