I've been trying to delete all lines with the word 'kittens' from a text file on my mac. I've been using find with xargs to do this, but it's not working. Previously I tried using sed with the modify in place option, but to no avail. How can I replace each file using the awk command?
gfind -iname "dogs_kittens.txt" -type f -print0 | xargs -0 -0 -I %in <awk '!/kittens/{print}' %in > %in