I'm trying to stop a long running process as soon as the file /status contains the string Success.
I tried this without success:
cat & while [ `grep -q Success /status` ]; do sleep 1; done; kill %1
cat is the long running process that needs to be stopped when /status contains Success.
Cheers