I have a file whose extension is .log, though I have this particular file set to open in TextWrangler instead of Console.app (using "Open with" in Finder's Get Info panel).
I have a Bash shell script (.sh
) that uses SED to replace some text in a file, inline, like so:
sed -i "" "s_find_replace_g" "$FILENAME"
The problem is that after the script runs, the "Open with" association is gone; the file opens with Console.app again. Is there any way around this in the script, like setting back the appropriate metadata after the sed
line?