Ive 30 files named ( db01.php up to db30.php )
include this line
require_once('config.php');
I want to add or replace it to be
require_once('../new/config.php');
how to use sed to edit these 30 files at once
sed -i 's/\(require_once(.\)\(config\.php.);\)/\1..\/new\/\2/' db*.php
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With