Skip to main content
added 164 characters in body
Source Link
Peter.O
  • 33.8k
  • 32
  • 120
  • 167

Your code isn't checking the result of match. The following fixes it.

RSTART is set by invoking the match function. Its value is the position of the string where the matched substring starts, or zero if no match was found.

if(RSTART){
   user = substr($0, RSTART + 12, RLENGTH - 13)
   c[d[1] OFS user]++
}

Your code isn't checking the result of match. The following fixes it.

if(RSTART){
   user = substr($0, RSTART + 12, RLENGTH - 13)
   c[d[1] OFS user]++
}

Your code isn't checking the result of match. The following fixes it.

RSTART is set by invoking the match function. Its value is the position of the string where the matched substring starts, or zero if no match was found.

if(RSTART){
   user = substr($0, RSTART + 12, RLENGTH - 13)
   c[d[1] OFS user]++
}
Source Link
Peter.O
  • 33.8k
  • 32
  • 120
  • 167

Your code isn't checking the result of match. The following fixes it.

if(RSTART){
   user = substr($0, RSTART + 12, RLENGTH - 13)
   c[d[1] OFS user]++
}