2

I want to split the column1 at dot . into two columns and rest of the columns remain same.

Input file:

chr21.9411551 7 13 53.8461538461538 7 29 24.1379310344828

Expected output file:

chr21 9411551 7 13 53.8461538461538 7 29 24.1379310344828
2

With awk:

awk '{sub(/\./," ",$1)};1' <file

With sed:

sed -e '/^[^.]*\.[^.]*[[:blank:]]/s/\./ /' <file

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.