I am running Mathematica 9 on a linux machine and I've encountered the following behaviour that I am trying to understand. When I'm editing multiple source (.m) files using mathematica saving adds a new line which reads
(* ::Package:: *)
at the start of the file. This interferes with the shebang line that designates a source file as an executable and prevents scripts from working.
I then fix this problem by closing all source files in mathematica and manually removing the line in a text editor - so this is more of an annoyance than an actual problem.
Does anyone know how the line addition can be prevented?
Thanks!
-script + #1!/(Applications Contents MacOS MathematicaScript Mathematica.app)
! So you'd have to remove the shebang line to be able to edit the file again in Mathematica... $\endgroup$(* :Author: Pál *)
, it'll change to(* :Author: P[\AAcute]l *)
, which is very annoying. For these reasons I try to avoid using the front end to edit.m
files. $\endgroup$