I am trying to replace t to t'.

Since \t returns a tab, I can't really do \t\’. I've also tried doing \047, \47, \27 etc. but it returns error, I am assuming due to the backslashes since I'm using sed i.e. sed "s/t/t\047/"

How can I give t a single quote without them tabbing?

1 Answer 1


sed "s/t/t'/" works for me (remember to add g if you want to replace all ts in a line):

$ sed "s/t/t'/" <<<"football"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .