Is there a simple way to remove the same line of text from a folder full of text documents at the command line?
If your version of sed allows the -i.bak flag (edit in place):
-i.bak
sed -i.bak '/line of text/d' *
If not, simply put it in a bash loop:
for file in *.txt do sed '/line of text/d' "$file" > "$file".new_file.txt done
1.4m articles
1.4m replys
5 comments
57.0k users