1

I have the nawk command to validate if the length is greater than 12 then mark number has $

I need to use the same below command by adding one more condition i.e length should be greater than 12 and less than 17

nawk ' length($7) > 12 {$7=substr($7,1,6)"$$$$$$$$} 1 ' FS=\| OFS=\| 
jaypal singh
  • 74,723
  • 23
  • 102
  • 147
user3326101
  • 51
  • 1
  • 1
  • 5

1 Answers1

1
(length($7)>12) && (length($7)<17)

Should do it

Floris
  • 45,857
  • 6
  • 70
  • 122