"Bash 배열"의 두 판 사이의 차이

 
32번째 줄: 32번째 줄:


==같이 보기==
==같이 보기==
* [[Bash 2차원 배열]]
* [[Bash foreach 스타일]]
* [[Bash foreach 스타일]]
* [[함수 array()]]
* [[함수 array()]]

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 }}