1

I'm not much familiar with Bash scripting, but I want to do a simple process on my large text file. I need to eliminate first comma in each line and replace it with space. Here is what my text file looks like:

CAK55580,GO:0004672,GO:0004674,GO:0004713,GO:0005524,GO:0006468 CAK55582,GO:0004672,GO:0004674,GO:0004713,GO:0005524,GO:0006468 CAK55583,GO:0007165,GO:0008603 

I know that I can remove the first comma in each line using sed -i.bak 's/,//' file, but I don't know how to replace it with space. Can someone help me with this?

1 Answer 1

4

The stuff between the final slashes is what to replace with.

sed 's/,/ /' file 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.