From 76274ca7980b2f71fc07b2dc59123e3f66b8fd9d Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Thu, 28 Jan 2021 17:05:32 +0100 Subject: README: fix xargs -P example when there are no feeds Kindof a non-issue but if theres a sfeedrc with no feeds then xargs will still be executed and give an error. The xargs -r option (GNU extension) fixes this: From the OpenBSD xargs(1) man page: "-r Do not run the command if there are no arguments. Normally the command is executed at least once even if there are no arguments." Reproducable with the sfeedrc: feeds() { true } --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'README') diff --git a/README b/README index 46b19f1..209aa3b 100644 --- a/README +++ b/README @@ -663,7 +663,7 @@ sfeed_update_xargs shellscript: # make sure path exists. mkdir -p "${sfeedpath}" # print feeds for parallel processing with xargs. - feeds | SFEED_UPDATE_CHILD="1" xargs -0 -P "${maxjobs}" -L 6 "$(readlink -f "$0")" + feeds | SFEED_UPDATE_CHILD="1" xargs -r -0 -P "${maxjobs}" -L 6 "$(readlink -f "$0")" # cleanup temporary files etc. cleanup -- cgit v1.2.3