I have this command chain:find . -print | grep php | xargs grep 'eval' -sl | xargs wc -l | grep ' [1-2][0-9] 'This provide me this output: 14 ./includes/js/calendar/lang/vgju.php 18 ./includes/phpInputFilter/default.php 14 ./includes/Archive/eula.php 18 ./media/system/js/json.phpThis files are infected php files and I would like to remove it with my chain.How can I do it?
Remove files, which provided by pipe
shell;find;text processing;xargs
Although you can probably do this whole thing with find command only you can try appending |xargs rm -f to that command.Here's what it would look likefind . -print | grep php | xargs grep 'eval' -sl | \    xargs wc -l | grep ' [1-2][0-9] ' | \    cut -f 2 -d ' ' | xargs rm -fNote that the xargs rm command works here because you know there aren't any special characters in the file names. If there might be spaces in the file names, you can use xargs -d '\n' rm -f (Linux only).