sed 替换有单引号的行

cat test.txt

$config['useragent'] = 'Roundcube Webmail'; // Hide version number
//$config['username_domain'] = 'www.b.com';  #要去掉前面的//
$config['mime_types'] = '/etc/mime.types';

sed -i '/\/\/$config.*username_domain/ s&//&&g' test

猜你喜欢

转载自www.cnblogs.com/hixiaowei/p/8962291.html
今日推荐