Remove char after Colon

Hi guys,

This is my input

2735:<7001> 34 789 701                                                               2
2774:<7001> 34 789 701                                                               2

How to delete characters after colon :
Including colon : too ?

My output should look like

2735
2774

Any help is appreciated...

cat <file> | cut -f1 -d":"

Thank you !

This is Useless Use of Cat

cut -f1 -d":" <file>
1 Like