hg tags output on terminal:
tip 596:bb834c42599f
P_SONY_1004.21.15 595:db10157b1515
P_PHILIPS_1000.21.2 590:67b7e71f76b4
P_SONY_1004.21.2 539:2b50e157e217
P_SONY_10015.21.2 533:15160fyafd88
P_creative.21.1 512:cdac14a00df4
P_SONY_1004.15.5 500:21affdf1bbfd
P_SONY_1002.15.5 466:a7bad21505ca
P_SONY_1002.15.15 424:efbe741500bb
P_creative.15.2 420:415c415a65fa
P_SONY_1004.15.1 414:24f1ab415c15
P_PHILIPS_1000.15.1 412:5d151556c288
P_SONY_1002.15.1 410:bf1f5af64ebb
P_SONY_1002.15.1 390:152e0f4ec815
P_creative.8.2 370:ecdc64f8a4b4
P_creative.8.1 350:5b8e81bd725a
P_creative.7.5 343:221d5c15efa6
P_creative.6.1 222:62115db1e015
from this output i have to extract 2nd line from lines containing "creative" word
I tried this:
hg tags | awk '/creative/{print $1;}'
Its output:
P_creative.21.1
P_creative.15.2
P_creative.8.2
P_creative.8.1
P_creative.7.5
P_creative.6.1
But i want only this as output: P_creative.15.2
How can i change my command to get "P_creative.15.2" as output and how can i use it in shell script?
also can i extract "15.2" from it ?