Sample Header Ad - 728x90

Running perl shell script from AppleScript on Mojave

0 votes
1 answer
320 views
I have a simple AppleScript that calls a perl shell script to replace a string with another string (here one with two) in files with specified file extensions (here .txt and .xyz). It used to work exactly as I have it below, but no longer does (possibly since updating to Mojave last year). set CleanFiles to " s/one/two/g; " set myFolder to choose folder with prompt "Choose a folder with files to be cleaned up:" set theFolder to POSIX path of myFolder do shell script "find " & theFolder & " \\( -name \\*.txt -o -name \\*.xyz \\) -print0 | xargs -0 perl -i -pe '" & CleanFiles & "'" There is no error message, it seems to run but doesn't do anything. What could be wrong?
Asked by jan (842 rep)
Feb 4, 2020, 06:09 PM
Last activity: Feb 4, 2020, 07:11 PM