#!/bin/bash

if [ $$ != `pgrep -fo $0`  ]; then
  echo `basename $0` is already running.
  exit 1
fi

# Script Body
for i in `seq 1 5`
do
  echo "Hello PID=$$"
  sleep 1
done