all files in directory of project has 1 line:
var $usedbconfig = 'default_dev';
how can delete line files , save same file, single line command using sed?
if sed
version supports -i
option use command interactively delete line files in current directory:
sed -i "/var \$usedbconfig = 'default_dev';/d" ./*
furthermore: way quote string works in bash
. in other shells (like csh
) should adjust pattern.
Comments
Post a Comment