Create a html file if a process is running??

Hi All,
I need to check for a process, if the process is running then I have to create an HTML file, say A.HTML.

If the process is not running then I have to rename the existing html, say A.HTML to B.HTML so that the process which looks for the file A.HTML does not find it?

How do I do this???

Thanks in advance.
:slight_smile:

if [ `ps -ef | grep -c processname` -gt 0 ]; then 
touch a.html
else  
mv a.html b.html
fi

cheers,
Devaraj Takhellambam