title: Shell scripts stops writing in log file
body: <p>I am working on a provisioner shell script which after certain tasks writes in a log file. The problem is that after the third write operation it stops and doesn't log anything else, however the script runs successfully with the rest of the operations.</p>
  
  <p>I am using this most simple command:</p>
  
  <pre><code>#!/bin/bash
  
  set -o nounset
  set -o errexit
  
  # Set variables
  APACHE_USER="www-data"
  STORES_PATH="/var/www/x/stores"
  LOG_FILE="deploy_store.log"
  
  NEW_DB_PWD="$(openssl rand -base64 12)"
  
  arg1="${1:-}"
  echo "'$arg1' provision started on $(date +'%Y-%m-%d %H:%M')" &gt;&gt; "${LOG_FILE}"
  git clone git@bitbucket.org:x/y.git ${STORES_PATH}"/$arg1"
  echo "Done cloning the repository." &gt;&gt; "${LOG_FILE}"
  
  # Link the store vendor folder
  ln -s /srv/x/vendor_5.7 ${STORES_PATH}"/$arg1/vendor"
  echo "Done linking the vendor folder." &gt;&gt; "${LOG_FILE}"
  
  # Run the setup composer commands
  cd ${STORES_PATH}"/$arg1" &amp;&amp; composer dump-autoload
  cd ${STORES_PATH}"/$arg1" &amp;&amp; php artisan package:discover --ansi
  cd ${STORES_PATH}"/$arg1" &amp;&amp; php -r "file_exists('.env') || copy('.env.example', '.env');"
  cd ${STORES_PATH}"/$arg1" &amp;&amp; php artisan key:generate
  echo "Done composer setup." &gt;&gt; "${LOG_FILE}" # THIS IS NOT LOGGED.
  </code></pre>