Search Results

Search: Posts Made By: mukeshguliao
2,536
Posted By cgkmal
Hi mukeshguliao, Of course. Well, I detected...
Hi mukeshguliao,

Of course. Well, I detected something wrong when the original code I use worked with the sample data you put in
the thread body, but didn't work in the expected way with the file...
2,536
Posted By cgkmal
Hi mukeshguliao, Due to the the file you...
Hi mukeshguliao,

Due to the the file you uploaded it has DOS newlines(CR/LF) format, It was needed to convert that endings to UNIX format
before (adding {sub(/\r$/,"")})to search only last...
2,536
Posted By cgkmal
Try in general with: awk -F"|" '$NF~/./{print...
Try in general with:
awk -F"|" '$NF~/./{print $(NF-2)","$NF}' inputfile
EX TID,ICI_ID
88,2530016690
88,2530016690
88,2530016690
2047,2530084990
88,2530016690
88,2530016690
88,2530016690...
2,536
Posted By pravin27
Could this help you? awk -F"," '$6!="" &&...
Could this help you?
awk -F"," '$6!="" && $8!="" && !a[$6FS$8] {a[$6FS$8]++;print $6FS$8}' inputfile
OR
#!/usr/bin/perl

use strict;
my (@fields,%hash);

while (<DATA>) {
chomp;...
3,366
Posted By sk1418
awk -F',' '{key=$1$2$3;if(key in a) next; else...
awk -F',' '{key=$1$2$3;if(key in a) next; else a[$1$2$3]=$0; print a[$1$2$3]} yourFile

tested with your example data here, it returned:
30002157,40342424,OTC,mart_rec,100, ,0...
Showing results 1 to 5 of 5

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