[X-Unix] Bash scripting help

Russell McGaha RussellMcGaha at direcway.com
Tue Nov 8 08:02:33 PST 2005


Folks;
	I'm trying to check if a process is running before continuing my  
script (BTW I'm a relative new-be at shell scripting); here's what  
I've tried:

#!/bin/bash


FileMaker="";
let loop=0;
echo "Start"

while [$Filemaker == "" && $(($loop < 10))]; do  {line 8 referenced  
below}

Filemaker= top -l1 | grep "FileMaker"
echo "Filemaker = " $Filemaker

let loop=$loop+1
echo $loop

done
echo "stopping"
end

What I WANT to do is  loop thru until either Filemaker is NOT empty  
or loop has reached a predetermined value.
I keep getting variations on :
./FileMakerTry.txt: line 8: [: missing `]'
./FileMakerTry.txt: line 18: end: command not found
	
	 I can't seem to get the syntax of the while correct; would someone  
care to lend a hand??

Russell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.themacintoshguy.com/pipermail/x-unix/attachments/20051108/67313634/attachment.html


More information about the X-Unix mailing list