Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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

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 Answer

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
add comment

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