-3

I want to replace 0/1 with hetero but whenever I am trying to use the known commands it is showing syntax error because the / is aleady part of the command .. Can anyone suggest a command to solve this issue??

closed as unclear what you're asking by Jander, Anthon, cas, Archemar, Jenny D Mar 29 '16 at 10:10

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

3

/ is not mandatory in sed command

sed -i -e s:0/1:hetero: file

(-e is not mandatory if there is a single sed command either)

0

Have you tried this ?

sed -i 's/\/0\/1/hatero/g' <file_name>

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