Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Find Replace with perl -pi

Avatar of saharey
saharey asked on
Perl
3 Comments1 Solution1372 ViewsLast Modified:
I am doing find and replace like this

find /path/to/folder -name '*.*' -print0 | xargs -0 perl -pi -e "s/3\.1\.00/8\.4\.0\.${DATE}/g"

When I run the above script it works fine, but the problem is it is replacing a text "3.1.00.00" also, I am confused how come it is replacing a 4 octet string.

I am not finding a string with 4 digits only 3 digits is being asked to replace.

Say string is "3.1.00.00" than it gets replaced like this "3.1.0.2009012800.00"

Anyone with a quick help?