Search Results

Search: Posts Made By: jghi123
16,643
Posted By jghi123
thanks =) data integrity issue column...
thanks =)

data integrity issue

column $108 acutally had a space after the T

---------- Post updated at 02:22 PM ---------- Previous update was at 02:21 PM ----------


awk...
16,643
Posted By jghi123
Help with Awk finding and replacing a field based on a condition
Hi everybody,

I'm trying to replace the $98 field with "T" if the last field (108th) is T

I've tried

awk 'BEGIN{OFS=FS="|"} {if ($108=="T")sub($98,"T"); print}' test.txt
but that doesn't...
3,424
Posted By jghi123
Quite embarassingly, I'm trying to convert what...
Quite embarassingly, I'm trying to convert what you wrote into the true file i'm working with which has over 130 fields.

But trying with your sample it returns 4 blank lines.

I think I got it...
3,424
Posted By jghi123
mm what if i wanted the second field to match,...
mm what if i wanted the second field to match, but replace the 3rd field?
3,424
Posted By jghi123
sure, i'm working through vgersh99's...
sure,

i'm working through vgersh99's solution right now so will need to try and get it working with the actual example (so I can modify it going forward).


join -t"," -1 2 -2 1 file1.txt...
3,424
Posted By jghi123
Replacing field from file 1 with field from file 2
I've been searching these forums for the past 2 hours and i've found stuff that almost works but not quite.

i have file 1:
A, 1, Bla, 123
B, 2, Bla2, 123
C, 3, Bla3, 123
D, 4, Bla4, 123
...
Showing results 1 to 6 of 6

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