smbclient: command not found <p>I would like to connect to a remote server with the <code>smbclient</code> command and pass some arguments to the script.</p> <p>Here is my command:</p> <pre><code>smbclient //$SERVER -c 'cd $PATH;get $FILE /tmp/$FILE' $PASS -U$PSEUDO -W domain </code></pre> <p>When I launch this command without variables on the command line it works. But when I use it in the script it says:</p> <pre><code>./test1.sh: line 14: smbclient: command not found </code></pre> <p>Why is that?</p> <pre><code>Here is my complete script with for exemple arguments testSRV, testPATH and testFile : \#! /bin/bash SERVEUR=$1 PATH=$2 FILE=$3 echo $PATH #Return testPATH echo $FILE #Return testFILE \#COMPLETEPATH="cd $testPATH;get $testFILE /tmp/$testFILE" \#echo $COMPLETEPATH //return /usr/bin/smbclient //$SERVER -c 'cd $PATH;get $FILE' testpassword -U testuser -W testdomain </code></pre>