I want to delete characters after "." in the first column of my file, which looks like this:
location LR alpha
14884399.000000 0.471193 3.029710e+01
14904434.024291 0.440564 1.300841e-05
14924469.048583 0.356903 1.329721e-05
I want it to look like this:
location LR alpha
14884399 0.471193 3.029710e+01
14904434 0.440564 1.300841e-05
14924469 0.356903 1.329721e-05
I have tried these 2, they work but delete the second and the third columns:
echo ${input_var} | sed 's/\.[^ ]*/ /g' chr22.E.Asia.clrout
cat chr22.E.Asia.clrout | sed chr22.E.Asia.clrout col=1 's/\.[^ ]*/ /g' > new_chr22.E.Asia.clrout```
Thank you so much in advance!
g
greedy command.