I have a text file, the format is below, and I would like to only capture the numbers after the .txt. I did awk '{print $2}' filename and it gave me the wrong result.
For some of the lines, it gave me : instead of the number. For example, in the second line I will get : instead of 914.
Is there any other way that I can extract the numbers after .txt? I am not referring to numbers in the rgbpart.
image/Subject01.txt:1310 : image/Subject01/Scene4/Color/rgb7
image/Subject01.txt: 914 : image/Subject01/Scene4/Color/rgb3
...