This works fairly easily:
Execute a Shell Script.kmactions (644 B)
For more information, see the wiki Searching the Forum for Answers section.