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
>Solution :
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