My Notes
Delete lines containing a pattern from all files inside a directory
# find . -type f -print0 | xargs -0 sed -i '/my_pattern/d'
(sed -i is for inplace editing of the file)
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment