title: Couldn't canonicalise: No such file or directory
body: <p>I am getting <code>Couldn't canonicalise: No such file or directory</code> error while getting single file using sftp.
  here is what I am doing,</p>
  
  <pre><code>#!/bin/ksh
  . /feeds/scripts/files.properties
  
  filename=$1.txt
  
  echo $filename  
  
  sftp $getusername@$getserver &lt;&lt; EOF &gt;&gt; $logfile
  
  cd /feeds/out/data/
  
  lcd /feeds/files/
  
  get $filename
  
  bye
  
  EOF
  </code></pre>
  
  <p>I am able to print/echo file name, but while executing scripts I am getting below error,</p>
  
  <pre><code>user:/feeds/scripts&gt; ./fileReceiver.sh sample
  sample.txt
  Connecting to xxxxx.xxx.xxx...
  Couldn't canonicalise: No such file or directory
  Couldn't stat remote file: No such file or directory
  File "/u/user/sample.txt" not found.
  </code></pre>
  
  <p>I don't know why it adds '/u/user' before file name. Can anyone please help?
  Thanks in advance.</p>