title: Conda command working in command prompt but not in bash script
body: <p>my anaconda (4.5.4) works fine as long as I just use it via a linux terminal (bash shell). However, running conda commands in a bash script does not work at all.</p>
  
  <p>The script test.sh containes these lines:</p>
  
  <pre><code>#!/bin/bash
  conda --version
  conda activate env
  </code></pre>
  
  <p>Now, running <code>bash test.sh</code> results in the error
  <code>
  test.sh: line 2: conda: command not found
  test.sh: line 3: conda: command not found</code></p>
  
  <p>As recommended for anaconda version > 4.4 my .bashrc does not contain </p>
  
  <pre><code>export PATH="/opt/anaconda/bin:$PATH",
  </code></pre>
  
  <p>but </p>
  
  <pre><code>. /opt/anaconda/etc/profile.d/conda.sh
  </code></pre>
  
  <p>Thank you.</p>