Create And Loop Through An Array Of Strings In Bash
If all the values you're working with are single words you can process them as a string. See : 2so4kki3
This is how to create an array
bash
NAMES=("alfa bravo" "charlie delta" "echo foxtrot")
for; do
- Don't put commas between items in the array or they'll show up in the output. (i.e. don't do "alfa bravo", "charlie delta")
- The quotes around ` ${NAMES[@]} [TODO: Code shorthand span ] are necessary to keep the strings from splitting on spaces
Footnotes And References
- •
- •
- •
- •