How should I treat return value of command or function? As string or integer?
<p>I am learning bash.
I learned return value of command or function is an integer value.
I wonder whether I should treat it as integer explicitly,</p>

<pre><code>declare -i return_value
bash some_function
return_value=$?
if (( return_value == 1 )); then
  exit 1
fi
</code></pre>

<p>or treat it as string value.</p>

<pre><code>bash some_function
return_value="$?"
if [[ "$return_value" == "1" ]]; then
  exit 1
fi
</code></pre>

<p>Please tell me your answer or comment. Thank you very much.</p>