I am having trouble understanding why a simple macro I wrote just seems to not work. I am feeding it a list of words that I want reformatted into a comma-separated line. The problem is sometimes the words are separated by more than one comma and sometimes whitespace.
Here's the simple macro:
In the second Execute Shell Script, I have tried all of the following (and more) yet the return of both the before and after are always the same. It's like the macro simply skips this command. I have also tried to place five-second pauses everywhere. Nothing helps.
sed 's/,\s*,/,/g'
sed 's/,\s*,/,/g; s/,\+/,/g'
sed 's/,\s\+/,/g'
tr -s ','
tr -s ',' | sed 's/,\s*/,/g'
awk '{gsub(/,\s*/, ","); gsub(/,+/ , ",")} 1'
sed 's/,\s\+/,/g; s/,\+/,/g'
Here's the macro:
Change Vertical Word List to Comma Separated Line.kmmacros (6.1 KB)