Hi folks!

I just like to send some information regarding "awk" problems under MacOs
which occurs at least on "German" systems. I am not quite sure if FS uses
awk at any point - but it might help when processing FS results:

With the Region Setting "Germany" in the general settings of MacOs (
system-> Language&text->region), awk gets into trouble when dealing with
floatings points:


            echo "1 0.2 3.1" | awk '{ print $3*$2 }' --> 0!!!


The work around would be using "bc" for the calculations:


            awk '{ print $3 " * " $2 }' | bc -l





However, if you change the regional settings to  "GB" or "US"


            echo "1 0.2 3.1" | awk '{ print $3*$2 }'


works as expected.


At this point I have to thank Mark Jenkinson from the Oxford FSL team who
suggested the work around and came up with the idea that the regional
setting might cause the problems ...


Best wishes,





Luke
_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

Reply via email to