My Tech Notes
Search This Blog
BASH script: split string to array
str="a,b,c,d" IFS=',' read -r -a array <<< "$str" for e in "${array[@]}" do echo $e done
see also
Split string into an array in Bash
How do I split a string on a delimiter in Bash?
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment