Hello everyone! I'm new to this forum .. so Hello once again
How do I do the following from within applescript so I can speed up the runtime (I run the below 1000s of times)
set output to do shell script "echo \"" & image_file & "\" | egrep '.JPG|.jpg|.JPEG|.jpeg|.PNG|.png' "
I have other shell commands (e.g. myscript.pl -file '<file_name>'). But the file name also contains spaces and 's. Is there a way to get applescript to automatically insert the appropriate escape characters for 's ? Using "quoted form of" doesn't work.
display dialog "echo '" & mytext & "'" display dialog "echo '" & quoted form of mytext & "'" -- manual escape characters into the mytext. I want it to put the escape characters automatically. display dialog "Why doesn't it print: " & "echo '" & "It\\'s cool' "
I don't mind skipping the above command on files that contain '. How do I match a ' in a string from within applescript?