$ echo "abc:def:ghi" | awk -F':' '{print $3}' ghi
$ awk 'BEGIN {i = 0;}{ gsub(/([a-zA-Z0-9_]+)/, "foo"i++); print $0}' test.txt > out.txt