I am trying to set up an applescript that removes all the empty lines from my clipboard. I came up with this script
I have tried the regex s/^\n// with a perl one-liner and it works fine.
However, every time I try to compile the applescript in the AppleScript Editor I get
The \n is removed and replaced with a blank line, and the script will not work.
How do I get this to work?
Thanks
Code:
do shell script "pbpaste | sed 's/^\n//' | pbcopy"
I have tried the regex s/^\n// with a perl one-liner and it works fine.
However, every time I try to compile the applescript in the AppleScript Editor I get
Code:
do shell script "pbpaste | sed 's/^
//' | pbcopy"
The \n is removed and replaced with a blank line, and the script will not work.
How do I get this to work?
Thanks