module-common/manifests/defines/delete_lines.pp

6 lines
148 B
ObjectPascal
Raw Normal View History

2009-12-26 01:33:24 +01:00
define delete_lines($file, $pattern) {
exec { "/bin/sed -i -r -e '/$pattern/d' $file":
onlyif => "/bin/grep -E '$pattern' '$file'",
}
}