Search Results

Search: Posts Made By: grikoss
1,848
Posted By grikoss
Splitting a column in two separate fields
for making a summary
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...
2,125
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,125
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,125
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,125
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,125
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 6 of 6

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