[Ubuntu-PH] help on script
Ian Dexter R. Marquez
iandexter at gmail.com
Sat Jul 16 13:44:06 UTC 2011
On Sat, Jul 16, 2011 at 21:21, cj pangilinan <cjpangilinan at gmail.com> wrote:
> find . -name project.xml -type f |xargs perl -pi -e 's/string1/string2/g'
>
> but I can't seem to work -name project-*.xml. How do I replace project.xml
> with multiple files like project-*.xml
>
Have you tried enclosing the pattern in quotes?
man find:
"Don't forget to enclose the pattern in quotes in order to protect it
from expansion by the shell."
>
> On Sat, Jul 16, 2011 at 10:34, Ian Dexter R. Marquez <iandexter at gmail.com>
> wrote:
>>
>> On Sat, Jul 16, 2011 at 02:28, cj pangilinan <cjpangilinan at gmail.com>
>> wrote:
>> > Create a script to find all project.xml file under the current directory
>> > and
>> > open it and replace "file:C:/folder/file.txt" with
>> > "file:/work/dir/file.txt"
>> > and then close it.
>> >
>>
>> What have you done so far?
>>
--
Ian Dexter R. Marquez
http://iandexter.com
More information about the ubuntu-ph
mailing list