Entering edit mode
                    4.5 years ago
        salman_96
        
    
        ▴
    
    70
    Hi
I have a file with coordinates like this
1:834573:A:AT
1:834830:G:A
1:835092:T:G
1:842388:T:TCCGCAGGA
I want to remove second colon and everything after that, such that the file looks like this
1:834573
1:834830
1:835092
1:842388
I have tried sed but the files have uneven characters.
Kindly suggest something
Actually you could even simplify it to:
We can use
":"as delimiter, and avoid regex: