In Bash, you can use the IFS (Internal Field Separator) variable to specify the delimiter and the read command to split a string into tokens based on that delimiter. Here's an example:

my_string="foo,bar,baz"
IFS=',' read -ra tokens <<< "$my_string".

In this example, my_string is set to "foo,bar,baz". The IFS variable is set to a comma, indicating that commas should be used as the delimiter for splitting the string. The read command reads the input from the my_string variable, splits it into tokens using the comma as the delimiter, and stores the tokens in the tokens array. The -ra option tells read to store the tokens in an array instead of a single variable.

After this code runs, the tokens array will contain three elements: "foo", "bar", and "baz". You can access these elements using array indexing, like so:
echo ${tokens[0]}  # prints "foo"
echo ${tokens[1]}  # prints "bar"
echo ${tokens[2]}  # prints "baz"

Alternatively, you can use a for loop to iterate over the elements of the tokens array:
for token in "${tokens[@]}"; do
  echo $token
done

This will print each token on a separate line.