4 ms·
I'd love to see something a bit less trivial, like iterating over the output of another command to run some other commands for i in `bin/hosts`; do ssh $i
by simcop2387 12y ago
I'd love to see something a bit less trivial, like iterating over the output of another command to run some other commands
for i in `bin/hosts`; do ssh $i uptime; done
- th0ma5 12y agoThe documentation seems to suggest it supports through a library a "rec" as in recursive command as documented here http://srfi.schemers.org/srfi-31/srfi-31.html http://srfi.schemers.org/srfi-31/srfi-31.html ... not sure how to extrapolate that to your specific example however :D
- deleted 12y ago[deleted]
- rml 12y agoThere might be a better way, but this should work: (for-each (lambda (x) (run (ssh ,x uptime))) (run/strings (cat /etc/hosts)))