OS: Monetary (12.0.1)
default shell: zsh (5.8)
#!/bin/zsh
LINE="I:would:like:coffee."
IFS=:
set $LINE
echo $1
echo $2
echo $3
echo $4
exit 0
./script.sh
zsh ./script.sh
Both ways of running the script returned
I:would:like:coffee.
Only when running in bash, did the script work as expected
bash ./script.sh
I
would
like
coffee.
I do want to know that the reason why IFS works as expected in bash, not in zsh.