Search Results

Search: Posts Made By: cs_novice
1,220
Posted By cs_novice
Don, @vgersh99 gave me a hint in a PM and using...
Don, @vgersh99 gave me a hint in a PM and using that I think, I have got the output I desired using the following awk code:

awk 'FNR==NR{f1[$1]=$2;next} $1 in f1 {print $0,f1[$1]}' first.txt...
1,220
Posted By cs_novice
Thanks @bakunin for the detailed explanation...
Thanks @bakunin for the detailed explanation regarding join. I also realized that my original question wasn't clear and I didn't really need to compare the files or capture the data in an array. I...
1,220
Posted By cs_novice
To clarify, the third.txt file is what I expect...
To clarify, the third.txt file is what I expect as output and I just put that out for illustration purposes. Reg my attempts: I tried capturing the the data in the first file data in an awk...
1,220
Posted By cs_novice
Text file parsing and comparison
I have two files (first.txt and second.txt):

more first.txt

cat mammal

lizard reptile

Elephant mammal

ant Insecta



more second.txt

...
Showing results 1 to 4 of 4

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