I just want to get the number, not the prefix "chromosomeX", so I want to remove all the prefix ahead of the numbers. How can I do that?? Thanks!!! (PS: give me some very simple command so that I can understand it... )
The first one splits every input line on the ':' character and prints out the second field. The second will replace any characters from the beginning of the line up to and including the ':' with nothing.
@ce9888: Useless use of cat. cut can read from a file just fine by itself, eg 'cut -d ":" -f 2 infile'