Bash Multiple Conditions in If Statement and Functions
<p>I'm trying to check if the number of arguments is one and if functions that I wrote in my script previously are true , but it does not work:</p>

<pre><code>if [ $# -eq 1 &amp;&amp; echo "$1" | lgt &amp;&amp; echo "Invalid Length - $1" &amp;&amp; echo "$1" | checking_another_function_etc ]; then
echo "some output" &amp;&amp; exit 1
</code></pre>

<p>"lgt" is a function name.</p>

<p>I was trying to use (( [[ [ quotes, multiple if statements but it didn't work either. Maybe I should separate the number of arguments checking and functions with quotes, but I'm not sure how to do it. I'm wondering if it is even possible to pass <code>echo</code> command to <code>if</code> condition. </p>

<p>The thing is I need one <code>echo</code> statement after checking of all functions, but after each function I need its own <code>echo</code> statement.</p>