Search Results

Search: Posts Made By: mdkm
6,135
Posted By mdkm
Awk: Combine multiple lines based on number of fields
If a file has following kind of data, comma delimited

1,2,3,4
1
1
1,2,3,4
1,2
2
2,3,4


My required output must have only 4 columns with comma delimited


1,2,3,4
111,2,3,4...
5,886
Posted By mdkm
superb, thanks alot scrutinizer.
superb, thanks alot scrutinizer.
5,886
Posted By mdkm
sorry, forget about the empty lines. your awk...
sorry, forget about the empty lines.
your awk command is too fast , it just took 4 seconds :) thanks .
i am talking about the Z M4 , Z H4 kind data in file1 ,
because the for loop in the end part...
5,886
Posted By mdkm
@scritinizer : what if the data in the file1 has
AAA

BBB
CCC
123
A12
32B
Z H4
M H4
5,886
Posted By mdkm
@ SriniShoo SriniShoo It will not be the case...
@ SriniShoo SriniShoo
It will not be the case
that will not happen in the real time , so dont consider that scenario
5,886
Posted By mdkm
Speed : awk command to count the occurrences of fields from one file present in the other file
Hi,

file1.txt

AAA
BBB
CCC
DDD

file2.txt

abc|AAA|AAAabcbcs|fnwufnq
bca|nwruqf|AAA|fwfwwefwef
fmimwe|BBB|fnqwufw|wufbqw
wcdbi|CCC|wefnwin|wfwwf
DDD|wabvfav|wqef|fwbwqfwfe

i need...
Showing results 1 to 6 of 6

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