title: How to check if file exist on remote machine by scp in loop
body: <p>How To loop this code:</p>
  
  <pre class="lang-bsh prettyprint-override"><code>if scp remote-host:~/myfile ./ &gt;&amp; /dev/null
  then 
      echo "transfer OK"
  else 
      sleep 20
  fi
  </code></pre>
  
  <p>loop must every 20 sec check for file on remote host, if file appear loop have to exit.</p>