-2

I'm using rpl program in linux to replace date( with pdate( in some files.
But it says A Total of 0 matches replaced in 1 file searched.
while grep output for date( is:

ariyan@ariyan-laptop:/var/www/moodle21$ grep -wR 'date(' admin/uploaduser.php
$today = make_timestamp(date('Y', $today), date('m', $today), date('d', $today), 0, 0, 0);

I'm using rpl as this:

rpl -wR 'date(' 'pdate(' admin/uploaduser.php

What is the problem?

closed as too localized by Michael Mrozek Oct 29 '11 at 4:13

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

1

The -w flag makes it require word boundaries, and "between ( and '" may not be a word boundary. Try sed 's/\bdate(/pdate(/g' instead.

Not the answer you're looking for? Browse other questions tagged or ask your own question.