Split string on delimiter in Bash
#!/bin/bash
#
# Script to split a string based on the delimiter
declare my_string
declare my_array
my_string="Ubuntu;Linux Mint;Debian;Arch;Fedora"
IFS=';' read -ra my_array <<< "$my_string"
#Print the split string
for i in "${my_array[@]}"
do
echo $i
done
Modified from https://linuxhandbook.com/bash-split-string/