Search Results

Search: Posts Made By: bmk123
540
Posted By vgersh99
see the last update to try...
see the last update to try...
756
Posted By durden_tyler
That's because you are using a regular expression...
That's because you are using a regular expression for FS that works differently than you (probably) think it does.
This part:[^,]* matches "0 or more occurrences of a character other than comma"....
756
Posted By sadique.manzar
Dear, Please try below : awk -F '[\t]' -v...
Dear,
Please try below :

awk -F '[\t]' -v a="0" -v b="10" ' NR>a {if (NF != b ) print NR"@"NF }' test.txt
756
Posted By Scrutinizer
@OP You are using -vFPAT='\t', which means that...
@OP You are using -vFPAT='\t', which means that the fields are single TAB characters and the fields are separated by anything else.
If I change -vFPAT='\t' to -vFS='\t' then I get:
1@3
...
927
Posted By MadeInGermany
The quoting of fields cannot be handled by...
The quoting of fields cannot be handled by looking at the separator. All attempts with FS or -F fail.
But replacing a , with a | outside the quotes can be done with another awk
awk...
708
Posted By RavinderSingh13
Hello bmk123, Welcome to UNIX and Linux...
Hello bmk123,

Welcome to UNIX and Linux forums. Could you please try following and let me know if this helps you.

awk '{print $0,++a[$0]}' OFS="" Input_file
Thanks,
R. Singh
Showing results 1 to 6 of 6

 

Featured Tech Videos

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