command line search and replace
From: Randy Brown (rbrown2_at_amdocs.com)
Date: 12/31/03
- Next message: Mike Bernhardt: "Compiling problem with Math-GMP-2.03"
- Previous message: Eric Walker: "Re: $_"
- Next in thread: Drieux: "Re: command line search and replace"
- Reply: Drieux: "Re: command line search and replace"
- Maybe reply: Randy Brown: "RE: command line search and replace"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
-------------------------------------------------------------------------------------
- Next message: Mike Bernhardt: "Compiling problem with Math-GMP-2.03"
- Previous message: Eric Walker: "Re: $_"
- Next in thread: Drieux: "Re: command line search and replace"
- Reply: Drieux: "Re: command line search and replace"
- Maybe reply: Randy Brown: "RE: command line search and replace"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|