On 31 Aug 2014, at 14:46 , Ian Zimmerman <i...@buug.org> wrote: > On Sat, 30 Aug 2014 19:59:53 -0600, > LuKreme <krem...@kreme.com> wrote: > > RW> This may run into shell argument limits if you have to learn a lot > RW> of spam. Consider piping the output of find to xargs, or using -exec > RW> ...{} + in find. > > LuKreme> Yes, I tried to do that, but as I said in my first post, if I > LuKreme> do the find as part of the sa-learn command, then it stall when > LuKreme> the find command returns null. > > xargs (the GNU one at least) has an option to not run the inferior when > there are no args to give it.
The interior is the find: This was my original command: sa-learn --ham -u ${i} `find /home/${i}/Maildir/.notspam -type f -mtime -7` Which stalls if find returns nothing. I am not seeing how xargs would help this. (FreeBSD xargs never runs the command if the input is empty) -- 'I really should talk to him, sir. He's had a near-death experience!' 'We all do. It's called living.'