From 1349b1b70f392948334e45f2ad69c0f53d0636b4 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Sun, 12 Mar 2006 02:02:33 +0000 Subject: [PATCH] add the -r option to xargs to not call it if there are no options. --- getmail | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/getmail b/getmail index ec6f12d..d4e815f 100755 --- a/getmail +++ b/getmail @@ -23,10 +23,10 @@ if [ -z "$CRON" ] || kill -0 `pgrep -U $(id -u) -x $MUA` 2>/dev/null; then for account in bugs lists; do find /home/don/Mail/$account -maxdepth 1 -mindepth 1 -type d \ -exec sh -c 'test $(find {} -type f |wc -l) -eq 0' ';' \ - -printf '%f\000'|xargs -0 -n 1 ~/bin/deletemailbox -a $account >/dev/null; + -printf '%f\000'|xargs -0 -rn 1 ~/bin/deletemailbox -a $account >/dev/null; find /home/don/Mail/$account -maxdepth 2 -mindepth 2 -iname 'new' \ - -type d -ctime +60 -printf '%h\n'|xargs -n 1 basename|xargs \ - -n 1 /home/don/bin/deletemailbox -a $account >/dev/null; + -type d -ctime +60 -printf '%h\n'|xargs -rn 1 basename|xargs \ + -rn 1 /home/don/bin/deletemailbox -a $account >/dev/null; done; fi; fi; -- 2.39.5