Search Results

Search: Posts Made By: krishnix
9,182
Posted By krishnix
i don't have such scenario's. my trouble is to...
i don't have such scenario's. my trouble is to ignore commas within double quotes.
9,182
Posted By krishnix
CSV with commas in field values, remove duplicates, cut columns
Hi

Description of input file I have:
-------------------------
1) CSV with double quotes for string fields.
2) Some string fields have Comma as part of field value.
3) Have Duplicate lines...
22,605
Posted By krishnix
Hi Corona, cat file.in | awk -F","...
Hi Corona,

cat file.in | awk -F"," '!($1$2$3$4$5$6$7$8 in a){a[$1$2$3$4$5$6$7$8];print $0}' | cut -d, -f1-150 > file.out

I use the above code, ie., using cut within awk. Do you think its...
22,605
Posted By krishnix
awk to print range of fields
Hi

file.in and file.out are in csv format. the code I have now is,

cat file.in | awk -F"," '!($1$2$3$4$5$6$7$8 in a){a[$1$2$3$4$5$6$7$8];print $0}' > file.out


Here, I am printing entire...
19,710
Posted By krishnix
Thank you everyone. I am using awk '!($0 in...
Thank you everyone.

I am using awk '!($0 in a){a[$0];print}' which I found efficient out of all options.
19,710
Posted By krishnix
sort: write failed: /tmp/sortmO2esr: No space...
sort: write failed: /tmp/sortmO2esr: No space left on device
during the last sort execution.
19,710
Posted By krishnix
I am trying the split and sort, I will let you...
I am trying the split and sort, I will let you know once it is done. Meanwhile, I have a doubt, why can't we implement something like below so that it will not take much space ..
for line in `cat...
19,710
Posted By krishnix
Sorry not the mention .. "thanks for your prompt...
Sorry not the mention .. "thanks for your prompt replies".

Now I am running ..
perl -ne'print unless $_{$_}++' result > result_new2

I am getting the error messge - Segmentation fault
19,710
Posted By krishnix
awk: cmd. line:1: (FILENAME=result FNR=6094197)...
awk: cmd. line:1: (FILENAME=result FNR=6094197) fatal: assoc_lookup: bucket->ahname_str: can't allocate 423 bytes of memory (Cannot allocate memory)

---------- Post updated at 09:21 AM ----------...
19,710
Posted By krishnix
In a huge file, Delete duplicate lines leaving unique lines
Hi All,

I have a very huge file (4GB) which has duplicate lines. I want to delete duplicate lines leaving unique lines. Sort, uniq, awk '!x[$0]++' are not working as its running out of buffer...
Showing results 1 to 10 of 10

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