473,387 Members | 1,553 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

can't search and replace

Hi,

Can anyone help? I try search the keyword from _V and replace _VDR at the create.bat file and use below perl command but it doesn't work.

perl -pi -i.bak -e 's/_V/_VDR/' create.bat


After execute the above command and all _V not change to _VDR :
rmtshare \\NASP01\GRP_NetwrkOps = "c:\vol\IA01_V001\GRP_NetwrkOps" /REMARK:"Network Operation"


Best regards,

Chung
Feb 7 '08 #1
5 1374
KevinADC
4,059 Expert 2GB
try removing the i that is right after p in the oneliner you posted and add the "g" modifier to the regexp:

Expand|Select|Wrap|Line Numbers
  1. perl -p -i.bak -e 's/_V/_VDR/g' create.bat
make sure to use the full path to create.bat if necessary
Feb 7 '08 #2
Hi KevinADC,

Thanks your reply, but it still not change after try your solution.


Best regards,

Chung
Feb 7 '08 #3
KevinADC
4,059 Expert 2GB
Works for me. Don't know what to tell you.
Feb 7 '08 #4
Hi KevinADC,

I don't install perl at windows and just only Perl300.dll, Perl.exe and PerlMsg.dll files. Is any missing? Thanks.


Best regards,

Chung
Feb 7 '08 #5
KevinADC
4,059 Expert 2GB
Hi KevinADC,

I don't install perl at windows and just only Perl300.dll, Perl.exe and PerlMsg.dll files. Is any missing? Thanks.


Best regards,

Chung
As far as I know you need to install perl. I do not know what perl300.dll is or PerlMsg.dll. perl.exe looks like the main perl executable but there are many other files that come with perl.
Feb 7 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: amoona | last post by:
Hi… I’m doing a search page form my work for their library. Since this is the first time I work with ASP I’m facing some problems. Each library item has different search data, I was able to...
4
by: Jane Doe | last post by:
Hi, I need to search and replace patterns in web pages, but I can't find a way even after reading the ad hoc chapter in New Rider's "Inside JavaScript". Here's what I want to do: function...
22
by: Phlip | last post by:
C++ers: Here's an open ended STL question. What's the smarmiest most templated way to use <string>, <algorithms> etc. to turn this: " able search baker search charlie " into this: " able...
1
by: Tomomichi Amano | last post by:
Hello. I want to make replace & search functions in my text editor. Thanks to the kind people here at the newsgroup, I was able to make the function. But I was not able to understand how to...
1
by: pbd22 | last post by:
hi. for some reason i am not able to navigate the dom. i keep getting the 'no properties' error but i think i am doing everything right. this is an XML response from an AJAX call. The ajax...
6
by: DataSmash | last post by:
Hello, I need to search and replace 4 words in a text file. Below is my attempt at it, but this code appends a copy of the text file within itself 4 times. Can someone help me out. Thanks! #...
9
by: tomjones75 | last post by:
dear community, i want to search the content of all fields in one table in a access database. it already works for the content of one field in the table. please take a look at the code in...
14
by: Simon Gare | last post by:
Hi, have a search.asp page with results.asp page drawing data from an SQL db, problem is the user has to type the whole field value into the search box to retrieve the value on results.asp, what...
13
by: Ciara9 | last post by:
I created a command button using the record navigation feature, find record. Does anyone know how to turn off the functionality of the "replace" tab that gives the user the ability to replace the...
4
by: ravindarjobs | last post by:
hi...... i am using ms access 2003,vb6 i have a form. in that i have 2 buttons 1. start search 2 stop search when i click the "start search" button the fucntion SearchSystem() is called,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.