Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

If I am running the following command to replace a string dst_ with dst_addr_ in multiple files.

perl -pi -w -e ’s/dst_/dst_addr_/g;’ *.tcl

it shows the following error:

Unrecognized character \xE2; marked by <-- HERE after <-- HERE near column 1 at -e line 1.
’: command not found

What am I doing wrong?

share|improve this question
I don't see how this is Ubuntu specific. This might be more appropriate on Superuser.com or Unix/Linux. –  gertvdijk Jan 1 '13 at 17:55
@gertvdijk sorry, my previous comment had a bad link. blog.stackoverflow.com/2012/03/… –  Eliah Kagan Jan 1 '13 at 19:32

1 Answer 1

I think your issue is caused by the improper use of .

You should use ' ('s/dst_/dst_addr_/g;') in your command.

perl -pi -e 's/dst_/dst_addr_/g' *.tcl 

should replace all the occurance of dst_ with dst_addr_ in all .tcl files.

Hope this helps

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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