Search Results

Search: Posts Made By: sandip_2014
3,703
Posted By sandip_2014
RuDiC Thanks I have used your...
RuDiC

Thanks

I have used your approach and that works fine.
3,703
Posted By sandip_2014
RudiC Yes. It always ends in d and...
RudiC

Yes.

It always ends in d and starts with a=
3,703
Posted By sandip_2014
Hi Robin The input file isa=1 b=2 c=3 ...
Hi Robin

The input file isa=1
b=2
c=3
a=4
b=2
d=3
a=3
c=4

and I want the output as a csva,b,c,d
1,2,3,,
4,2,,3
3,,4,,

In the AWK I tried to use = as delimiter and print all data...
3,703
Posted By sandip_2014
Nope this is not home work.. I have tried...
Nope this is not home work..

I have tried using awk

awk -F"=" 'BEGIN {print "a,b,c,d";}/a/{line=line$2","}/b/{line=line$2","}/c/{line=line$2","}/d/{line=line$2;print line}' test.log>test.csv...
3,703
Posted By sandip_2014
Convert flat file to csv
Hi I have a file like this:

a=1
b=2
c=3
a=4
b=2
d=3
a=3
c=4

How can I change this to csv format
a,b,c,d
1,2,3,,
4,2,,3
3,,4,,

Please use code tags next time for your code and...
Showing results 1 to 5 of 5

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