Read fields of a file into an arraysuggest change
Let’s assume that the field separator is
arr=() while IFS= read -d : -r field || [ -n "$field" ]; do arr+=("$field") done <file
Found a mistake? Have a question or improvement idea? Let me know.
Table Of Contents