I want to remove the ‘/’ from each line and add space instead of ‘/’
Example input:
7 47562385 47562385 ctttttttttttttttt/cttttttttttttttt
11 48932150 48932150 C/A
6 87733066 87733066 caaaaaaaaaaaaaaaaaaaaaa/cAAaaaaaaaaaaaaaaaaaaaaaa
8 4056078 4056078 cttttttttttttttttttttt/cTTttttttttttttttttttttt
I want the out put like this
7 47562385 47562385 ctttttttttttttttt cttttttttttttttt
1 48932150 48932150 C A
6 87733066 87733066 caaaaaaaaaaaaaaaaaaaaaa cAAaaaaaaaaaaaaaaaaaaaaaa
8 4056078 4056078 cttttttttttttttttttttt cTTttttttttttttttttttttt
Kiran Kumar CH is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
You can use a combination of grep and sed to replace all occurrences of / with a space in each line of your input file.
grep . input.txt | sed 's/// /g
If you want to save the output to a new file, you can redirect the output:
grep . input.txt | sed 's/// /g' > output.txt
imsilversurfer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Generally you can just use find and replace but in case your scenario is different, you need to state it in a bit more detailed manner.
Saisibanshu Mohanty is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.