linux - resetting value of a local variable -


i using local variable record in loop like

record=$(awk 'nf!=4 {print $0}' n20${i}) 

but everytime instead of taking new value appends last value new value. how can solve problem? in advance.

record=$(awk 'nf!=4 {print $0}' n20$((i++))) 

that increment value of i each time line executed.

or if want i+1 without changing value of i:

record=$(awk 'nf!=4 {print $0}' n20$((i+1))) 

Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

android - layout with fragment and framelayout replaced by another fragment and framelayout -