I'm trying to get a pidof a php script by capturing the path:
like /home/somebody/my_script which will be the first arg. to the bash script
Could anybody tell me what's wrong with this script ?
I'm new to scripting in general so any help would be apreciated !
#!/bin/bash
1st_arg=$1
prosesses=`lsof -i`
prosessid=`echo $prosesses | gawk /1st_arg/'{print $2}'`
echo $prosessid
if [ -z "$prosessid" ]
echo "not running"
fi
exit 0
Regards
Lars Sorensen
--
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list