Answers for "how to split string bash shell"

1

split string and create array bash

my_array=($(echo $string | tr "," "\n"))
Posted by: Guest on April-17-2020
1

split string and create array bash

IFS=', ' read -r -a array <<< "$string"
Posted by: Guest on April-17-2020

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language