GNUly:
s1='token1, token2, token3, token4, token5, token6, token8, token9, token10'
s2='token2, token7, token4, token3, token5, token6, token8, token10, token9'
comm <(grep -oE '\w+' <<< "$s1" | sort) <(grep -oE '\w+' <<< "$s2" | sort)
Gives:
token1
token10
token2
token3
token4
token5
token6
token7
token8
token9
The columns are:
1. tokens only in s1
2. tokens only in s2
3. tokens in both.
You suppress a column by passing the corresponding option (like `-3` to suppress the 3rd column).