[awk] NR problem
I have 2 cases. If I did
Code:
awk '{if(NR==27)$2="NaN";print NR"\t"$2}' input > output But I modified the command Code:
for nn in 27 Are there some tricks to deal with it? Any kind help is greatly thanked. |
Well not sure why you are doing the for loop outside the awk seeing it has one of its own, but if we stay with this format, try setting an awk variable:
Code:
for nn in 27 Code:
for nn in 27 |
I must replace randomly some NR with NaN.
I tried your code, but there is no change. Below is my complete code Code:
for nn in 27 134 181 191 194 196 |
I think my title is no so clear. I move my problem to new thread.
Sorry for this inconvenience. |
Please mark this one as SOLVED then.
|
All times are GMT -5. The time now is 07:23 PM. |