[MITgcm-devel] syntax on MAC OS X
Martin Losch
Martin.Losch at awi.de
Thu Mar 5 02:31:31 EST 2009
Are you sure that David is using the /usr/bin/sed on 10.4? Once he has
started with "fink", it's likely that he downloaded the gnu version of
sed, which would be put in /sw/bin/sed.
As far as I am concerned, we can leave it at that, unless you want me
to try more things. We could replace the too sed commands in question
with awk commands (although I've had problems with that as well, but
for awk I have a wizzard next door).
Martin
On Mar 4, 2009, at 10:44 PM, Jean-Michel Campin wrote:
> 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
> _______________________________________________
> MITgcm-devel mailing list
> MITgcm-devel at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-devel
More information about the MITgcm-devel
mailing list