Read a string field by fieldsuggest change
Let’s assume that the field separator is
var='line: 1 line: 2 line3' while IFS= read -d : -r field || [ -n "$field" ]; do echo "-$field-" done <<< "$var"
-line- - 1 line- - 2 line3 -
Found a mistake? Have a question or improvement idea? Let me know.
Table Of Contents