title: Unexpected behavior from shell script's ln -sfn -v
body: <p>I have the following:</p>
  
  <pre><code>if [ $kernel == 'Darwin' ]; then
      $HOME="/Users/$user"
  elif [ $kernel == 'Linux' ]; then
      $HOME="/home/$user"
  fi
  
  # Let the script know what the dotfiles dir is
  dotfiles_dir="$HOME/dotfiles"
  
  # Making symlinks to shell files, add yours as you need
  echo 'Making symlinks to shell files'
  ln -sfn -v $dotfiles_dir/shells/zsh $HOME/.zsh
  ln -sfn -v $dotfiles_dir/shells/zsh/zshrc $HOME/.zshrc
  ln -sfn -v $dotfiles_dir/shells/bash $HOME/.bash
  ln -sfn -v $dotfiles_dir/shells/bash/bash_profile $HOME/.bash_profile
  ln -sfn -v $dotfiles_dir/shells/bash/bashrc $HOME/.bashrc
  ln -sfn -v $dotfiles_dir/shells/profile $HOME/.profile
  echo "Done at [$time]...\n"
  </code></pre>
  
  <p>However, this strangely outputs:</p>
  
  <pre><code>[Other output here...]
  
  Making symlinks shell files
  /Users/eduan/.zsh -&gt; /Users/eduan/dotfiles/shells/zsh
  /Users/eduan/.zshrc -&gt; /Users/eduan/dotfiles/shells/zsh/zshrc
  /Users/eduan/.bash -&gt; /Users/eduan/dotfiles/shells/bash
  ./bashrc -&gt; /Users/eduan/dotfiles/shells/bash/bashrc
  /Users/eduan/.profile -&gt; /Users/eduan/dotfiles/shells/profile
  Done at [08:15]...
  
  [Other output here...]
  </code></pre>
  
  <p>Can anybody tell me why I get this unexpected output? The rest of my symlinks are generated correctly, however the Bash symlinks are messed up for some reason.</p>
  
  <p>BTW, this is in a big script that generates symlinks. This is only part of it, and I put the relevant parts, so that you don't get confused. :)</p>
  
  <p>EDIT:</p>
  
  <p>Here's the link to the latest version of the script: <a href="https://github.com/Greduan/dotfiles/blob/master/scripts/make_symlinks.sh" rel="nofollow">https://github.com/Greduan/dotfiles/blob/master/scripts/make_symlinks.sh</a></p>