I made a shell script to automize my mac configuration. I have a loop which creates symlinks based on how many files are in this list e. g.:
files=".zshrc .gitconfig"
for file in ${files}; do
echo "Creating symlink to $file in $homedir."
ln -sf ${dir}/${file} ${homedir}/${file}
done
When I run my script in bash it works just fine. But if I run it in zsh it creates a symlink called ".zshrc .gitconfig". How can I iterate like in bash?