title: How to condition a bash script to send a warning
body: <p>I have a script that is getting a file from sftp, modify it a little for path and access and then is used for import in mysql :</p>
  <pre><code>#!/bin/bash
  
  sshpass -p password sftp -P 22001 ftp@server &lt;&lt;-'EOSSH1'
  lcd path/where/to/be/grabbed
  get *.csv
  EOSSH1
  
  #Moving and permission
  mv original/path destination/path
  chmod 777 file
  
  #Insertion csv in mysql
  mysql --login-path=user &lt; cmds.txt (a file with commands to be executed in mysql)
  </code></pre>
  <p>Now, what I need is to put a condition like this :
  If the csv file is not in the sftp server, to send an email and not to run the script.
  If the file is there, everything to run fine.</p>
  <p>Any idea how to do this?</p>
  <p>BR
  Tristan</p>