Yes, you want to use the <exec> task. Check out the docs for that task, it will give you some examples on how to invoke apps:
http://ant.apache.org/manual/Tasks/exec.html Look specifically at the "output" property, that is how you would specify the "abc.properties" in your example.
Look at the <args> nested element, that is how you pass command line option to grep.
Finally, the "executable" property should be set to "grep", not to the full command line.

If you still have problems, feel free to post again, we'll be glad to help.