aboutsummaryrefslogtreecommitdiff
path: root/findutils/xargs.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-06-15 15:40:16 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-06-15 15:40:16 +0200
commit4f731ce30ec2a9f5e9b231b47aa68f32b75feb35 (patch)
treef63b07e88c4f31b4b3d1b5a1deeac971785158e6 /findutils/xargs.c
parentc37fecb86c52da9e2781ee9eeb90d5d8894f59e0 (diff)
downloadbusybox-4f731ce30ec2a9f5e9b231b47aa68f32b75feb35.tar.gz
findutils/*: move usage and applet bits to *.c files
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'findutils/xargs.c')
-rw-r--r--findutils/xargs.c27
1 files changed, 25 insertions, 2 deletions
diff --git a/findutils/xargs.c b/findutils/xargs.c
index 8caaff91c..46a62cbf1 100644
--- a/findutils/xargs.c
+++ b/findutils/xargs.c
@@ -1,7 +1,6 @@
/* vi: set sw=4 ts=4: */
/*
* Mini xargs implementation for busybox
- * Options are supported: "-prtx -n max_arg -s max_chars -e[ouf_str]"
*
* (C) 2002,2003 by Vladimir Oleynik <dzo@simtreas.ru>
*
@@ -14,9 +13,10 @@
*
* xargs is described in the Single Unix Specification v3 at
* http://www.opengroup.org/onlinepubs/007904975/utilities/xargs.html
- *
*/
+//applet:IF_XARGS(APPLET_NOEXEC(xargs, xargs, _BB_DIR_USR_BIN, _BB_SUID_DROP, xargs))
+
//kbuild:lib-$(CONFIG_XARGS) += xargs.o
//config:config XARGS
@@ -351,6 +351,29 @@ static int xargs_ask_confirmation(void)
# define xargs_ask_confirmation() 1
#endif
+//usage:#define xargs_trivial_usage
+//usage: "[OPTIONS] [PROG ARGS]"
+//usage:#define xargs_full_usage "\n\n"
+//usage: "Run PROG on every item given by stdin\n"
+//usage: "\nOptions:"
+//usage: IF_FEATURE_XARGS_SUPPORT_CONFIRMATION(
+//usage: "\n -p Ask user whether to run each command"
+//usage: )
+//usage: "\n -r Don't run command if input is empty"
+//usage: IF_FEATURE_XARGS_SUPPORT_ZERO_TERM(
+//usage: "\n -0 Input is separated by NUL characters"
+//usage: )
+//usage: "\n -t Print the command on stderr before execution"
+//usage: "\n -e[STR] STR stops input processing"
+//usage: "\n -n N Pass no more than N args to PROG"
+//usage: "\n -s N Pass command line of no more than N bytes"
+//usage: IF_FEATURE_XARGS_SUPPORT_TERMOPT(
+//usage: "\n -x Exit if size is exceeded"
+//usage: )
+//usage:#define xargs_example_usage
+//usage: "$ ls | xargs gzip\n"
+//usage: "$ find . -name '*.c' -print | xargs rm\n"
+
/* Correct regardless of combination of CONFIG_xxx */
enum {
OPTBIT_VERBOSE = 0,