Search Results

Search: Posts Made By: grikoss
2,084
Posted By grikoss
CSv2dat file headers and columns order
I have found a solution. it looks like this:

BEGIN { FS=","; OFS="\t"; a["ODT"]=1;a["AGE"]=1;a["CDT"]=1;a["CO"]=1;
a["SEX"]=1;a["TIME"]=1;a["VALUE"]=1;a["COMMENT"]=1; }
NR==1 { ...
2,084
Posted By grikoss
Is this what you mean: replacing my code with...
Is this what you mean:
replacing my code with your code below?


BEGIN
{
OFS="\t"
}

NR==1
{
$7="NUMB";
$8="STRING_COM";
$9="STRING_STATUS";
print $0;
next
} $8 != "c"
{...
2,084
Posted By grikoss
the result is : ODT AGE CDT CO SEX TIME NUMB...
the result is :

ODT AGE CDT CO SEX TIME NUMB STRING_COM STRING_STATUS
ODT AGE CDT CO SEX TIME NUMB STRING_COM STRING_STATUS
ODT AGE CDT CO SEX TIME NUMB STRING_COM STRING_STATUS
2,084
Posted By grikoss
do you mean to change my code exactly like...
do you mean to change my code exactly like this:BEGIN {
FS = "," ;
OFS = " " ;
}
NR==1 {$7="NUMB";$8="STRING_COM";$9="STRING_STATUS"; print $0; next} $8 != "c" {$9=$8;...
2,084
Posted By grikoss
CSv2dat file headers and columns order
Dear all,

I have a csv file which is transformed to .dat. I have an awk file which is supposing to do the mapping of the dat file. the code from the awk file is the one below.

The content of...
Showing results 1 to 5 of 5

 
All times are GMT -4. The time now is 07:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy