I want to extract the numbers following client_id and id and pair up client_id and id in each line.
For example, for the following lines of log,
User(cli
This may work for you:
awk -F "[):,]" '{ for (i=2; i<=NF; i++) if ($i ~ /id/) print $2, $(i+1) }' file
Results:
03 204 03 491 03 29 04 209 04 301 05 20