For example: RXOTG-1388 holds 3 object RM4FD1,RM4FD2,RM4FD3RXOTG-1398 holds 3 object VT08D1 VT08D2,VT08D3and so on.Based on this text file I would like to count, using awk, how many object each RXOTG holds.RXOTG-1388       RM4FD1               0                 RM4FD2               0                 RM4FD3               0ENDRXOTG-1398       VT08D1               0                 VT08D2               0                 VT08D3               0ENDRXOTG-1400       VT08S1               0                 VT08S2               0                 VT08S3               0END
AWK count how many instance after pattern match
awk