Search Results

Search: Posts Made By: Sathy153
5,198
Posted By Sathy153
AWK help ...some additional comparison..
Hi,

If I want to add one more condition to the below while comparing.. can I modify as below =>

Old code
========
awk '
NR==FNR{a[substr($0,1,11)];next} # Create an array of the key...
5,198
Posted By Sathy153
That works gr8!
Thanks a lot!!! :b:
That works fine.... I need some tips on debugging these, plz send me :)
5,198
Posted By Sathy153
Still no output!!
Hi,

I am still not able to get any matching rows when using 'nawk'. :confused:
Please help me to solve this! Also please let me know to debug this.

>cat file1...
5,198
Posted By Sathy153
Need some help!
Hi,

Still not able to resolve ;-(

Below are the file details
==============================================
>cat file2
12345678901
98765432101

>cat file1...
5,198
Posted By Sathy153
Getting below error!
awk '
> NR=FNR{a[substr($0,1,11)];next}
> substr($0,21,31) in a{print}
> ' file2 file1
awk: syntax error near line 2
awk: bailing out near line 2


awk 'NR=FNR{a[substr($0,1,11)];next}...
5,198
Posted By Sathy153
Doesnt work ;-(
Getting below error =>

>cut -c21-31 file1 | sed -e 's/[][\\.*^$]/\\&/g' -e 's/^/^/' | grep -f - file2
grep: illegal option -- f
Usage: grep -hblcnsviw pattern file . .


Also I need entire...
5,198
Posted By Sathy153
Doesnt work ;-(
Getting below error =>

>cut -c21-31 file1 | sed -e 's/[][\\.*^$]/\\&/g' -e 's/^/^/' | grep -f - file2
grep: illegal option -- f
Usage: grep -hblcnsviw pattern file . .


Also I need entire...
5,198
Posted By Sathy153
AWK help reqd
Hi,

I have below requirement that I need to do it using AWK.

Files
====
File1: data file that has thousands of recs
File2: Lookup file

I need to compare the position 21-31 of File1 with...
Showing results 1 to 8 of 8

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