Listing Docker Images without registry URI
It looks like the purpose of the second command is to skip the REPOSITORY:TAG table header, which would always be the first line of the docker images output.  You can therefore combine the first two awk commands as:

awk 'NR &gt; 1 { printf("%s:%s\n", $1, $2) }'


To keep just the trailing part of the REPOSITORY field, you could do gsub('.*/', '', $1).  Note that that is not the same as awk -F '/' '{print $3}', but likely better.

Therefore, I would write the solution as

docker images | awk 'NR &gt; 1 { gsub('.*/', '', $1); printf("%s:%s\n", $1, $2); }'