Comment by teo_zero
1 year ago
Please note that 'each' is fundamentally different from 'xargs'.
echo 1 2 3 | each "rm {}"
is the same as
rm 1
rm 2
rm 3
while
echo 1 2 3 | xargs rm
is the same as
rm 1 2 3
I would rather say that 'each' replaces (certain uses of) 'for':
for i in 1 2 3; do rm $i; done
It's equivalent to xargs -I {} rm {}