Code Comments
Programming Forum and web based access to our favorite programming groups.In article <4c59890.0504050212.92e425f@posting.google.com>,
Itaca <mazacar@hotmail.com> wrote:
[...]
% I want to substract 24 to the first field of each register. For this
% purpose i have used the following sentence:
%
% awk -F, '{$1=$1-24; print $0}' archive
This should give a floating-point result for the first field.
What awk are you using?
--
Patrick TJ McPhee
North York Canada
ptjm@interlog.com
Post Follow-up to this messageOn Wed, 06 Apr 2005 08:45:27 -0500 in comp.lang.awk, Ed Morton <morton@lsupcaemnt.com> wrote: >Itaca wrote: > >Is it possible that this is a locale issue? Maybe your locale is set to >something unexpected and gawk 3.1.1 was ignoring it but gawk 3.1.3 is >using it correctly. Just a guess. Take a look at >http://www.gnu.org/software/gawk/ma...wk.html#Locales for some more >info on locales. Looks like you made a good catch: the OP's awk seems to bebetween period and comma, maybe because comma is the locale decimal point, as in most non-English locales, where semicolon fills the role in lists which use comma in English locales. -- Thanks. Take care, Brian Inglis Calgary, Alberta, Canada Brian.Inglis@CSi.com (Brian[dot]Inglis{at}SystematicSW[dot]a b[dot]ca) fake address use address above to reply
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.