How to turn a System Service that runs a shell script into a KM macro that runs a shell script?

I think so.
If you can give me some real-world examples, I'll see if I can write the JavaScript for you.

Here's what I need:

  1. Source Text -- the text to be changed
  2. Find Text -- the characters to be found and replaced
  3. Replace Text -- the characters to change the found text to.

Since you already have #2 and #3 in your perl scripts, you can just use that format.
Please use the code format, like this, using triple back quote marks:

enter your example here

Example:

SOURCE TEXT:
This text contains some ” quotes and some “ quotes to be replaced.

FIND/REPLACE:
~s/”|“/\"/g;
~s/‘|’/\'/g;
~s/–/\--/g;
~s/…/\.../g;