#!/bin/sh f="{$1}" maj=`ps aux | grep $f | grep -v grep` if [[ ! -z "$maj" ]] then echo "1"; else echo "0" fi