need to extract field of characters in a line

Hello,

Below is my input file's content ( in HP-UX platform ):

ABCD120672-B21 1
ABCD142257-002 1
ABCD142257-003 1
ABCD142257-006 1

From the above, I just want to get the field of 13 characters that comes after 'ABCD' i.e '120672-B21'... . Could you please let me know the shell script that I have to use?

Thanks

awk '{print(substr($1,5,10))}' file
this outputs 120672-B21

cat file | cut -c5-17
this will display to screen

cat file | cut -c5-17 >file2
this will send output to file2

Useless use of cat ! :cool:

cut -c5-17 file.in > file.out