[MITgcm-devel] syntax on MAC OS X
Jean-Michel Campin
jmc at ocean.mit.edu
Wed Mar 4 16:44:20 EST 2009
Hi Martin,
It looks more tricky than I thought: on Mac OS X 10.4
(David tried it) with the default sed, it works.
So the problem is on 10.5, right ?
Anyway, if the GNU sed does the job ...
Thanks,
Jean-Michel
On Wed, Mar 04, 2009 at 10:58:58AM +0100, Martin Losch wrote:
> Hi Jean-Michel,
>
> still does not work, the first error occurs at lines like this:
>
> csysm15::run> sed "/^ *\&PARM03/a \ nTimesteps=$Dbl" data.tst
> sed: 1: "/^ *\&PARM03/a \ nTimest ...": extra characters after \ at the
> end of a command
>
> I do not see the syntax error. On Mac OS, the Unix is basically BSD
> unix.
> this works
> csysm15::run> sed "/^ *\&PARM03/a \" data.tst
> but that does not insert anything (o:
>
> Martin
>
> PS. I gave up and installed the GNU sed, and then your script works
>
> On Mar 3, 2009, at 10:09 PM, Jean-Michel Campin wrote:
>
>> Hi Martin,
>>
>>> Thanks for the modified do_tst_2+2 (BTW, tst_2+2 does not work on my
>>> Apple/Leopard, some sed syntax issues, I think, but I did not have
>>> the
>>> time to sort it out, as my sed skills are poor; does the script work
>>> on
>>> other non-linux platforms? I assume that the shell tools are
>>> different/GNU vs. BSD Unix, etc).
>>
>> I've checked in a litle modif in "tst_2+2" which allows me to
>> use the "--posix" option of sed (supposed to disable all GNU
>> extensions).
>> When you have time, could you check if it improves something.
>>
>> Thanks,
>> Jean-Michel
>> _______________________________________________
>> MITgcm-devel mailing list
>> MITgcm-devel at mitgcm.org
>> http://mitgcm.org/mailman/listinfo/mitgcm-devel
>
> _______________________________________________
> MITgcm-devel mailing list
> MITgcm-devel at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-devel
More information about the MITgcm-devel
mailing list