Guest

Untitled

By: a guest on Feb 21st, 2012  |  syntax: Bash  |  size: 0.22 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse
This paste has a previous version, view the difference. Copied
  1. $found=false
  2.  
  3. for i in "${existingjob[@]}"
  4. do
  5.         if [ "$i" -eq "$1" ] ; then
  6.                  echo "Found"
  7.                  $found=true
  8.                  break
  9.         fi
  10. done
  11.  
  12. if [ $found -eq false ] ; then
  13.         echo "not found"
  14.         exit 1
  15. fi