I would manipulate the contents of the second column based on the delimiters it contains. If it has delimiter colon followed by another colon then I would require the content before first string else I would require entire value.

 #Input 
 1 1131:11854476:4:1$ 0 114476 1 4
 5 367504:11862778:4:2$ 0 118628 2 4
 3 3:64357_3_2$ 0 18267 2 3 
 4 7575:38680372:1$ 0 38372 1 2

 # Output
 1 1131 0 114476 1 4
 5 367504 0 118628 2 4
 3 3:64357_3_2$ 0 18267 2 3 
 4 7575 0 386372 1 2

I have come across different suggestions to copy a single column after manipulating or processing entire file/[string][1] but I would need to retain the remaining columns unprocessed. Could you please give ideas on how to achieve this in a single command(awk/cut one-liners) or multiple commands.


 [1]: http://unix.stackexchange.com/questions/53310/splitting-string-by-the-first-occurrence-of-a-delimiter