2150

perl -ple 's/num/$n++/e' filename