Feed on
Posts
Comments

say you’ve got a stream of filenames that you’d like to remove.  for instance, i’ve got a bunch of filenames that pop out of this command:

grep -v “,” `search “boot0.txt”` | sed ’s/boot.*//’

turns out i can’t directly pipe this to rm.  instead, i’ve got to use the xargs command, as so:

grep -v “,” `search “boot0.txt”` | sed ’s/boot.*//’ | xargs rm -r

Stumble it!

if that was helpful ...

check out the other tips and tricks i've compiled on these pages. you might learn something else interesting!

Did I get this wrong? Let me know!

Trackback URI | Comments RSS

More blogs about http://desk.stinkpot.org:8080/tricks.