Monitor log file and execute command

I would like to monitor a log file using a shell script and as soon as a line with a certain string in it appears I would like to run a program. I have been playing around with doing this using tail -f, but cannot get it to work. I found something similar here:

The restriction on this is that the monitoring script needs to be in sh or ash as I am using busybox.

Any hints? Many thanks

You should be able to use AWK to invoke command

tail -f some-logfile | awk '/some-pattern/ {system("run-some-command")}'