osx - Using xargs with awk to modify files in-place (on a Mac!) -
i've been trying delete lines word 'kittens' text file on mac. i've been using find xargs this, it's not working. tried using sed modify in place option, no avail. how can replace each file using awk command?
gfind -iname "dogs_kittens.txt" -type f -print0 | xargs -0 -0 -i %in <awk '!/kittens/{print}' %in > %in
if you're willing seek sed
1 time again should straightforward:
gfind -iname "dogs_kittens.txt" -type f -execdir sed -i .meow '/kittens/d' {} +
osx awk find xargs
No comments:
Post a Comment