#!/bin/bash #get eclim PID If exist pid=`ps -a | grep eclimd | cut -d'p' -f1` echo $pid #if not running, run it! if [ -z $pid ]; then $ECLIPSE_HOME/eclimd & sleep 10 fi vi $@