Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

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.

Cross post: askubuntu.com/questions/73322/… – enzotib Oct 28 '11 at 20:06
And superuser.com/questions/351663/… – Keith Thompson Oct 28 '11 at 20:37
I flagged as crossposting, already answered elsewhere (SU). – user unknown Oct 29 '11 at 1:27

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

share|improve this answer

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