So I have a bash script like this:
#!/bin/sh FILE='some_file.js' gsed -i -E 's/something/somethingelse/' "$FILE" echo "Modified File"
When I run this from command line, it echoes the last line, so no errors or something and makes changes to the file. I then try to create an Applescript with these contents:
set msg to do shell script "/path/to/script.sh" display dialog msg
When I run it, it dutifully displays the dialog, but does not actually change the file
How can this be possible?
Update: If I use
sed -i "" -E 's/something/somethingelse/' "$FILE" instead, it works.