 <p>Since you are using <code>sh</code>, and not bash, you should use a single equal <code>=</code> to do the string comparison, instead of the double equal <code>==</code>. Also it is a good practice to double quote the variable in test statement (this error is not caused by incorrect quoting though).</p> <p>The comparison should be:</p> <pre><code>if [ "$1" = "--daily" ] </code></pre> <p>and </p> <pre><code>elif [ "$1" = "--monthly" ] </code></pre>