How to iterate through command output in eshell

104 views Asked by At

I know I could use xargs, but I'm in eshell! There must be a slicker way of doing it. Let's say I run

find . -name "*.suo"

What's an eshell way of iterating through the results to rm each? I've tried for and mapc but not being very good at this stuff yet can't quite figure out how to use them for this

1

There are 1 answers

0
iocanel On

I am not sure how it works from eshell, but maybe dired is more suitable for the job (?)

I would just open . in dired, then do something like search for '.suo' iterate to the result, mark files using m and then delete using x.