Entering edit mode
23 months ago
Ahmad
▴
10
Hi everyone
I have file with 3 column, I need check if the 3rd column < 10 replace value by character T but if not < 10 replace value by character S
The file like
T227 1 10.736439
T228 1 5.690412
T229 1 8.534977
T230 1 10.711639
T231 1 6.298395
Thank you for your help me
What was your approach to solving this? Where did you have a problem?
I need replace 3rd column values with specific character if it <10 but if it not replace it with another character in huge file
I got that. What did you do to try to solve it?
I used awk
but I can't refer to another values
Are you trying to replace the third column? Maybe you can try an if-else construct? There are some examples here https://www.thegeekstuff.com/2010/02/awk-conditional-statements/
Thank you barslmn
I used this command
You can do what you've said twice, using an intermediate file to save the results. Code not checked, just adapted your example: