Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 or Unix/Linux. – gertvdijk Jan 1 '13 at 17:55
@gertvdijk sorry, my previous comment had a bad link.… – Eliah Kagan Jan 1 '13 at 19:32

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.