command line search and replace

From: Randy Brown (rbrown2_at_amdocs.com)
Date: 12/31/03


Date: Tue, 30 Dec 2003 18:51:50 -0600
To: <beginners@perl.org>


Hi all,

When I try the following, perl reads the * as a literal character, instead of my intent as a global value. Anyone see what I am missing?

 perl -pi -e "s/<provider-url>file:*<\/provider-url>/REPLACED/g" testfile.txt

In the file testfile.txt, the line will be something like this: <provider-url>file:/opt/usr/bin/somewhere</provider-url>

I want to replace /opt/usr/bin/somewhere with something else, but I cannot assume what the value between <provider-url>file: and </provider-url> will be.

Thanks for any advice.

Randy



-------------------------------------------------------------------------------------

The information contained in this message is proprietary of Amdocs,

protected from disclosure, and may be privileged.

The information is intended to be conveyed only to the designated recipient(s)

of the message. If the reader of this message is not the intended recipient,

you are hereby notified that any dissemination, use, distribution or copying of

this communication is strictly prohibited and may be unlawful.

If you have received this communication in error, please notify us immediately

by replying to the message and deleting it from your computer.

Thank you.

-------------------------------------------------------------------------------------



Relevant Pages

  • RE: v2.3, 2.4, and 2.5s GUI is slow for me
    ... I don't use IDLE too much anymore, just for quick tests, but ... Is there something cool I am missing? ... distribution or copying of this communication is strictly prohibited. ...
    (comp.lang.python)
  • Re: Worst Predictions of All Time
    ... not the intended recipient, you are hereby notified that any disclosure, ... The information contained in this communication (including any ... For IBM-MAIN subscribe / signoff / archive access instructions, ... send email to listserv@xxxxxxxxxxx with the message: GET IBM-MAIN INFO ...
    (bit.listserv.ibm-main)
  • Re: ftp hacking.
    ... System Analyst ... If you are not the intended recipient, ... communication in error, please notify the sender immediately and delete ... To join/leave the list, search archives, change list settings, * ...
    (comp.sys.hp.mpe)
  • Re: [Full-Disclosure] visa XSS?
    ... > be a customer DSL was great from them because they knew nothing about ... > bandwidth management and I took a entry levle class with a senior ... > delivering this message to the intended recipient, ... If you have received this communication in error, ...
    (Full-Disclosure)
  • RE: Free IDS Download
    ... Norma Jean Sebastian ... Subject: Free IDS Download ... intended recipient, you are hereby notified that any reproduction, ... If you have received this communication in error, ...
    (comp.databases.informix)