title: Killing previous instances at first time,if running
body: <p>Following is my script 'Infinite.sh' code, I am running this script in background,Before running this script, i want to kill all previous instances.
  But this is killing my curent instance also.</p>
  
  <pre><code>kill -9 `ps ux|grep Infinite.sh|awk -F\  '{print $2}'`
  while true;
  do
  echo -n "SLEEPING FOR 5 SECOND"
  date
  sleep 5
  done
  </code></pre>