aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--coreutils/basename.c13
-rw-r--r--coreutils/cal.c9
-rw-r--r--coreutils/cat.c9
-rw-r--r--coreutils/catv.c9
-rw-r--r--coreutils/chgrp.c23
-rw-r--r--coreutils/chmod.c23
-rw-r--r--coreutils/chown.c26
-rw-r--r--coreutils/chroot.c13
-rw-r--r--coreutils/cksum.c6
-rw-r--r--coreutils/comm.c9
-rw-r--r--coreutils/cp.c18
-rw-r--r--coreutils/cut.c18
-rw-r--r--coreutils/dd.c33
-rw-r--r--coreutils/df.c35
-rw-r--r--coreutils/dirname.c11
-rw-r--r--coreutils/dos2unix.c18
-rw-r--r--coreutils/du.c37
-rw-r--r--coreutils/echo.c21
-rw-r--r--coreutils/env.c9
-rw-r--r--coreutils/expand.c31
-rw-r--r--coreutils/expr.c35
-rw-r--r--coreutils/false.c10
-rw-r--r--coreutils/fold.c10
-rw-r--r--coreutils/fsync.c8
-rw-r--r--coreutils/head.c20
-rw-r--r--coreutils/hostid.c5
-rw-r--r--coreutils/id.c18
-rw-r--r--coreutils/install.c18
-rw-r--r--coreutils/ln.c16
-rw-r--r--coreutils/logname.c9
-rw-r--r--coreutils/md5_sha1_sum.c58
-rw-r--r--coreutils/mkdir.c19
-rw-r--r--coreutils/mkfifo.c10
-rw-r--r--coreutils/mknod.c18
-rw-r--r--coreutils/nice.c7
-rw-r--r--coreutils/nohup.c8
-rw-r--r--coreutils/od.c5
-rw-r--r--coreutils/printenv.c6
-rw-r--r--coreutils/printf.c10
-rw-r--r--coreutils/pwd.c9
-rw-r--r--coreutils/readlink.c12
-rw-r--r--coreutils/realpath.c5
-rw-r--r--coreutils/rm.c12
-rw-r--r--coreutils/rmdir.c16
-rw-r--r--coreutils/seq.c10
-rw-r--r--coreutils/sleep.c15
-rw-r--r--coreutils/sort.c48
-rw-r--r--coreutils/split.c13
-rw-r--r--coreutils/stat.c61
-rw-r--r--coreutils/stty.c11
-rw-r--r--coreutils/sum.c8
-rw-r--r--coreutils/sync.c5
-rw-r--r--coreutils/tac.c5
-rw-r--r--coreutils/tail.c25
-rw-r--r--coreutils/tee.c13
-rw-r--r--coreutils/test.c23
-rw-r--r--coreutils/tr.c13
-rw-r--r--coreutils/true.c10
-rw-r--r--coreutils/tty.c13
-rw-r--r--coreutils/uname.c17
-rw-r--r--coreutils/uniq.c18
-rw-r--r--coreutils/usleep.c9
-rw-r--r--coreutils/uudecode.c12
-rw-r--r--coreutils/uuencode.c14
-rw-r--r--coreutils/who.c7
-rw-r--r--coreutils/whoami.c5
-rw-r--r--include/usage.src.h1055
67 files changed, 1070 insertions, 1055 deletions
diff --git a/coreutils/basename.c b/coreutils/basename.c
index d44124741..177e023cd 100644
--- a/coreutils/basename.c
+++ b/coreutils/basename.c
@@ -28,6 +28,19 @@
//config: leaving just the filename itself. Enable this option if you wish
//config: to enable the 'basename' utility.
+//usage:#define basename_trivial_usage
+//usage: "FILE [SUFFIX]"
+//usage:#define basename_full_usage "\n\n"
+//usage: "Strip directory path and .SUFFIX from FILE\n"
+//usage:
+//usage:#define basename_example_usage
+//usage: "$ basename /usr/local/bin/foo\n"
+//usage: "foo\n"
+//usage: "$ basename /usr/local/bin/\n"
+//usage: "bin\n"
+//usage: "$ basename /foo/bar.txt .txt\n"
+//usage: "bar"
+
#include "libbb.h"
/* This is a NOFORK applet. Be very careful! */
diff --git a/coreutils/cal.c b/coreutils/cal.c
index f18c16120..ef1c29bb9 100644
--- a/coreutils/cal.c
+++ b/coreutils/cal.c
@@ -16,6 +16,15 @@
*
* Major size reduction... over 50% (>1.5k) on i386.
*/
+
+//usage:#define cal_trivial_usage
+//usage: "[-jy] [[MONTH] YEAR]"
+//usage:#define cal_full_usage "\n\n"
+//usage: "Display a calendar\n"
+//usage: "\nOptions:"
+//usage: "\n -j Use julian dates"
+//usage: "\n -y Display the entire year"
+
#include "libbb.h"
#include "unicode.h"
diff --git a/coreutils/cat.c b/coreutils/cat.c
index 922549828..00c38d486 100644
--- a/coreutils/cat.c
+++ b/coreutils/cat.c
@@ -22,6 +22,15 @@
//config: cat is used to concatenate files and print them to the standard
//config: output. Enable this option if you wish to enable the 'cat' utility.
+//usage:#define cat_trivial_usage
+//usage: "[FILE]..."
+//usage:#define cat_full_usage "\n\n"
+//usage: "Concatenate FILEs and print them to stdout"
+//usage:
+//usage:#define cat_example_usage
+//usage: "$ cat /proc/uptime\n"
+//usage: "110716.72 17.67"
+
#include "libbb.h"
/* This is a NOFORK applet. Be very careful! */
diff --git a/coreutils/catv.c b/coreutils/catv.c
index f92d93d24..37c7ed2d1 100644
--- a/coreutils/catv.c
+++ b/coreutils/catv.c
@@ -10,6 +10,15 @@
/* See "Cat -v considered harmful" at
* http://cm.bell-labs.com/cm/cs/doc/84/kp.ps.gz */
+//usage:#define catv_trivial_usage
+//usage: "[-etv] [FILE]..."
+//usage:#define catv_full_usage "\n\n"
+//usage: "Display nonprinting characters as ^x or M-x\n"
+//usage: "\nOptions:"
+//usage: "\n -e End each line with $"
+//usage: "\n -t Show tabs as ^I"
+//usage: "\n -v Don't use ^x or M-x escapes"
+
#include "libbb.h"
int catv_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
diff --git a/coreutils/chgrp.c b/coreutils/chgrp.c
index 58f78e736..bc9608362 100644
--- a/coreutils/chgrp.c
+++ b/coreutils/chgrp.c
@@ -11,6 +11,29 @@
/* BB_AUDIT GNU defects - unsupported long options. */
/* http://www.opengroup.org/onlinepubs/007904975/utilities/chgrp.html */
+//usage:#define chgrp_trivial_usage
+//usage: "[-RhLHP"IF_DESKTOP("cvf")"]... GROUP FILE..."
+//usage:#define chgrp_full_usage "\n\n"
+//usage: "Change the group membership of each FILE to GROUP\n"
+//usage: "\nOptions:"
+//usage: "\n -R Recurse"
+//usage: "\n -h Affect symlinks instead of symlink targets"
+//usage: "\n -L Traverse all symlinks to directories"
+//usage: "\n -H Traverse symlinks on command line only"
+//usage: "\n -P Don't traverse symlinks (default)"
+//usage: IF_DESKTOP(
+//usage: "\n -c List changed files"
+//usage: "\n -v Verbose"
+//usage: "\n -f Hide errors"
+//usage: )
+//usage:
+//usage:#define chgrp_example_usage
+//usage: "$ ls -l /tmp/foo\n"
+//usage: "-r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo\n"
+//usage: "$ chgrp root /tmp/foo\n"
+//usage: "$ ls -l /tmp/foo\n"
+//usage: "-r--r--r-- 1 andersen root 0 Apr 12 18:25 /tmp/foo\n"
+
#include "libbb.h"
/* This is a NOEXEC applet. Be very careful! */
diff --git a/coreutils/chmod.c b/coreutils/chmod.c
index f07a49bd3..0bcd6bb66 100644
--- a/coreutils/chmod.c
+++ b/coreutils/chmod.c
@@ -14,6 +14,29 @@
/* BB_AUDIT GNU defects - unsupported long options. */
/* http://www.opengroup.org/onlinepubs/007904975/utilities/chmod.html */
+//usage:#define chmod_trivial_usage
+//usage: "[-R"IF_DESKTOP("cvf")"] MODE[,MODE]... FILE..."
+//usage:#define chmod_full_usage "\n\n"
+//usage: "Each MODE is one or more of the letters ugoa, one of the\n"
+//usage: "symbols +-= and one or more of the letters rwxst\n"
+//usage: "\nOptions:"
+//usage: "\n -R Recurse"
+//usage: IF_DESKTOP(
+//usage: "\n -c List changed files"
+//usage: "\n -v List all files"
+//usage: "\n -f Hide errors"
+//usage: )
+//usage:
+//usage:#define chmod_example_usage
+//usage: "$ ls -l /tmp/foo\n"
+//usage: "-rw-rw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n"
+//usage: "$ chmod u+x /tmp/foo\n"
+//usage: "$ ls -l /tmp/foo\n"
+//usage: "-rwxrw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo*\n"
+//usage: "$ chmod 444 /tmp/foo\n"
+//usage: "$ ls -l /tmp/foo\n"
+//usage: "-r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n"
+
#include "libbb.h"
/* This is a NOEXEC applet. Be very careful! */
diff --git a/coreutils/chown.c b/coreutils/chown.c
index 282deccfb..c4c182d3c 100644
--- a/coreutils/chown.c
+++ b/coreutils/chown.c
@@ -10,6 +10,32 @@
/* BB_AUDIT SUSv3 defects - none? */
/* http://www.opengroup.org/onlinepubs/007904975/utilities/chown.html */
+//usage:#define chown_trivial_usage
+//usage: "[-RhLHP"IF_DESKTOP("cvf")"]... OWNER[<.|:>[GROUP]] FILE..."
+//usage:#define chown_full_usage "\n\n"
+//usage: "Change the owner and/or group of each FILE to OWNER and/or GROUP\n"
+//usage: "\nOptions:"
+//usage: "\n -R Recurse"
+//usage: "\n -h Affect symlinks instead of symlink targets"
+//usage: "\n -L Traverse all symlinks to directories"
+//usage: "\n -H Traverse symlinks on command line only"
+//usage: "\n -P Don't traverse symlinks (default)"
+//usage: IF_DESKTOP(
+//usage: "\n -c List changed files"
+//usage: "\n -v List all files"
+//usage: "\n -f Hide errors"
+//usage: )
+//usage:
+//usage:#define chown_example_usage
+//usage: "$ ls -l /tmp/foo\n"
+//usage: "-r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo\n"
+//usage: "$ chown root /tmp/foo\n"
+//usage: "$ ls -l /tmp/foo\n"
+//usage: "-r--r--r-- 1 root andersen 0 Apr 12 18:25 /tmp/foo\n"
+//usage: "$ chown root.root /tmp/foo\n"
+//usage: "ls -l /tmp/foo\n"
+//usage: "-r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n"
+
#include "libbb.h"
/* This is a NOEXEC applet. Be very careful! */
diff --git a/coreutils/chroot.c b/coreutils/chroot.c
index 5ac2e890e..ab8beb023 100644
--- a/coreutils/chroot.c
+++ b/coreutils/chroot.c
@@ -9,6 +9,19 @@
/* BB_AUDIT SUSv3 N/A -- Matches GNU behavior. */
+//usage:#define chroot_trivial_usage
+//usage: "NEWROOT [PROG ARGS]"
+//usage:#define chroot_full_usage "\n\n"
+//usage: "Run PROG with root directory set to NEWROOT"
+//usage:
+//usage:#define chroot_example_usage
+//usage: "$ ls -l /bin/ls\n"
+//usage: "lrwxrwxrwx 1 root root 12 Apr 13 00:46 /bin/ls -> /BusyBox\n"
+//usage: "# mount /dev/hdc1 /mnt -t minix\n"
+//usage: "# chroot /mnt\n"
+//usage: "# ls -l /bin/ls\n"
+//usage: "-rwxr-xr-x 1 root root 40816 Feb 5 07:45 /bin/ls*\n"
+
#include "libbb.h"
int chroot_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
diff --git a/coreutils/cksum.c b/coreutils/cksum.c
index 53fb87a78..ac0b0c319 100644
--- a/coreutils/cksum.c
+++ b/coreutils/cksum.c
@@ -6,6 +6,12 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+
+//usage:#define cksum_trivial_usage
+//usage: "FILES..."
+//usage:#define cksum_full_usage "\n\n"
+//usage: "Calculate the CRC32 checksums of FILES"
+
#include "libbb.h"
/* This is a NOEXEC applet. Be very careful! */
diff --git a/coreutils/comm.c b/coreutils/comm.c
index c04da1896..7da6b25f9 100644
--- a/coreutils/comm.c
+++ b/coreutils/comm.c
@@ -7,6 +7,15 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//usage:#define comm_trivial_usage
+//usage: "[-123] FILE1 FILE2"
+//usage:#define comm_full_usage "\n\n"
+//usage: "Compare FILE1 with FILE2\n"
+//usage: "\nOptions:"
+//usage: "\n -1 Suppress lines unique to FILE1"
+//usage: "\n -2 Suppress lines unique to FILE2"
+//usage: "\n -3 Suppress lines common to both files"
+
#include "libbb.h"
#define COMM_OPT_1 (1 << 0)
diff --git a/coreutils/cp.c b/coreutils/cp.c
index ab17b39a6..337054d7b 100644
--- a/coreutils/cp.c
+++ b/coreutils/cp.c
@@ -15,6 +15,24 @@
* Size reduction.
*/
+//usage:#define cp_trivial_usage
+//usage: "[OPTIONS] SOURCE DEST"
+//usage:#define cp_full_usage "\n\n"
+//usage: "Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY\n"
+//usage: "\nOptions:"
+//usage: "\n -a Same as -dpR"
+//usage: IF_SELINUX(
+//usage: "\n -c Preserve security context"
+//usage: )
+//usage: "\n -R,-r Recurse"
+//usage: "\n -d,-P Preserve symlinks (default if -R)"
+//usage: "\n -L Follow all symlinks"
+//usage: "\n -H Follow symlinks on command line"
+//usage: "\n -p Preserve file attributes if possible"
+//usage: "\n -f Overwrite"
+//usage: "\n -i Prompt before overwrite"
+//usage: "\n -l,-s Create (sym)links"
+
#include "libbb.h"
#include "libcoreutils/coreutils.h"
diff --git a/coreutils/cut.c b/coreutils/cut.c
index 38cd32c77..dfa1833b4 100644
--- a/coreutils/cut.c
+++ b/coreutils/cut.c
@@ -9,6 +9,24 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//usage:#define cut_trivial_usage
+//usage: "[OPTIONS] [FILE]..."
+//usage:#define cut_full_usage "\n\n"
+//usage: "Print selected fields from each input FILE to stdout\n"
+//usage: "\nOptions:"
+//usage: "\n -b LIST Output only bytes from LIST"
+//usage: "\n -c LIST Output only characters from LIST"
+//usage: "\n -d CHAR Use CHAR instead of tab as the field delimiter"
+//usage: "\n -s Output only the lines containing delimiter"
+//usage: "\n -f N Print only these fields"
+//usage: "\n -n Ignored"
+//usage:
+//usage:#define cut_example_usage
+//usage: "$ echo \"Hello world\" | cut -f 1 -d ' '\n"
+//usage: "Hello\n"
+//usage: "$ echo \"Hello world\" | cut -f 2 -d ' '\n"
+//usage: "world\n"
+
#include "libbb.h"
/* This is a NOEXEC applet. Be very careful! */
diff --git a/coreutils/dd.c b/coreutils/dd.c
index 9973a145b..8a2eaed72 100644
--- a/coreutils/dd.c
+++ b/coreutils/dd.c
@@ -8,6 +8,39 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//usage:#define dd_trivial_usage
+//usage: "[if=FILE] [of=FILE] " IF_FEATURE_DD_IBS_OBS("[ibs=N] [obs=N] ") "[bs=N] [count=N] [skip=N]\n"
+//usage: " [seek=N]" IF_FEATURE_DD_IBS_OBS(" [conv=notrunc|noerror|sync|fsync]")
+//usage:#define dd_full_usage "\n\n"
+//usage: "Copy a file with converting and formatting\n"
+//usage: "\nOptions:"
+//usage: "\n if=FILE Read from FILE instead of stdin"
+//usage: "\n of=FILE Write to FILE instead of stdout"
+//usage: "\n bs=N Read and write N bytes at a time"
+//usage: IF_FEATURE_DD_IBS_OBS(
+//usage: "\n ibs=N Read N bytes at a time"
+//usage: )
+//usage: IF_FEATURE_DD_IBS_OBS(
+//usage: "\n obs=N Write N bytes at a time"
+//usage: )
+//usage: "\n count=N Copy only N input blocks"
+//usage: "\n skip=N Skip N input blocks"
+//usage: "\n seek=N Skip N output blocks"
+//usage: IF_FEATURE_DD_IBS_OBS(
+//usage: "\n conv=notrunc Don't truncate output file"
+//usage: "\n conv=noerror Continue after read errors"
+//usage: "\n conv=sync Pad blocks with zeros"
+//usage: "\n conv=fsync Physically write data out before finishing"
+//usage: )
+//usage: "\n"
+//usage: "\nNumbers may be suffixed by c (x1), w (x2), b (x512), kD (x1000), k (x1024),"
+//usage: "\nMD (x1000000), M (x1048576), GD (x1000000000) or G (x1073741824)"
+//usage:
+//usage:#define dd_example_usage
+//usage: "$ dd if=/dev/zero of=/dev/ram1 bs=1M count=4\n"
+//usage: "4+0 records in\n"
+//usage: "4+0 records out\n"
+
#include "libbb.h"
/* This is a NOEXEC applet. Be very careful! */
diff --git a/coreutils/df.c b/coreutils/df.c
index 70fd1f4fd..518e856a2 100644
--- a/coreutils/df.c
+++ b/coreutils/df.c
@@ -22,6 +22,41 @@
* Implement -P and -B; better coreutils compat; cleanup
*/
+//usage:#define df_trivial_usage
+//usage: "[-Pk"
+//usage: IF_FEATURE_HUMAN_READABLE("mh")
+//usage: IF_FEATURE_DF_FANCY("ai] [-B SIZE")
+//usage: "] [FILESYSTEM]..."
+//usage:#define df_full_usage "\n\n"
+//usage: "Print filesystem usage statistics\n"
+//usage: "\nOptions:"
+//usage: "\n -P POSIX output format"
+//usage: "\n -k 1024-byte blocks (default)"
+//usage: IF_FEATURE_HUMAN_READABLE(
+//usage: "\n -m 1M-byte blocks"
+//usage: "\n -h Human readable (e.g. 1K 243M 2G)"
+//usage: )
+//usage: IF_FEATURE_DF_FANCY(
+//usage: "\n -a Show all filesystems"
+//usage: "\n -i Inodes"
+//usage: "\n -B SIZE Blocksize"
+//usage: )
+//usage:
+//usage:#define df_example_usage
+//usage: "$ df\n"
+//usage: "Filesystem 1K-blocks Used Available Use% Mounted on\n"
+//usage: "/dev/sda3 8690864 8553540 137324 98% /\n"
+//usage: "/dev/sda1 64216 36364 27852 57% /boot\n"
+//usage: "$ df /dev/sda3\n"
+//usage: "Filesystem 1K-blocks Used Available Use% Mounted on\n"
+//usage: "/dev/sda3 8690864 8553540 137324 98% /\n"
+//usage: "$ POSIXLY_CORRECT=sure df /dev/sda3\n"
+//usage: "Filesystem 512B-blocks Used Available Use% Mounted on\n"
+//usage: "/dev/sda3 17381728 17107080 274648 98% /\n"
+//usage: "$ POSIXLY_CORRECT=yep df -P /dev/sda3\n"
+//usage: "Filesystem 512-blocks Used Available Capacity Mounted on\n"
+//usage: "/dev/sda3 17381728 17107080 274648 98% /\n"
+
#include <mntent.h>
#include <sys/vfs.h>
#include "libbb.h"
diff --git a/coreutils/dirname.c b/coreutils/dirname.c
index 246946ed0..101067c90 100644
--- a/coreutils/dirname.c
+++ b/coreutils/dirname.c
@@ -10,6 +10,17 @@
/* BB_AUDIT SUSv3 compliant */
/* http://www.opengroup.org/onlinepubs/007904975/utilities/dirname.html */
+//usage:#define dirname_trivial_usage
+//usage: "FILENAME"
+//usage:#define dirname_full_usage "\n\n"
+//usage: "Strip non-directory suffix from FILENAME"
+//usage:
+//usage:#define dirname_example_usage
+//usage: "$ dirname /tmp/foo\n"
+//usage: "/tmp\n"
+//usage: "$ dirname /tmp/foo/\n"
+//usage: "/tmp\n"
+
#include "libbb.h"
/* This is a NOFORK applet. Be very careful! */
diff --git a/coreutils/dos2unix.c b/coreutils/dos2unix.c
index eab8110dc..df2376bea 100644
--- a/coreutils/dos2unix.c
+++ b/coreutils/dos2unix.c
@@ -12,6 +12,24 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//usage:#define dos2unix_trivial_usage
+//usage: "[-ud] [FILE]"
+//usage:#define dos2unix_full_usage "\n\n"
+//usage: "Convert FILE in-place from DOS to Unix format.\n"
+//usage: "When no file is given, use stdin/stdout.\n"
+//usage: "\nOptions:"
+//usage: "\n -u dos2unix"
+//usage: "\n -d unix2dos"
+//usage:
+//usage:#define unix2dos_trivial_usage
+//usage: "[-ud] [FILE]"
+//usage:#define unix2dos_full_usage "\n\n"
+//usage: "Convert FILE in-place from Unix to DOS format.\n"
+//usage: "When no file is given, use stdin/stdout.\n"
+//usage: "\nOptions:"
+//usage: "\n -u dos2unix"
+//usage: "\n -d unix2dos"
+
#include "libbb.h"
/* This is a NOEXEC applet. Be very careful! */
diff --git a/coreutils/du.c b/coreutils/du.c
index cc3c78433..7a6662d1e 100644
--- a/coreutils/du.c
+++ b/coreutils/du.c
@@ -23,6 +23,43 @@
* 4) Fixed busybox bug #1284 involving long overflow with human_readable.
*/
+//usage:#define du_trivial_usage
+//usage: "[-aHLdclsx" IF_FEATURE_HUMAN_READABLE("hm") "k] [FILE]..."
+//usage:#define du_full_usage "\n\n"
+//usage: "Summarize disk space used for each FILE and/or directory.\n"
+//usage: "Disk space is printed in units of "
+//usage: IF_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("1024")
+//usage: IF_NOT_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("512")
+//usage: " bytes.\n"
+//usage: "\nOptions:"
+//usage: "\n -a Show file sizes too"
+//usage: "\n -L Follow all symlinks"
+//usage: "\n -H Follow symlinks on command line"
+//usage: "\n -d N Limit output to directories (and files with -a) of depth < N"
+//usage: "\n -c Show grand total"
+//usage: "\n -l Count sizes many times if hard linked"
+//usage: "\n -s Display only a total for each argument"
+//usage: "\n -x Skip directories on different filesystems"
+//usage: IF_FEATURE_HUMAN_READABLE(
+//usage: "\n -h Sizes in human readable format (e.g., 1K 243M 2G )"
+//usage: "\n -m Sizes in megabytes"
+//usage: )
+//usage: "\n -k Sizes in kilobytes"
+//usage: IF_FEATURE_DU_DEFAULT_BLOCKSIZE_1K(" (default)")
+//usage:
+//usage:#define du_example_usage
+//usage: "$ du\n"
+//usage: "16 ./CVS\n"
+//usage: "12 ./kernel-patches/CVS\n"
+//usage: "80 ./kernel-patches\n"
+//usage: "12 ./tests/CVS\n"
+//usage: "36 ./tests\n"
+//usage: "12 ./scripts/CVS\n"
+//usage: "16 ./scripts\n"
+//usage: "12 ./docs/CVS\n"
+//usage: "104 ./docs\n"
+//usage: "2417 .\n"
+
#include "libbb.h"
enum {
diff --git a/coreutils/echo.c b/coreutils/echo.c
index 72e18c161..0895e2940 100644
--- a/coreutils/echo.c
+++ b/coreutils/echo.c
@@ -23,6 +23,27 @@
* The previous version did not allow 4-digit octals.
*/
+//usage:#define echo_trivial_usage
+//usage: IF_FEATURE_FANCY_ECHO("[-neE] ") "[ARG]..."
+//usage:#define echo_full_usage "\n\n"
+//usage: "Print the specified ARGs to stdout"
+//usage: IF_FEATURE_FANCY_ECHO( "\n"
+//usage: "\nOptions:"
+//usage: "\n -n Suppress trailing newline"
+//usage: "\n -e Interpret backslash escapes (i.e., \\t=tab)"
+//usage: "\n -E Don't interpret backslash escapes (default)"
+//usage: )
+//usage:
+//usage:#define echo_example_usage
+//usage: "$ echo \"Erik is cool\"\n"
+//usage: "Erik is cool\n"
+//usage: IF_FEATURE_FANCY_ECHO("$ echo -e \"Erik\\nis\\ncool\"\n"
+//usage: "Erik\n"
+//usage: "is\n"
+//usage: "cool\n"
+//usage: "$ echo \"Erik\\nis\\ncool\"\n"
+//usage: "Erik\\nis\\ncool\n")
+
#include "libbb.h"
/* This is a NOFORK applet. Be very careful! */
diff --git a/coreutils/env.c b/coreutils/env.c
index d64a71439..747c668da 100644
--- a/coreutils/env.c
+++ b/coreutils/env.c
@@ -31,6 +31,15 @@
/* This is a NOEXEC applet. Be very careful! */
+//usage:#define env_trivial_usage
+//usage: "[-iu] [-] [name=value]... [PROG ARGS]"
+//usage:#define env_full_usage "\n\n"
+//usage: "Print the current environment or run PROG after setting up\n"
+//usage: "the specified environment\n"
+//usage: "\nOptions:"
+//usage: "\n -, -i Start with an empty environment"
+//usage: "\n -u Remove variable from the environment"
+
#include "libbb.h"
#if ENABLE_FEATURE_ENV_LONG_OPTIONS
diff --git a/coreutils/expand.c b/coreutils/expand.c
index 7491b717a..73ab0ece3 100644
--- a/coreutils/expand.c
+++ b/coreutils/expand.c
@@ -20,6 +20,37 @@
*
* Caveat: this versions of expand and unexpand don't accept tab lists.
*/
+
+//usage:#define expand_trivial_usage
+//usage: "[-i] [-t N] [FILE]..."
+//usage:#define expand_full_usage "\n\n"
+//usage: "Convert tabs to spaces, writing to stdout\n"
+//usage: "\nOptions:"
+//usage: IF_FEATURE_EXPAND_LONG_OPTIONS(
+//usage: "\n -i,--initial Don't convert tabs after non blanks"
+//usage: "\n -t,--tabs=N Tabstops every N chars"
+//usage: )
+//usage: IF_NOT_FEATURE_EXPAND_LONG_OPTIONS(
+//usage: "\n -i Don't convert tabs after non blanks"
+//usage: "\n -t Tabstops every N chars"
+//usage: )
+
+//usage:#define unexpand_trivial_usage
+//usage: "[-fa][-t N] [FILE]..."
+//usage:#define unexpand_full_usage "\n\n"
+//usage: "Convert spaces to tabs, writing to stdout\n"
+//usage: "\nOptions:"
+//usage: IF_FEATURE_UNEXPAND_LONG_OPTIONS(
+//usage: "\n -a,--all Convert all blanks"
+//usage: "\n -f,--first-only Convert only leading blanks"
+//usage: "\n -t,--tabs=N Tabstops every N chars"
+//usage: )
+//usage: IF_NOT_FEATURE_UNEXPAND_LONG_OPTIONS(
+//usage: "\n -a Convert all blanks"
+//usage: "\n -f Convert only leading blanks"
+//usage: "\n -t N Tabstops every N chars"
+//usage: )
+
#include "libbb.h"
#include "unicode.h"
diff --git a/coreutils/expr.c b/coreutils/expr.c
index 04d783f2b..24e75b556 100644
--- a/coreutils/expr.c
+++ b/coreutils/expr.c
@@ -25,6 +25,41 @@
/* no getopt needed */
+//usage:#define expr_trivial_usage
+//usage: "EXPRESSION"
+//usage:#define expr_full_usage "\n\n"
+//usage: "Print the value of EXPRESSION to stdout\n"
+//usage: "\n"
+//usage: "EXPRESSION may be:\n"
+//usage: " ARG1 | ARG2 ARG1 if it is neither null nor 0, otherwise ARG2\n"
+//usage: " ARG1 & ARG2 ARG1 if neither argument is null or 0, otherwise 0\n"
+//usage: " ARG1 < ARG2 1 if ARG1 is less than ARG2, else 0. Similarly:\n"
+//usage: " ARG1 <= ARG2\n"
+//usage: " ARG1 = ARG2\n"
+//usage: " ARG1 != ARG2\n"
+//usage: " ARG1 >= ARG2\n"
+//usage: " ARG1 > ARG2\n"
+//usage: " ARG1 + ARG2 Sum of ARG1 and ARG2. Similarly:\n"
+//usage: " ARG1 - ARG2\n"
+//usage: " ARG1 * ARG2\n"
+//usage: " ARG1 / ARG2\n"
+//usage: " ARG1 % ARG2\n"
+//usage: " STRING : REGEXP Anchored pattern match of REGEXP in STRING\n"
+//usage: " match STRING REGEXP Same as STRING : REGEXP\n"
+//usage: " substr STRING POS LENGTH Substring of STRING, POS counted from 1\n"
+//usage: " index STRING CHARS Index in STRING where any CHARS is found, or 0\n"
+//usage: " length STRING Length of STRING\n"
+//usage: " quote TOKEN Interpret TOKEN as a string, even if\n"
+//usage: " it is a keyword like 'match' or an\n"
+//usage: " operator like '/'\n"
+//usage: " (EXPRESSION) Value of EXPRESSION\n"
+//usage: "\n"
+//usage: "Beware that many operators need to be escaped or quoted for shells.\n"
+//usage: "Comparisons are arithmetic if both ARGs are numbers, else\n"
+//usage: "lexicographical. Pattern matches return the string matched between\n"
+//usage: "\\( and \\) or null; if \\( and \\) are not used, they return the number\n"
+//usage: "of characters matched or 0."
+
#include "libbb.h"
#include "xregex.h"
diff --git a/coreutils/false.c b/coreutils/false.c
index 033d2bff4..59c2f321a 100644
--- a/coreutils/false.c
+++ b/coreutils/false.c
@@ -10,6 +10,16 @@
/* BB_AUDIT SUSv3 compliant */
/* http://www.opengroup.org/onlinepubs/000095399/utilities/false.html */
+//usage:#define false_trivial_usage
+//usage: ""
+//usage:#define false_full_usage "\n\n"
+//usage: "Return an exit code of FALSE (1)"
+//usage:
+//usage:#define false_example_usage
+//usage: "$ false\n"
+//usage: "$ echo $?\n"
+//usage: "1\n"
+
#include "libbb.h"
/* This is a NOFORK applet. Be very careful! */
diff --git a/coreutils/fold.c b/coreutils/fold.c
index 4a6429ad7..3fe668512 100644
--- a/coreutils/fold.c
+++ b/coreutils/fold.c
@@ -9,6 +9,16 @@
Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+
+//usage:#define fold_trivial_usage
+//usage: "[-bs] [-w WIDTH] [FILE]..."
+//usage:#define fold_full_usage "\n\n"
+//usage: "Wrap input lines in each FILE (or stdin), writing to stdout\n"
+//usage: "\nOptions:"
+//usage: "\n -b Count bytes rather than columns"
+//usage: "\n -s Break at spaces"
+//usage: "\n -w Use WIDTH columns instead of 80"
+
#include "libbb.h"
#include "unicode.h"
diff --git a/coreutils/fsync.c b/coreutils/fsync.c
index b8b463cd1..518c5642b 100644
--- a/coreutils/fsync.c
+++ b/coreutils/fsync.c
@@ -6,6 +6,14 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+
+//usage:#define fsync_trivial_usage
+//usage: "[-d] FILE..."
+//usage:#define fsync_full_usage "\n\n"
+//usage: "Write files' buffered blocks to disk\n"
+//usage: "\nOptions:"
+//usage: "\n -d Avoid syncing metadata"
+
#include "libbb.h"
#ifndef O_NOATIME
# define O_NOATIME 0
diff --git a/coreutils/head.c b/coreutils/head.c
index 669aae819..f49320ef4 100644
--- a/coreutils/head.c
+++ b/coreutils/head.c
@@ -11,6 +11,26 @@
/* BB_AUDIT GNU compatible -c, -q, and -v options in 'fancy' configuration. */
/* http://www.opengroup.org/onlinepubs/007904975/utilities/head.html */
+//usage:#define head_trivial_usage
+//usage: "[OPTIONS] [FILE]..."
+//usage:#define head_full_usage "\n\n"
+//usage: "Print first 10 lines of each FILE (or stdin) to stdout.\n"
+//usage: "With more than one FILE, precede each with a filename header.\n"
+//usage: "\nOptions:"
+//usage: "\n -n N[kbm] Print first N lines"
+//usage: IF_FEATURE_FANCY_HEAD(
+//usage: "\n -c N[kbm] Print first N bytes"
+//usage: "\n -q Never print headers"
+//usage: "\n -v Always print headers"
+//usage: )
+//usage: "\n"
+//usage: "\nN may be suffixed by k (x1024), b (x512), or m (x1024^2)."
+//usage:
+//usage:#define head_example_usage
+//usage: "$ head -n 2 /etc/passwd\n"
+//usage: "root:x:0:0:root:/root:/bin/bash\n"
+//usage: "daemon:x:1:1:daemon:/usr/sbin:/bin/sh\n"
+
#include "libbb.h"
/* This is a NOEXEC applet. Be very careful! */
diff --git a/coreutils/hostid.c b/coreutils/hostid.c
index 635e48e12..49409b9de 100644
--- a/coreutils/hostid.c
+++ b/coreutils/hostid.c
@@ -9,6 +9,11 @@
/* BB_AUDIT SUSv3 N/A -- Matches GNU behavior. */
+//usage:#define hostid_trivial_usage
+//usage: ""
+//usage:#define hostid_full_usage "\n\n"
+//usage: "Print out a unique 32-bit identifier for the machine"
+
#include "libbb.h"
/* This is a NOFORK applet. Be very careful! */
diff --git a/coreutils/id.c b/coreutils/id.c
index 0639325c3..42ed4c749 100644
--- a/coreutils/id.c
+++ b/coreutils/id.c
@@ -15,6 +15,24 @@
* Added -G option Tito Ragusa (C) 2008 for SUSv3.
*/
+//usage:#define id_trivial_usage
+//usage: "[OPTIONS] [USER]"
+//usage:#define id_full_usage "\n\n"
+//usage: "Print information about USER or the current user\n"
+//usage: "\nOptions:"
+//usage: IF_SELINUX(
+//usage: "\n -Z Security context"
+//usage: )
+//usage: "\n -u User ID"
+//usage: "\n -g Group ID"
+//usage: "\n -G Supplementary group IDs"
+//usage: "\n -n Print names instead of numbers"
+//usage: "\n -r Print real ID instead of effective ID"
+//usage:
+//usage:#define id_example_usage
+//usage: "$ id\n"
+//usage: "uid=1000(andersen) gid=1000(andersen)\n"
+
#include "libbb.h"
/* This is a NOEXEC applet. Be very careful! */
diff --git a/coreutils/install.c b/coreutils/install.c
index 9dc90d641..fe5f26e79 100644
--- a/coreutils/install.c
+++ b/coreutils/install.c
@@ -6,6 +6,24 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+/* -v, -b, -c are ignored */
+//usage:#define install_trivial_usage
+//usage: "[-cdDsp] [-o USER] [-g GRP] [-m MODE] [SOURCE]... DEST"
+//usage:#define install_full_usage "\n\n"
+//usage: "Copy files and set attributes\n"
+//usage: "\nOptions:"
+//usage: "\n -c Just copy (default)"
+//usage: "\n -d Create directories"
+//usage: "\n -D Create leading target directories"
+//usage: "\n -s Strip symbol table"
+//usage: "\n -p Preserve date"
+//usage: "\n -o USER Set ownership"
+//usage: "\n -g GRP Set group ownership"
+//usage: "\n -m MODE Set permissions"
+//usage: IF_SELINUX(
+//usage: "\n -Z Set security context"
+//usage: )
+
#include "libbb.h"
#include "libcoreutils/coreutils.h"
diff --git a/coreutils/ln.c b/coreutils/ln.c
index 6da290c11..2da915a68 100644
--- a/coreutils/ln.c
+++ b/coreutils/ln.c
@@ -11,6 +11,22 @@
/* BB_AUDIT GNU options missing: -d, -F, -i, and -v. */
/* http://www.opengroup.org/onlinepubs/007904975/utilities/ln.html */
+//usage:#define ln_trivial_usage
+//usage: "[OPTIONS] TARGET... LINK|DIR"
+//usage:#define ln_full_usage "\n\n"
+//usage: "Create a link LINK or DIR/TARGET to the specified TARGET(s)\n"
+//usage: "\nOptions:"
+//usage: "\n -s Make symlinks instead of hardlinks"
+//usage: "\n -f Remove existing destinations"
+//usage: "\n -n Don't dereference symlinks - treat like normal file"
+//usage: "\n -b Make a backup of the target (if exists) before link operation"
+//usage: "\n -S suf Use suffix instead of ~ when making backup files"
+//usage:
+//usage:#define ln_example_usage
+//usage: "$ ln -s BusyBox /tmp/ls\n"
+//usage: "$ ls -l /tmp/ls\n"
+//usage: "lrwxrwxrwx 1 root root 7 Apr 12 18:39 ls -> BusyBox*\n"
+
#include "libbb.h"
/* This is a NOEXEC applet. Be very careful! */
diff --git a/coreutils/logname.c b/coreutils/logname.c
index 62f453f2f..10b9615a1 100644
--- a/coreutils/logname.c
+++ b/coreutils/logname.c
@@ -20,6 +20,15 @@
* a diagnostic message and an error return.
*/
+//usage:#define logname_trivial_usage
+//usage: ""
+//usage:#define logname_full_usage "\n\n"
+//usage: "Print the name of the current user"
+//usage:
+//usage:#define logname_example_usage
+//usage: "$ logname\n"
+//usage: "root\n"
+
#include "libbb.h"
/* This is a NOFORK applet. Be very careful! */
diff --git a/coreutils/md5_sha1_sum.c b/coreutils/md5_sha1_sum.c
index 3b897c18f..09f3a0080 100644
--- a/coreutils/md5_sha1_sum.c
+++ b/coreutils/md5_sha1_sum.c
@@ -6,6 +6,64 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//usage:#define md5sum_trivial_usage
+//usage: "[FILE]..."
+//usage: IF_FEATURE_MD5_SHA1_SUM_CHECK("\n or: md5sum -c [-sw] [FILE]")
+//usage:#define md5sum_full_usage "\n\n"
+//usage: "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " MD5 checksums"
+//usage: IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n"
+//usage: "\nOptions:"
+//usage: "\n -c Check sums against given list"
+//usage: "\n -s Don't output anything, status code shows success"
+//usage: "\n -w Warn about improperly formatted checksum lines"
+//usage: )
+//usage:
+//usage:#define md5sum_example_usage
+//usage: "$ md5sum < busybox\n"
+//usage: "6fd11e98b98a58f64ff3398d7b324003\n"
+//usage: "$ md5sum busybox\n"
+//usage: "6fd11e98b98a58f64ff3398d7b324003 busybox\n"
+//usage: "$ md5sum -c -\n"
+//usage: "6fd11e98b98a58f64ff3398d7b324003 busybox\n"
+//usage: "busybox: OK\n"
+//usage: "^D\n"
+//usage:
+//usage:#define sha1sum_trivial_usage
+//usage: "[FILE]..."
+//usage: IF_FEATURE_MD5_SHA1_SUM_CHECK("\n or: sha1sum -c [-sw] [FILE]")
+//usage:#define sha1sum_full_usage "\n\n"
+//usage: "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA1 checksums"
+//usage: IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n"
+//usage: "\nOptions:"
+//usage: "\n -c Check sums against given list"
+//usage: "\n -s Don't output anything, status code shows success"
+//usage: "\n -w Warn about improperly formatted checksum lines"
+//usage: )
+//usage:
+//usage:#define sha256sum_trivial_usage
+//usage: "[FILE]..."
+//usage: IF_FEATURE_MD5_SHA1_SUM_CHECK("\n or: sha256sum -c [-sw] [FILE]")
+//usage:#define sha256sum_full_usage "\n\n"
+//usage: "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA256 checksums"
+//usage: IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n"
+//usage: "\nOptions:"
+//usage: "\n -c Check sums against given list"
+//usage: "\n -s Don't output anything, status code shows success"
+//usage: "\n -w Warn about improperly formatted checksum lines"
+//usage: )
+//usage:
+//usage:#define sha512sum_trivial_usage
+//usage: "[FILE]..."
+//usage: IF_FEATURE_MD5_SHA1_SUM_CHECK("\n or: sha512sum -c [-sw] [FILE]")
+//usage:#define sha512sum_full_usage "\n\n"
+//usage: "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA512 checksums"
+//usage: IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n"
+//usage: "\nOptions:"
+//usage: "\n -c Check sums against given list"
+//usage: "\n -s Don't output anything, status code shows success"
+//usage: "\n -w Warn about improperly formatted checksum lines"
+//usage: )
+
#include "libbb.h"
/* This is a NOEXEC applet. Be very careful! */
diff --git a/coreutils/mkdir.c b/coreutils/mkdir.c
index 0de0d5c3b..e425bbe5e 100644
--- a/coreutils/mkdir.c
+++ b/coreutils/mkdir.c
@@ -19,6 +19,25 @@
/* Nov 28, 2006 Yoshinori Sato <ysato@users.sourceforge.jp>: Add SELinux Support.
*/
+//usage:#define mkdir_trivial_usage
+//usage: "[OPTIONS] DIRECTORY..."
+//usage:#define mkdir_full_usage "\n\n"
+//usage: "Create DIRECTORY\n"
+//usage: "\nOptions:"
+//usage: "\n -m MODE Mode"
+//usage: "\n -p No error if exists; make parent directories as needed"
+//usage: IF_SELINUX(
+//usage: "\n -Z Set security context"
+//usage: )
+//usage:
+//usage:#define mkdir_example_usage
+//usage: "$ mkdir /tmp/foo\n"
+//usage: "$ mkdir /tmp/foo\n"
+//usage: "/tmp/foo: File exists\n"
+//usage: "$ mkdir /tmp/foo/bar/baz\n"
+//usage: "/tmp/foo/bar/baz: No such file or directory\n"
+//usage: "$ mkdir -p /tmp/foo/bar/baz\n"
+
#include "libbb.h"
/* This is a NOFORK applet. Be very careful! */
diff --git a/coreutils/mkfifo.c b/coreutils/mkfifo.c
index d908ce45e..84d8d99dd 100644
--- a/coreutils/mkfifo.c
+++ b/coreutils/mkfifo.c
@@ -10,6 +10,16 @@
/* BB_AUDIT SUSv3 compliant */
/* http://www.opengroup.org/onlinepubs/007904975/utilities/mkfifo.html */
+//usage:#define mkfifo_trivial_usage
+//usage: "[-m MODE] " IF_SELINUX("[-Z] ") "NAME"
+//usage:#define mkfifo_full_usage "\n\n"
+//usage: "Create named pipe\n"
+//usage: "\nOptions:"
+//usage: "\n -m MODE Mode (default a=rw)"
+//usage: IF_SELINUX(
+//usage: "\n -Z Set security context"
+//usage: )
+
#include "libbb.h"
#include "libcoreutils/coreutils.h"
diff --git a/coreutils/mknod.c b/coreutils/mknod.c
index 14d91b5df..50dbd62e3 100644
--- a/coreutils/mknod.c
+++ b/coreutils/mknod.c
@@ -9,6 +9,24 @@
/* BB_AUDIT SUSv3 N/A -- Matches GNU behavior. */
+//usage:#define mknod_trivial_usage
+//usage: "[-m MODE] " IF_SELINUX("[-Z] ") "NAME TYPE MAJOR MINOR"
+//usage:#define mknod_full_usage "\n\n"
+//usage: "Create a special file (block, character, or pipe)\n"
+//usage: "\nOptions:"
+//usage: "\n -m MODE Creation mode (default a=rw)"
+//usage: IF_SELINUX(
+//usage: "\n -Z Set security context"
+//usage: )
+//usage: "\nTYPE:"
+//usage: "\n b Block device"
+//usage: "\n c or u Character device"
+//usage: "\n p Named pipe (MAJOR and MINOR are ignored)"
+//usage:
+//usage:#define mknod_example_usage
+//usage: "$ mknod /dev/fd0 b 2 0\n"
+//usage: "$ mknod -m 644 /tmp/pipe p\n"
+
#include <sys/sysmacros.h> // For makedev
#include "libbb.h"
diff --git a/coreutils/nice.c b/coreutils/nice.c
index 35d6bf3d9..2763986e7 100644
--- a/coreutils/nice.c
+++ b/coreutils/nice.c
@@ -7,6 +7,13 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//usage:#define nice_trivial_usage
+//usage: "[-n ADJUST] [PROG ARGS]"
+//usage:#define nice_full_usage "\n\n"
+//usage: "Change scheduling priority, run PROG\n"
+//usage: "\nOptions:"
+//usage: "\n -n ADJUST Adjust priority by ADJUST"
+
#include <sys/resource.h>
#include "libbb.h"
diff --git a/coreutils/nohup.c b/coreutils/nohup.c
index c21aae9f5..63853fd55 100644
--- a/coreutils/nohup.c
+++ b/coreutils/nohup.c
@@ -10,6 +10,14 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//usage:#define nohup_trivial_usage
+//usage: "PROG ARGS"
+//usage:#define nohup_full_usage "\n\n"
+//usage: "Run PROG immune to hangups, with output to a non-tty"
+//usage:
+//usage:#define nohup_example_usage
+//usage: "$ nohup make &"
+
#include "libbb.h"
/* Compat info: nohup (GNU coreutils 6.8) does this:
diff --git a/coreutils/od.c b/coreutils/od.c
index e62711671..31ebde210 100644
--- a/coreutils/od.c
+++ b/coreutils/od.c
@@ -11,6 +11,11 @@
* Original copyright notice is retained at the end of this file.
*/
+//usage:#define od_trivial_usage
+//usage: "[-aBbcDdeFfHhIiLlOovXx] " IF_DESKTOP("[-t TYPE] ") "[FILE]"
+//usage:#define od_full_usage "\n\n"
+//usage: "Write an unambiguous representation, octal bytes by default, of FILE\n"
+//usage: "(or stdin) to stdout"
#include "libbb.h"
#if ENABLE_DESKTOP
diff --git a/coreutils/printenv.c b/coreutils/printenv.c
index d0fb71636..bd5db7073 100644
--- a/coreutils/printenv.c
+++ b/coreutils/printenv.c
@@ -8,6 +8,12 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//usage:#define printenv_trivial_usage
+//usage: "[VARIABLE]..."
+//usage:#define printenv_full_usage "\n\n"
+//usage: "Print environment VARIABLEs.\n"
+//usage: "If no VARIABLE specified, print all."
+
#include "libbb.h"
/* This is a NOFORK applet. Be very careful! */
diff --git a/coreutils/printf.c b/coreutils/printf.c
index c8395fa89..f53aa4787 100644
--- a/coreutils/printf.c
+++ b/coreutils/printf.c
@@ -38,6 +38,16 @@
// 19990508 Busy Boxed! Dave Cinege
+//usage:#define printf_trivial_usage
+//usage: "FORMAT [ARGUMENT]..."
+//usage:#define printf_full_usage "\n\n"
+//usage: "Format and print ARGUMENT(s) according to FORMAT,\n"
+//usage: "where FORMAT controls the output exactly as in C printf"
+//usage:
+//usage:#define printf_example_usage
+//usage: "$ printf \"Val=%d\\n\" 5\n"
+//usage: "Val=5\n"
+
#include "libbb.h"
/* A note on bad input: neither bash 3.2 nor coreutils 6.10 stop on it.
diff --git a/coreutils/pwd.c b/coreutils/pwd.c
index 2949c55c2..739b835b5 100644
--- a/coreutils/pwd.c
+++ b/coreutils/pwd.c
@@ -7,6 +7,15 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//usage:#define pwd_trivial_usage
+//usage: ""
+//usage:#define pwd_full_usage "\n\n"
+//usage: "Print the full filename of the current working directory"
+//usage:
+//usage:#define pwd_example_usage
+//usage: "$ pwd\n"
+//usage: "/root\n"
+
#include "libbb.h"
/* This is a NOFORK applet. Be very careful! */
diff --git a/coreutils/readlink.c b/coreutils/readlink.c
index 87602fbc6..1a0eca646 100644
--- a/coreutils/readlink.c
+++ b/coreutils/readlink.c
@@ -6,6 +6,18 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+
+//usage:#define readlink_trivial_usage
+//usage: IF_FEATURE_READLINK_FOLLOW("[-fnv] ") "FILE"
+//usage:#define readlink_full_usage "\n\n"
+//usage: "Display the value of a symlink"
+//usage: IF_FEATURE_READLINK_FOLLOW( "\n"
+//usage: "\nOptions:"
+//usage: "\n -f Canonicalize by following all symlinks"
+//usage: "\n -n Don't add newline"
+//usage: "\n -v Verbose"
+//usage: )
+
#include "libbb.h"
/*
diff --git a/coreutils/realpath.c b/coreutils/realpath.c
index 5933062b8..c513b5549 100644
--- a/coreutils/realpath.c
+++ b/coreutils/realpath.c
@@ -10,6 +10,11 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//usage:#define realpath_trivial_usage
+//usage: "FILE..."
+//usage:#define realpath_full_usage "\n\n"
+//usage: "Return the absolute pathnames of given FILE"
+
#include "libbb.h"
int realpath_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
diff --git a/coreutils/rm.c b/coreutils/rm.c
index 69c473ddb..8efd895cc 100644
--- a/coreutils/rm.c
+++ b/coreutils/rm.c
@@ -15,6 +15,18 @@
* Size reduction.
*/
+//usage:#define rm_trivial_usage
+//usage: "[-irf] FILE..."
+//usage:#define rm_full_usage "\n\n"
+//usage: "Remove (unlink) FILEs\n"
+//usage: "\nOptions:"
+//usage: "\n -i Always prompt before removing"
+//usage: "\n -f Never prompt"
+//usage: "\n -R,-r Recurse"
+//usage:
+//usage:#define rm_example_usage
+//usage: "$ rm -rf /tmp/foo\n"
+
#include "libbb.h"
/* This is a NOFORK applet. Be very careful! */
diff --git a/coreutils/rmdir.c b/coreutils/rmdir.c
index 231793ce0..0dbd940a1 100644
--- a/coreutils/rmdir.c
+++ b/coreutils/rmdir.c
@@ -10,6 +10,22 @@
/* BB_AUDIT SUSv3 compliant */
/* http://www.opengroup.org/onlinepubs/007904975/utilities/rmdir.html */
+//usage:#define rmdir_trivial_usage
+//usage: "[OPTIONS] DIRECTORY..."
+//usage:#define rmdir_full_usage "\n\n"
+//usage: "Remove DIRECTORY if it is empty\n"
+//usage: "\nOptions:"
+//usage: IF_FEATURE_RMDIR_LONG_OPTIONS(
+//usage: "\n -p|--parents Include parents"
+//usage: "\n --ignore-fail-on-non-empty"
+//usage: )
+//usage: IF_NOT_FEATURE_RMDIR_LONG_OPTIONS(
+//usage: "\n -p Include parents"
+//usage: )
+//usage:
+//usage:#define rmdir_example_usage
+//usage: "# rmdir /tmp/foo\n"
+
#include "libbb.h"
/* This is a NOFORK applet. Be very careful! */
diff --git a/coreutils/seq.c b/coreutils/seq.c
index 22bf3ec9d..b600266fd 100644
--- a/coreutils/seq.c
+++ b/coreutils/seq.c
@@ -6,6 +6,16 @@
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
+
+//usage:#define seq_trivial_usage
+//usage: "[-w] [-s SEP] [FIRST [INC]] LAST"
+//usage:#define seq_full_usage "\n\n"
+//usage: "Print numbers from FIRST to LAST, in steps of INC.\n"
+//usage: "FIRST, INC default to 1.\n"
+//usage: "\nOptions:"
+//usage: "\n -w Pad to last with leading zeros"
+//usage: "\n -s SEP String separator"
+
#include "libbb.h"
/* This is a NOFORK applet. Be very careful! */
diff --git a/coreutils/sleep.c b/coreutils/sleep.c
index 433f9d6ee..0ffbd16eb 100644
--- a/coreutils/sleep.c
+++ b/coreutils/sleep.c
@@ -18,6 +18,21 @@
* time suffixes for seconds, minutes, hours, and days.
*/
+//usage:#define sleep_trivial_usage
+//usage: IF_FEATURE_FANCY_SLEEP("[") "N" IF_FEATURE_FANCY_SLEEP("]...")
+//usage:#define sleep_full_usage "\n\n"
+//usage: IF_NOT_FEATURE_FANCY_SLEEP("Pause for N seconds")
+//usage: IF_FEATURE_FANCY_SLEEP(
+//usage: "Pause for a time equal to the total of the args given, where each arg can\n"
+//usage: "have an optional suffix of (s)econds, (m)inutes, (h)ours, or (d)ays")
+//usage:
+//usage:#define sleep_example_usage
+//usage: "$ sleep 2\n"
+//usage: "[2 second delay results]\n"
+//usage: IF_FEATURE_FANCY_SLEEP(
+//usage: "$ sleep 1d 3h 22m 8s\n"
+//usage: "[98528 second delay results]\n")
+
#include "libbb.h"
/* Do not make this applet NOFORK. It breaks ^C-ing of pauses in shells */
diff --git a/coreutils/sort.c b/coreutils/sort.c
index 3562464d1..f709ea1b3 100644
--- a/coreutils/sort.c
+++ b/coreutils/sort.c
@@ -12,6 +12,54 @@
* http://www.opengroup.org/onlinepubs/007904975/utilities/sort.html
*/
+//usage:#define sort_trivial_usage
+//usage: "[-nru"
+//usage: IF_FEATURE_SORT_BIG("gMcszbdfimSTokt] [-o FILE] [-k start[.offset][opts][,end[.offset][opts]] [-t CHAR")
+//usage: "] [FILE]..."
+//usage:#define sort_full_usage "\n\n"
+//usage: "Sort lines of text\n"
+//usage: "\nOptions:"
+//usage: IF_FEATURE_SORT_BIG(
+//usage: "\n -b Ignore leading blanks"
+//usage: "\n -c Check whether input is sorted"
+//usage: "\n -d Dictionary order (blank or alphanumeric only)"
+//usage: "\n -f Ignore case"
+//usage: "\n -g General numerical sort"
+//usage: "\n -i Ignore unprintable characters"
+//usage: "\n -k Sort key"
+//usage: "\n -M Sort month"
+//usage: )
+//usage: "\n -n Sort numbers"
+//usage: IF_FEATURE_SORT_BIG(
+//usage: "\n -o Output to file"
+//usage: "\n -k Sort by key"
+//usage: "\n -t CHAR Key separator"
+//usage: )
+//usage: "\n -r Reverse sort order"
+//usage: IF_FEATURE_SORT_BIG(
+//usage: "\n -s Stable (don't sort ties alphabetically)"
+//usage: )
+//usage: "\n -u Suppress duplicate lines"
+//usage: IF_FEATURE_SORT_BIG(
+//usage: "\n -z Lines are terminated by NUL, not newline"
+//usage: "\n -mST Ignored for GNU compatibility")
+//usage:
+//usage:#define sort_example_usage
+//usage: "$ echo -e \"e\\nf\\nb\\nd\\nc\\na\" | sort\n"
+//usage: "a\n"
+//usage: "b\n"
+//usage: "c\n"
+//usage: "d\n"
+//usage: "e\n"
+//usage: "f\n"
+//usage: IF_FEATURE_SORT_BIG(
+//usage: "$ echo -e \"c 3\\nb 2\\nd 2\" | $SORT -k 2,2n -k 1,1r\n"
+//usage: "d 2\n"
+//usage: "b 2\n"
+//usage: "c 3\n"
+//usage: )
+//usage: ""
+
#include "libbb.h"
/* This is a NOEXEC applet. Be very careful! */
diff --git a/coreutils/split.c b/coreutils/split.c
index 79316ed74..f0077077e 100644
--- a/coreutils/split.c
+++ b/coreutils/split.c
@@ -9,6 +9,19 @@
* SUSv3 requirements:
* http://www.opengroup.org/onlinepubs/009695399/utilities/split.html
*/
+
+//usage:#define split_trivial_usage
+//usage: "[OPTIONS] [INPUT [PREFIX]]"
+//usage:#define split_full_usage "\n\n"
+//usage: "Options:"
+//usage: "\n -b N[k|m] Split by N (kilo|mega)bytes"
+//usage: "\n -l N Split by N lines"
+//usage: "\n -a N Use N letters as suffix"
+//usage:
+//usage:#define split_example_usage
+//usage: "$ split TODO foo\n"
+//usage: "$ cat TODO | split -a 2 -l 2 TODO_\n"
+
#include "libbb.h"
static const struct suffix_mult split_suffices[] = {
diff --git a/coreutils/stat.c b/coreutils/stat.c
index 7351f5956..e85e51033 100644
--- a/coreutils/stat.c
+++ b/coreutils/stat.c
@@ -12,6 +12,67 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+
+//usage:#define stat_trivial_usage
+//usage: "[OPTIONS] FILE..."
+//usage:#define stat_full_usage "\n\n"
+//usage: "Display file (default) or filesystem status\n"
+//usage: "\nOptions:"
+//usage: IF_FEATURE_STAT_FORMAT(
+//usage: "\n -c fmt Use the specified format"
+//usage: )
+//usage: "\n -f Display filesystem status"
+//usage: "\n -L Follow links"
+//usage: "\n -t Display info in terse form"
+//usage: IF_SELINUX(
+//usage: "\n -Z Print security context"
+//usage: )
+//usage: IF_FEATURE_STAT_FORMAT(
+//usage: "\n\nValid format sequences for files:\n"
+//usage: " %a Access rights in octal\n"
+//usage: " %A Access rights in human readable form\n"
+//usage: " %b Number of blocks allocated (see %B)\n"
+//usage: " %B The size in bytes of each block reported by %b\n"
+//usage: " %d Device number in decimal\n"
+//usage: " %D Device number in hex\n"
+//usage: " %f Raw mode in hex\n"
+//usage: " %F File type\n"
+//usage: " %g Group ID of owner\n"
+//usage: " %G Group name of owner\n"
+//usage: " %h Number of hard links\n"
+//usage: " %i Inode number\n"
+//usage: " %n File name\n"
+//usage: " %N File name, with -> TARGET if symlink\n"
+//usage: " %o I/O block size\n"
+//usage: " %s Total size, in bytes\n"
+//usage: " %t Major device type in hex\n"
+//usage: " %T Minor device type in hex\n"
+//usage: " %u User ID of owner\n"
+//usage: " %U User name of owner\n"
+//usage: " %x Time of last access\n"
+//usage: " %X Time of last access as seconds since Epoch\n"
+//usage: " %y Time of last modification\n"
+//usage: " %Y Time of last modification as seconds since Epoch\n"
+//usage: " %z Time of last change\n"
+//usage: " %Z Time of last change as seconds since Epoch\n"
+//usage: "\nValid format sequences for file systems:\n"
+//usage: " %a Free blocks available to non-superuser\n"
+//usage: " %b Total data blocks in file system\n"
+//usage: " %c Total file nodes in file system\n"
+//usage: " %d Free file nodes in file system\n"
+//usage: " %f Free blocks in file system\n"
+//usage: IF_SELINUX(
+//usage: " %C Security context in selinux\n"
+//usage: )
+//usage: " %i File System ID in hex\n"
+//usage: " %l Maximum length of filenames\n"
+//usage: " %n File name\n"
+//usage: " %s Block size (for faster transfer)\n"
+//usage: " %S Fundamental block size (for block counts)\n"
+//usage: " %t Type in hex\n"
+//usage: " %T Type in human readable form"
+//usage: )
+
#include "libbb.h"
#define OPT_FILESYS (1 << 0)
diff --git a/coreutils/stty.c b/coreutils/stty.c
index d8184a34f..af2347161 100644
--- a/coreutils/stty.c
+++ b/coreutils/stty.c
@@ -21,6 +21,17 @@
*/
+//usage:#define stty_trivial_usage
+//usage: "[-a|g] [-F DEVICE] [SETTING]..."
+//usage:#define stty_full_usage "\n\n"
+//usage: "Without arguments, prints baud rate, line discipline,\n"
+//usage: "and deviations from stty sane\n"
+//usage: "\nOptions:"
+//usage: "\n -F DEVICE Open device instead of stdin"
+//usage: "\n -a Print all current settings in human-readable form"
+//usage: "\n -g Print in stty-readable form"
+//usage: "\n [SETTING] See manpage"
+
#include "libbb.h"
#ifndef _POSIX_VDISABLE
diff --git a/coreutils/sum.c b/coreutils/sum.c
index e087fb85b..9e6b0c5b1 100644
--- a/coreutils/sum.c
+++ b/coreutils/sum.c
@@ -13,6 +13,14 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//usage:#define sum_trivial_usage
+//usage: "[-rs] [FILE]..."
+//usage:#define sum_full_usage "\n\n"
+//usage: "Checksum and count the blocks in a file\n"
+//usage: "\nOptions:"
+//usage: "\n -r Use BSD sum algorithm (1K blocks)"
+//usage: "\n -s Use System V sum algorithm (512byte blocks)"
+
#include "libbb.h"
enum { SUM_BSD, PRINT_NAME, SUM_SYSV };
diff --git a/coreutils/sync.c b/coreutils/sync.c
index bb112ea38..7d98a1e30 100644
--- a/coreutils/sync.c
+++ b/coreutils/sync.c
@@ -9,6 +9,11 @@
/* BB_AUDIT SUSv3 N/A -- Matches GNU behavior. */
+//usage:#define sync_trivial_usage
+//usage: ""
+//usage:#define sync_full_usage "\n\n"
+//usage: "Write all buffered blocks to disk"
+
#include "libbb.h"
/* This is a NOFORK applet. Be very careful! */
diff --git a/coreutils/tac.c b/coreutils/tac.c
index ab3e66ac2..94d669de1 100644
--- a/coreutils/tac.c
+++ b/coreutils/tac.c
@@ -16,6 +16,11 @@
* http://www.uclibc.org/lists/busybox/2003-July/008813.html
*/
+//usage:#define tac_trivial_usage
+//usage: "[FILE]..."
+//usage:#define tac_full_usage "\n\n"
+//usage: "Concatenate FILEs and print them in reverse"
+
#include "libbb.h"
/* This is a NOEXEC applet. Be very careful! */
diff --git a/coreutils/tail.c b/coreutils/tail.c
index df881a37a..eac982735 100644
--- a/coreutils/tail.c
+++ b/coreutils/tail.c
@@ -24,6 +24,31 @@
* 7) lseek attempted when count==0 even if arg was +0 (from top)
*/
+//usage:#define tail_trivial_usage
+//usage: "[OPTIONS] [FILE]..."
+//usage:#define tail_full_usage "\n\n"
+//usage: "Print last 10 lines of each FILE (or stdin) to stdout.\n"
+//usage: "With more than one FILE, precede each with a filename header.\n"
+//usage: "\nOptions:"
+//usage: "\n -f Print data as file grows"
+//usage: IF_FEATURE_FANCY_TAIL(
+//usage: "\n -s SECONDS Wait SECONDS between reads with -f"
+//usage: )
+//usage: "\n -n N[kbm] Print last N lines"
+//usage: IF_FEATURE_FANCY_TAIL(
+//usage: "\n -c N[kbm] Print last N bytes"
+//usage: "\n -q Never print headers"
+//usage: "\n -v Always print headers"
+//usage: "\n"
+//usage: "\nN may be suffixed by k (x1024), b (x512), or m (x1024^2)."
+//usage: "\nIf N starts with a '+', output begins with the Nth item from the start"
+//usage: "\nof each file, not from the end."
+//usage: )
+//usage:
+//usage:#define tail_example_usage
+//usage: "$ tail -n 1 /etc/resolv.conf\n"
+//usage: "nameserver 10.0.0.1\n"
+
#include "libbb.h"
static const struct suffix_mult tail_suffixes[] = {
diff --git a/coreutils/tee.c b/coreutils/tee.c
index e66e885ec..3e3164e70 100644
--- a/coreutils/tee.c
+++ b/coreutils/tee.c
@@ -10,6 +10,19 @@
/* BB_AUDIT SUSv3 compliant */
/* http://www.opengroup.org/onlinepubs/007904975/utilities/tee.html */
+//usage:#define tee_trivial_usage
+//usage: "[-ai] [FILE]..."
+//usage:#define tee_full_usage "\n\n"
+//usage: "Copy stdin to each FILE, and also to stdout\n"
+//usage: "\nOptions:"
+//usage: "\n -a Append to the given FILEs, don't overwrite"
+//usage: "\n -i Ignore interrupt signals (SIGINT)"
+//usage:
+//usage:#define tee_example_usage
+//usage: "$ echo \"Hello\" | tee /tmp/foo\n"
+//usage: "$ cat /tmp/foo\n"
+//usage: "Hello\n"
+
#include "libbb.h"
int tee_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
diff --git a/coreutils/test.c b/coreutils/test.c
index 2d245be6c..1f5398ad8 100644
--- a/coreutils/test.c
+++ b/coreutils/test.c
@@ -39,6 +39,29 @@
//config: help
//config: Enable 64-bit support in test.
+/* "test --help" does not print help (POSIX compat), only "[ --help" does.
+ * We display "<applet> EXPRESSION ]" here (not "<applet> EXPRESSION")
+ * Unfortunately, it screws up generated BusyBox.html. TODO. */
+//usage:#define test_trivial_usage
+//usage: "EXPRESSION ]"
+//usage:#define test_full_usage "\n\n"
+//usage: "Check file types, compare values etc. Return a 0/1 exit code\n"
+//usage: "depending on logical value of EXPRESSION"
+//usage:
+//usage:#define test_example_usage
+//usage: "$ test 1 -eq 2\n"
+//usage: "$ echo $?\n"
+//usage: "1\n"
+//usage: "$ test 1 -eq 1\n"
+//usage: "$ echo $?\n"
+//usage: "0\n"
+//usage: "$ [ -d /etc ]\n"
+//usage: "$ echo $?\n"
+//usage: "0\n"
+//usage: "$ [ -d /junk ]\n"
+//usage: "$ echo $?\n"
+//usage: "1\n"
+
#include "libbb.h"
#include <setjmp.h>
diff --git a/coreutils/tr.c b/coreutils/tr.c
index 5b2b9a9a4..2f14a414f 100644
--- a/coreutils/tr.c
+++ b/coreutils/tr.c
@@ -47,6 +47,19 @@
//config: useful for cases when no other way of expressing a character
//config: is possible.
+//usage:#define tr_trivial_usage
+//usage: "[-cds] STRING1 [STRING2]"
+//usage:#define tr_full_usage "\n\n"
+//usage: "Translate, squeeze, or delete characters from stdin, writing to stdout\n"
+//usage: "\nOptions:"
+//usage: "\n -c Take complement of STRING1"
+//usage: "\n -d Delete input characters coded STRING1"
+//usage: "\n -s Squeeze multiple output characters of STRING2 into one character"
+//usage:
+//usage:#define tr_example_usage
+//usage: "$ echo \"gdkkn vnqkc\" | tr [a-y] [b-z]\n"
+//usage: "hello world\n"
+
#include "libbb.h"
enum {
diff --git a/coreutils/true.c b/coreutils/true.c
index 0a862ef18..382e476a8 100644
--- a/coreutils/true.c
+++ b/coreutils/true.c
@@ -10,6 +10,16 @@
/* BB_AUDIT SUSv3 compliant */
/* http://www.opengroup.org/onlinepubs/007904975/utilities/true.html */
+//usage:#define true_trivial_usage
+//usage: ""
+//usage:#define true_full_usage "\n\n"
+//usage: "Return an exit code of TRUE (0)"
+//usage:
+//usage:#define true_example_usage
+//usage: "$ true\n"
+//usage: "$ echo $?\n"
+//usage: "0\n"
+
#include "libbb.h"
/* This is a NOFORK applet. Be very careful! */
diff --git a/coreutils/tty.c b/coreutils/tty.c
index 282d9680f..67399cbf3 100644
--- a/coreutils/tty.c
+++ b/coreutils/tty.c
@@ -10,6 +10,19 @@
/* BB_AUDIT SUSv4 compliant */
/* http://www.opengroup.org/onlinepubs/9699919799/utilities/tty.html */
+//usage:#define tty_trivial_usage
+//usage: ""
+//usage:#define tty_full_usage "\n\n"
+//usage: "Print file name of stdin's terminal"
+//usage: IF_INCLUDE_SUSv2( "\n"
+//usage: "\nOptions:"
+//usage: "\n -s Print nothing, only return exit status"
+//usage: )
+//usage:
+//usage:#define tty_example_usage
+//usage: "$ tty\n"
+//usage: "/dev/tty2\n"
+
#include "libbb.h"
int tty_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
diff --git a/coreutils/uname.c b/coreutils/uname.c
index d1c50e222..7a86b32a6 100644
--- a/coreutils/uname.c
+++ b/coreutils/uname.c
@@ -48,6 +48,23 @@
* Fix handling of -a to not print "unknown", add -o and -i support.
*/
+//usage:#define uname_trivial_usage
+//usage: "[-amnrspv]"
+//usage:#define uname_full_usage "\n\n"
+//usage: "Print system information\n"
+//usage: "\nOptions:"
+//usage: "\n -a Print all"
+//usage: "\n -m The machine (hardware) type"
+//usage: "\n -n Hostname"
+//usage: "\n -r OS release"
+//usage: "\n -s OS name (default)"
+//usage: "\n -p Processor type"
+//usage: "\n -v OS version"
+//usage:
+//usage:#define uname_example_usage
+//usage: "$ uname -a\n"
+//usage: "Linux debian 2.4.23 #2 Tue Dec 23 17:09:10 MST 2003 i686 GNU/Linux\n"
+
#include "libbb.h"
/* After libbb.h, since it needs sys/types.h on some systems */
#include <sys/utsname.h>
diff --git a/coreutils/uniq.c b/coreutils/uniq.c
index decf7e4f8..6e764d8a4 100644
--- a/coreutils/uniq.c
+++ b/coreutils/uniq.c
@@ -10,6 +10,24 @@
/* BB_AUDIT SUSv3 compliant */
/* http://www.opengroup.org/onlinepubs/007904975/utilities/uniq.html */
+//usage:#define uniq_trivial_usage
+//usage: "[-cdu][-f,s,w N] [INPUT [OUTPUT]]"
+//usage:#define uniq_full_usage "\n\n"
+//usage: "Discard duplicate lines\n"
+//usage: "\nOptions:"
+//usage: "\n -c Prefix lines by the number of occurrences"
+//usage: "\n -d Only print duplicate lines"
+//usage: "\n -u Only print unique lines"
+//usage: "\n -f N Skip first N fields"
+//usage: "\n -s N Skip first N chars (after any skipped fields)"
+//usage: "\n -w N Compare N characters in line"
+//usage:
+//usage:#define uniq_example_usage
+//usage: "$ echo -e \"a\\na\\nb\\nc\\nc\\na\" | sort | uniq\n"
+//usage: "a\n"
+//usage: "b\n"
+//usage: "c\n"
+
#include "libbb.h"
int uniq_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
diff --git a/coreutils/usleep.c b/coreutils/usleep.c
index cb4ec5898..67f94f798 100644
--- a/coreutils/usleep.c
+++ b/coreutils/usleep.c
@@ -9,6 +9,15 @@
/* BB_AUDIT SUSv3 N/A -- Apparently a busybox extension. */
+//usage:#define usleep_trivial_usage
+//usage: "N"
+//usage:#define usleep_full_usage "\n\n"
+//usage: "Pause for N microseconds"
+//usage:
+//usage:#define usleep_example_usage
+//usage: "$ usleep 1000000\n"
+//usage: "[pauses for 1 second]\n"
+
#include "libbb.h"
/* This is a NOFORK applet. Be very careful! */
diff --git a/coreutils/uudecode.c b/coreutils/uudecode.c
index 56ed254e5..47a155ecb 100644
--- a/coreutils/uudecode.c
+++ b/coreutils/uudecode.c
@@ -10,6 +10,18 @@
* Bugs: the spec doesn't mention anything about "`\n`\n" prior to the
* "end" line
*/
+
+//usage:#define uudecode_trivial_usage
+//usage: "[-o OUTFILE] [INFILE]"
+//usage:#define uudecode_full_usage "\n\n"
+//usage: "Uudecode a file\n"
+//usage: "Finds outfile name in uuencoded source unless -o is given"
+//usage:
+//usage:#define uudecode_example_usage
+//usage: "$ uudecode -o busybox busybox.uu\n"
+//usage: "$ ls -l busybox\n"
+//usage: "-rwxr-xr-x 1 ams ams 245264 Jun 7 21:35 busybox\n"
+
#include "libbb.h"
#if ENABLE_UUDECODE
diff --git a/coreutils/uuencode.c b/coreutils/uuencode.c
index fe9e8c664..b4cd0a9e6 100644
--- a/coreutils/uuencode.c
+++ b/coreutils/uuencode.c
@@ -8,6 +8,20 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//usage:#define uuencode_trivial_usage
+//usage: "[-m] [INFILE] STORED_FILENAME"
+//usage:#define uuencode_full_usage "\n\n"
+//usage: "Uuencode a file to stdout\n"
+//usage: "\nOptions:"
+//usage: "\n -m Use base64 encoding per RFC1521"
+//usage:
+//usage:#define uuencode_example_usage
+//usage: "$ uuencode busybox busybox\n"
+//usage: "begin 755 busybox\n"
+//usage: "<encoded file snipped>\n"
+//usage: "$ uudecode busybox busybox > busybox.uu\n"
+//usage: "$\n"
+
#include "libbb.h"
enum {
diff --git a/coreutils/who.c b/coreutils/who.c
index ab1e30fc8..ec385bf95 100644
--- a/coreutils/who.c
+++ b/coreutils/who.c
@@ -18,6 +18,13 @@
*/
/* BB_AUDIT SUSv3 _NOT_ compliant -- missing options -b, -d, -l, -m, -p, -q, -r, -s, -t, -T, -u; Missing argument 'file'. */
+//usage:#define who_trivial_usage
+//usage: "[-a]"
+//usage:#define who_full_usage "\n\n"
+//usage: "Show who is logged on\n"
+//usage: "\nOptions:"
+//usage: "\n -a Show all"
+
#include "libbb.h"
static void idle_string(char *str6, time_t t)
diff --git a/coreutils/whoami.c b/coreutils/whoami.c
index 78d20db14..30b17cab3 100644
--- a/coreutils/whoami.c
+++ b/coreutils/whoami.c
@@ -9,6 +9,11 @@
/* BB_AUDIT SUSv3 N/A -- Matches GNU behavior. */
+//usage:#define whoami_trivial_usage
+//usage: ""
+//usage:#define whoami_full_usage "\n\n"
+//usage: "Print the user name associated with the current effective user id"
+
#include "libbb.h"
/* This is a NOFORK applet. Be very careful! */
diff --git a/include/usage.src.h b/include/usage.src.h
index c1720b5f1..d8360931f 100644
--- a/include/usage.src.h
+++ b/include/usage.src.h
@@ -118,18 +118,6 @@ INSERT
"\n -F SEP Use SEP as field separator" \
"\n -f FILE Read program from FILE" \
-#define basename_trivial_usage \
- "FILE [SUFFIX]"
-#define basename_full_usage "\n\n" \
- "Strip directory path and .SUFFIX from FILE\n"
-#define basename_example_usage \
- "$ basename /usr/local/bin/foo\n" \
- "foo\n" \
- "$ basename /usr/local/bin/\n" \
- "bin\n" \
- "$ basename /foo/bar.txt .txt\n" \
- "bar"
-
#define beep_trivial_usage \
"-f FREQ -l LEN -d DELAY -r COUNT -n"
#define beep_full_usage "\n\n" \
@@ -171,32 +159,6 @@ INSERT
#define busybox_notes_usage \
"Hello world!\n"
-#define cal_trivial_usage \
- "[-jy] [[MONTH] YEAR]"
-#define cal_full_usage "\n\n" \
- "Display a calendar\n" \
- "\nOptions:" \
- "\n -j Use julian dates" \
- "\n -y Display the entire year" \
-
-#define cat_trivial_usage \
- "[FILE]..."
-#define cat_full_usage "\n\n" \
- "Concatenate FILEs and print them to stdout" \
-
-#define cat_example_usage \
- "$ cat /proc/uptime\n" \
- "110716.72 17.67"
-
-#define catv_trivial_usage \
- "[-etv] [FILE]..."
-#define catv_full_usage "\n\n" \
- "Display nonprinting characters as ^x or M-x\n" \
- "\nOptions:" \
- "\n -e End each line with $" \
- "\n -t Show tabs as ^I" \
- "\n -v Don't use ^x or M-x escapes" \
-
#define chat_trivial_usage \
"EXPECT [SEND [EXPECT [SEND...]]]"
#define chat_full_usage "\n\n" \
@@ -261,75 +223,6 @@ INSERT
"\n -R Recurse" \
)
-#define chmod_trivial_usage \
- "[-R"IF_DESKTOP("cvf")"] MODE[,MODE]... FILE..."
-#define chmod_full_usage "\n\n" \
- "Each MODE is one or more of the letters ugoa, one of the\n" \
- "symbols +-= and one or more of the letters rwxst\n" \
- "\nOptions:" \
- "\n -R Recurse" \
- IF_DESKTOP( \
- "\n -c List changed files" \
- "\n -v List all files" \
- "\n -f Hide errors" \
- )
-#define chmod_example_usage \
- "$ ls -l /tmp/foo\n" \
- "-rw-rw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n" \
- "$ chmod u+x /tmp/foo\n" \
- "$ ls -l /tmp/foo\n" \
- "-rwxrw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo*\n" \
- "$ chmod 444 /tmp/foo\n" \
- "$ ls -l /tmp/foo\n" \
- "-r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n"
-
-#define chgrp_trivial_usage \
- "[-RhLHP"IF_DESKTOP("cvf")"]... GROUP FILE..."
-#define chgrp_full_usage "\n\n" \
- "Change the group membership of each FILE to GROUP\n" \
- "\nOptions:" \
- "\n -R Recurse" \
- "\n -h Affect symlinks instead of symlink targets" \
- "\n -L Traverse all symlinks to directories" \
- "\n -H Traverse symlinks on command line only" \
- "\n -P Don't traverse symlinks (default)" \
- IF_DESKTOP( \
- "\n -c List changed files" \
- "\n -v Verbose" \
- "\n -f Hide errors" \
- )
-#define chgrp_example_usage \
- "$ ls -l /tmp/foo\n" \
- "-r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo\n" \
- "$ chgrp root /tmp/foo\n" \
- "$ ls -l /tmp/foo\n" \
- "-r--r--r-- 1 andersen root 0 Apr 12 18:25 /tmp/foo\n"
-
-#define chown_trivial_usage \
- "[-RhLHP"IF_DESKTOP("cvf")"]... OWNER[<.|:>[GROUP]] FILE..."
-#define chown_full_usage "\n\n" \
- "Change the owner and/or group of each FILE to OWNER and/or GROUP\n" \
- "\nOptions:" \
- "\n -R Recurse" \
- "\n -h Affect symlinks instead of symlink targets" \
- "\n -L Traverse all symlinks to directories" \
- "\n -H Traverse symlinks on command line only" \
- "\n -P Don't traverse symlinks (default)" \
- IF_DESKTOP( \
- "\n -c List changed files" \
- "\n -v List all files" \
- "\n -f Hide errors" \
- )
-#define chown_example_usage \
- "$ ls -l /tmp/foo\n" \
- "-r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo\n" \
- "$ chown root /tmp/foo\n" \
- "$ ls -l /tmp/foo\n" \
- "-r--r--r-- 1 root andersen 0 Apr 12 18:25 /tmp/foo\n" \
- "$ chown root.root /tmp/foo\n" \
- "ls -l /tmp/foo\n" \
- "-r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n"
-
#define chpst_trivial_usage \
"[-vP012] [-u USER[:GRP]] [-U USER[:GRP]] [-e DIR]\n" \
" [-/ DIR] [-n NICE] [-m BYTES] [-d BYTES] [-o N]\n" \
@@ -391,23 +284,6 @@ INSERT
"\n -t N Limit CPU time, process receives" \
"\n a SIGXCPU after N seconds" \
-#define chroot_trivial_usage \
- "NEWROOT [PROG ARGS]"
-#define chroot_full_usage "\n\n" \
- "Run PROG with root directory set to NEWROOT"
-#define chroot_example_usage \
- "$ ls -l /bin/ls\n" \
- "lrwxrwxrwx 1 root root 12 Apr 13 00:46 /bin/ls -> /BusyBox\n" \
- "# mount /dev/hdc1 /mnt -t minix\n" \
- "# chroot /mnt\n" \
- "# ls -l /bin/ls\n" \
- "-rwxr-xr-x 1 root root 40816 Feb 5 07:45 /bin/ls*\n"
-
-#define cksum_trivial_usage \
- "FILES..."
-#define cksum_full_usage "\n\n" \
- "Calculate the CRC32 checksums of FILES"
-
#define cmp_trivial_usage \
"[-l] [-s] FILE1 [FILE2" IF_DESKTOP(" [SKIP1 [SKIP2]]") "]"
#define cmp_full_usage "\n\n" \
@@ -417,15 +293,6 @@ INSERT
"\n for all differing bytes" \
"\n -s Quiet" \
-#define comm_trivial_usage \
- "[-123] FILE1 FILE2"
-#define comm_full_usage "\n\n" \
- "Compare FILE1 with FILE2\n" \
- "\nOptions:" \
- "\n -1 Suppress lines unique to FILE1" \
- "\n -2 Suppress lines unique to FILE2" \
- "\n -3 Suppress lines common to both files" \
-
#define bbconfig_trivial_usage \
""
#define bbconfig_full_usage "\n\n" \
@@ -447,13 +314,6 @@ INSERT
"$ chrt -f -p 3 $x\n" \
"You need CAP_SYS_NICE privileges to set scheduling attributes of a process"
-#define nice_trivial_usage \
- "[-n ADJUST] [PROG ARGS]"
-#define nice_full_usage "\n\n" \
- "Change scheduling priority, run PROG\n" \
- "\nOptions:" \
- "\n -n ADJUST Adjust priority by ADJUST" \
-
#define renice_trivial_usage \
"{{-n INCREMENT} | PRIORITY} [[-p | -g | -u] ID...]"
#define renice_full_usage "\n\n" \
@@ -472,24 +332,6 @@ INSERT
"\n -c Class. 1:realtime 2:best-effort 3:idle" \
"\n -n Priority" \
-#define cp_trivial_usage \
- "[OPTIONS] SOURCE DEST"
-#define cp_full_usage "\n\n" \
- "Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY\n" \
- "\nOptions:" \
- "\n -a Same as -dpR" \
- IF_SELINUX( \
- "\n -c Preserve security context" \
- ) \
- "\n -R,-r Recurse" \
- "\n -d,-P Preserve symlinks (default if -R)" \
- "\n -L Follow all symlinks" \
- "\n -H Follow symlinks on command line" \
- "\n -p Preserve file attributes if possible" \
- "\n -f Overwrite" \
- "\n -i Prompt before overwrite" \
- "\n -l,-s Create (sym)links" \
-
#define crond_trivial_usage \
"-fbS -l N " IF_FEATURE_CROND_D("-d N ") "-L LOGFILE -c DIR"
#define crond_full_usage "\n\n" \
@@ -553,57 +395,6 @@ INSERT
"\n -S SALT" \
) \
-#define cut_trivial_usage \
- "[OPTIONS] [FILE]..."
-#define cut_full_usage "\n\n" \
- "Print selected fields from each input FILE to stdout\n" \
- "\nOptions:" \
- "\n -b LIST Output only bytes from LIST" \
- "\n -c LIST Output only characters from LIST" \
- "\n -d CHAR Use CHAR instead of tab as the field delimiter" \
- "\n -s Output only the lines containing delimiter" \
- "\n -f N Print only these fields" \
- "\n -n Ignored" \
-
-#define cut_example_usage \
- "$ echo \"Hello world\" | cut -f 1 -d ' '\n" \
- "Hello\n" \
- "$ echo \"Hello world\" | cut -f 2 -d ' '\n" \
- "world\n"
-
-#define dd_trivial_usage \
- "[if=FILE] [of=FILE] " IF_FEATURE_DD_IBS_OBS("[ibs=N] [obs=N] ") "[bs=N] [count=N] [skip=N]\n" \
- " [seek=N]" IF_FEATURE_DD_IBS_OBS(" [conv=notrunc|noerror|sync|fsync]")
-#define dd_full_usage "\n\n" \
- "Copy a file with converting and formatting\n" \
- "\nOptions:" \
- "\n if=FILE Read from FILE instead of stdin" \
- "\n of=FILE Write to FILE instead of stdout" \
- "\n bs=N Read and write N bytes at a time" \
- IF_FEATURE_DD_IBS_OBS( \
- "\n ibs=N Read N bytes at a time" \
- ) \
- IF_FEATURE_DD_IBS_OBS( \
- "\n obs=N Write N bytes at a time" \
- ) \
- "\n count=N Copy only N input blocks" \
- "\n skip=N Skip N input blocks" \
- "\n seek=N Skip N output blocks" \
- IF_FEATURE_DD_IBS_OBS( \
- "\n conv=notrunc Don't truncate output file" \
- "\n conv=noerror Continue after read errors" \
- "\n conv=sync Pad blocks with zeros" \
- "\n conv=fsync Physically write data out before finishing" \
- ) \
- "\n" \
- "\nNumbers may be suffixed by c (x1), w (x2), b (x512), kD (x1000), k (x1024)," \
- "\nMD (x1000000), M (x1048576), GD (x1000000000) or G (x1073741824)" \
-
-#define dd_example_usage \
- "$ dd if=/dev/zero of=/dev/ram1 bs=1M count=4\n" \
- "4+0 records in\n" \
- "4+0 records out\n"
-
#define delgroup_trivial_usage \
IF_FEATURE_DEL_USER_FROM_GROUP("[USER] ")"GROUP"
#define delgroup_full_usage "\n\n" \
@@ -639,41 +430,6 @@ INSERT
"\n don't poll for events" \
)
-#define df_trivial_usage \
- "[-Pk" \
- IF_FEATURE_HUMAN_READABLE("mh") \
- IF_FEATURE_DF_FANCY("ai] [-B SIZE") \
- "] [FILESYSTEM]..."
-#define df_full_usage "\n\n" \
- "Print filesystem usage statistics\n" \
- "\nOptions:" \
- "\n -P POSIX output format" \
- "\n -k 1024-byte blocks (default)" \
- IF_FEATURE_HUMAN_READABLE( \
- "\n -m 1M-byte blocks" \
- "\n -h Human readable (e.g. 1K 243M 2G)" \
- ) \
- IF_FEATURE_DF_FANCY( \
- "\n -a Show all filesystems" \
- "\n -i Inodes" \
- "\n -B SIZE Blocksize" \
- ) \
-
-#define df_example_usage \
- "$ df\n" \
- "Filesystem 1K-blocks Used Available Use% Mounted on\n" \
- "/dev/sda3 8690864 8553540 137324 98% /\n" \
- "/dev/sda1 64216 36364 27852 57% /boot\n" \
- "$ df /dev/sda3\n" \
- "Filesystem 1K-blocks Used Available Use% Mounted on\n" \
- "/dev/sda3 8690864 8553540 137324 98% /\n" \
- "$ POSIXLY_CORRECT=sure df /dev/sda3\n" \
- "Filesystem 512B-blocks Used Available Use% Mounted on\n" \
- "/dev/sda3 17381728 17107080 274648 98% /\n" \
- "$ POSIXLY_CORRECT=yep df -P /dev/sda3\n" \
- "Filesystem 512-blocks Used Available Capacity Mounted on\n" \
- "/dev/sda3 17381728 17107080 274648 98% /\n"
-
#define dhcprelay_trivial_usage \
"CLIENT_IFACE[,CLIENT_IFACE2]... SERVER_IFACE [SERVER_IP]"
#define dhcprelay_full_usage "\n\n" \
@@ -701,16 +457,6 @@ INSERT
"\n -U Output LINES lines of context" \
"\n -w Ignore all whitespace" \
-#define dirname_trivial_usage \
- "FILENAME"
-#define dirname_full_usage "\n\n" \
- "Strip non-directory suffix from FILENAME"
-#define dirname_example_usage \
- "$ dirname /tmp/foo\n" \
- "/tmp\n" \
- "$ dirname /tmp/foo/\n" \
- "/tmp\n"
-
#define dmesg_trivial_usage \
"[-c] [-n LEVEL] [-s SIZE]"
#define dmesg_full_usage "\n\n" \
@@ -736,61 +482,6 @@ INSERT
"\n nameserver DNSD_SERVER" \
"\n nameserver NORNAL_DNS_SERVER" \
-#define dos2unix_trivial_usage \
- "[-ud] [FILE]"
-#define dos2unix_full_usage "\n\n" \
- "Convert FILE in-place from DOS to Unix format.\n" \
- "When no file is given, use stdin/stdout.\n" \
- "\nOptions:" \
- "\n -u dos2unix" \
- "\n -d unix2dos" \
-
-#define unix2dos_trivial_usage \
- "[-ud] [FILE]"
-#define unix2dos_full_usage "\n\n" \
- "Convert FILE in-place from Unix to DOS format.\n" \
- "When no file is given, use stdin/stdout.\n" \
- "\nOptions:" \
- "\n -u dos2unix" \
- "\n -d unix2dos" \
-
-#define du_trivial_usage \
- "[-aHLdclsx" IF_FEATURE_HUMAN_READABLE("hm") "k] [FILE]..."
-#define du_full_usage "\n\n" \
- "Summarize disk space used for each FILE and/or directory.\n" \
- "Disk space is printed in units of " \
- IF_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("1024") \
- IF_NOT_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("512") \
- " bytes.\n" \
- "\nOptions:" \
- "\n -a Show file sizes too" \
- "\n -L Follow all symlinks" \
- "\n -H Follow symlinks on command line" \
- "\n -d N Limit output to directories (and files with -a) of depth < N" \
- "\n -c Show grand total" \
- "\n -l Count sizes many times if hard linked" \
- "\n -s Display only a total for each argument" \
- "\n -x Skip directories on different filesystems" \
- IF_FEATURE_HUMAN_READABLE( \
- "\n -h Sizes in human readable format (e.g., 1K 243M 2G )" \
- "\n -m Sizes in megabytes" \
- ) \
- "\n -k Sizes in kilobytes" \
- IF_FEATURE_DU_DEFAULT_BLOCKSIZE_1K(" (default)") \
-
-#define du_example_usage \
- "$ du\n" \
- "16 ./CVS\n" \
- "12 ./kernel-patches/CVS\n" \
- "80 ./kernel-patches\n" \
- "12 ./tests/CVS\n" \
- "36 ./tests\n" \
- "12 ./scripts/CVS\n" \
- "16 ./scripts\n" \
- "12 ./docs/CVS\n" \
- "104 ./docs\n" \
- "2417 .\n"
-
#define dumpleases_trivial_usage \
"[-r|-a] [-f LEASEFILE]"
#define dumpleases_full_usage "\n\n" \
@@ -829,26 +520,6 @@ INSERT
"\n -L file Set badblocks list" \
*/
-#define echo_trivial_usage \
- IF_FEATURE_FANCY_ECHO("[-neE] ") "[ARG]..."
-#define echo_full_usage "\n\n" \
- "Print the specified ARGs to stdout" \
- IF_FEATURE_FANCY_ECHO( "\n" \
- "\nOptions:" \
- "\n -n Suppress trailing newline" \
- "\n -e Interpret backslash escapes (i.e., \\t=tab)" \
- "\n -E Don't interpret backslash escapes (default)" \
- )
-#define echo_example_usage \
- "$ echo \"Erik is cool\"\n" \
- "Erik is cool\n" \
- IF_FEATURE_FANCY_ECHO("$ echo -e \"Erik\\nis\\ncool\"\n" \
- "Erik\n" \
- "is\n" \
- "cool\n" \
- "$ echo \"Erik\\nis\\ncool\"\n" \
- "Erik\\nis\\ncool\n")
-
#define eject_trivial_usage \
"[-t] [-T] [DEVICE]"
#define eject_full_usage "\n\n" \
@@ -863,15 +534,6 @@ INSERT
#define ed_trivial_usage ""
#define ed_full_usage ""
-#define env_trivial_usage \
- "[-iu] [-] [name=value]... [PROG ARGS]"
-#define env_full_usage "\n\n" \
- "Print the current environment or run PROG after setting up\n" \
- "the specified environment\n" \
- "\nOptions:" \
- "\n -, -i Start with an empty environment" \
- "\n -u Remove variable from the environment" \
-
#define ether_wake_trivial_usage \
"[-b] [-i iface] [-p aa:bb:cc:dd[:ee:ff]] MAC"
#define ether_wake_full_usage "\n\n" \
@@ -883,55 +545,6 @@ INSERT
"\n -i iface Interface to use (default eth0)" \
"\n -p pass Append four or six byte password PW to the packet" \
-#define expand_trivial_usage \
- "[-i] [-t N] [FILE]..."
-#define expand_full_usage "\n\n" \
- "Convert tabs to spaces, writing to stdout\n" \
- "\nOptions:" \
- IF_FEATURE_EXPAND_LONG_OPTIONS( \
- "\n -i,--initial Don't convert tabs after non blanks" \
- "\n -t,--tabs=N Tabstops every N chars" \
- ) \
- IF_NOT_FEATURE_EXPAND_LONG_OPTIONS( \
- "\n -i Don't convert tabs after non blanks" \
- "\n -t Tabstops every N chars" \
- )
-
-#define expr_trivial_usage \
- "EXPRESSION"
-#define expr_full_usage "\n\n" \
- "Print the value of EXPRESSION to stdout\n" \
- "\n" \
- "EXPRESSION may be:\n" \
- " ARG1 | ARG2 ARG1 if it is neither null nor 0, otherwise ARG2\n" \
- " ARG1 & ARG2 ARG1 if neither argument is null or 0, otherwise 0\n" \
- " ARG1 < ARG2 1 if ARG1 is less than ARG2, else 0. Similarly:\n" \
- " ARG1 <= ARG2\n" \
- " ARG1 = ARG2\n" \
- " ARG1 != ARG2\n" \
- " ARG1 >= ARG2\n" \
- " ARG1 > ARG2\n" \
- " ARG1 + ARG2 Sum of ARG1 and ARG2. Similarly:\n" \
- " ARG1 - ARG2\n" \
- " ARG1 * ARG2\n" \
- " ARG1 / ARG2\n" \
- " ARG1 % ARG2\n" \
- " STRING : REGEXP Anchored pattern match of REGEXP in STRING\n" \
- " match STRING REGEXP Same as STRING : REGEXP\n" \
- " substr STRING POS LENGTH Substring of STRING, POS counted from 1\n" \
- " index STRING CHARS Index in STRING where any CHARS is found, or 0\n" \
- " length STRING Length of STRING\n" \
- " quote TOKEN Interpret TOKEN as a string, even if\n" \
- " it is a keyword like 'match' or an\n" \
- " operator like '/'\n" \
- " (EXPRESSION) Value of EXPRESSION\n" \
- "\n" \
- "Beware that many operators need to be escaped or quoted for shells.\n" \
- "Comparisons are arithmetic if both ARGs are numbers, else\n" \
- "lexicographical. Pattern matches return the string matched between\n" \
- "\\( and \\) or null; if \\( and \\) are not used, they return the number\n" \
- "of characters matched or 0."
-
#define fakeidentd_trivial_usage \
"[-fiw] [-b ADDR] [STRING]"
#define fakeidentd_full_usage "\n\n" \
@@ -943,16 +556,6 @@ INSERT
"\n -b ADDR Bind to specified address" \
"\n STRING Ident answer string (default: nobody)" \
-#define false_trivial_usage \
- ""
-#define false_full_usage "\n\n" \
- "Return an exit code of FALSE (1)"
-
-#define false_example_usage \
- "$ false\n" \
- "$ echo $?\n" \
- "1\n"
-
#define fbsplash_trivial_usage \
"-s IMGFILE [-c] [-d DEV] [-i INIFILE] [-f CMD]"
#define fbsplash_full_usage "\n\n" \
@@ -1058,15 +661,6 @@ INSERT
"\n -u Unlock FD" \
"\n -n Fail rather than wait" \
-#define fold_trivial_usage \
- "[-bs] [-w WIDTH] [FILE]..."
-#define fold_full_usage "\n\n" \
- "Wrap input lines in each FILE (or stdin), writing to stdout\n" \
- "\nOptions:" \
- "\n -b Count bytes rather than columns" \
- "\n -s Break at spaces" \
- "\n -w Use WIDTH columns instead of 80" \
-
#define free_trivial_usage \
"" IF_DESKTOP("[-b/k/m/g]")
#define free_full_usage "\n\n" \
@@ -1267,51 +861,6 @@ INSERT
"\n -Z Disable Seagate auto-powersaving mode" \
"\n -z Reread partition table" \
-#define head_trivial_usage \
- "[OPTIONS] [FILE]..."
-#define head_full_usage "\n\n" \
- "Print first 10 lines of each FILE (or stdin) to stdout.\n" \
- "With more than one FILE, precede each with a filename header.\n" \
- "\nOptions:" \
- "\n -n N[kbm] Print first N lines" \
- IF_FEATURE_FANCY_HEAD( \
- "\n -c N[kbm] Print first N bytes" \
- "\n -q Never print headers" \
- "\n -v Always print headers" \
- ) \
- "\n" \
- "\nN may be suffixed by k (x1024), b (x512), or m (x1024^2)." \
-
-#define head_example_usage \
- "$ head -n 2 /etc/passwd\n" \
- "root:x:0:0:root:/root:/bin/bash\n" \
- "daemon:x:1:1:daemon:/usr/sbin:/bin/sh\n"
-
-#define tail_trivial_usage \
- "[OPTIONS] [FILE]..."
-#define tail_full_usage "\n\n" \
- "Print last 10 lines of each FILE (or stdin) to stdout.\n" \
- "With more than one FILE, precede each with a filename header.\n" \
- "\nOptions:" \
- "\n -f Print data as file grows" \
- IF_FEATURE_FANCY_TAIL( \
- "\n -s SECONDS Wait SECONDS between reads with -f" \
- ) \
- "\n -n N[kbm] Print last N lines" \
- IF_FEATURE_FANCY_TAIL( \
- "\n -c N[kbm] Print last N bytes" \
- "\n -q Never print headers" \
- "\n -v Always print headers" \
- "\n" \
- "\nN may be suffixed by k (x1024), b (x512), or m (x1024^2)." \
- "\nIf N starts with a '+', output begins with the Nth item from the start" \
- "\nof each file, not from the end." \
- ) \
-
-#define tail_example_usage \
- "$ tail -n 1 /etc/resolv.conf\n" \
- "nameserver 10.0.0.1\n"
-
#define hexdump_trivial_usage \
"[-bcCdefnosvx" IF_FEATURE_HEXDUMP_REVERSE("R") "] [FILE]..."
#define hexdump_full_usage "\n\n" \
@@ -1336,11 +885,6 @@ INSERT
#define hd_full_usage "\n\n" \
"hd is an alias for hexdump -C"
-#define hostid_trivial_usage \
- ""
-#define hostid_full_usage "\n\n" \
- "Print out a unique 32-bit identifier for the machine"
-
#define hostname_trivial_usage \
"[OPTIONS] [HOSTNAME | -F FILE]"
#define hostname_full_usage "\n\n" \
@@ -1385,24 +929,6 @@ INSERT
"\n -e STRING HTML encode STRING" \
"\n -d STRING URL decode STRING" \
-#define id_trivial_usage \
- "[OPTIONS] [USER]"
-#define id_full_usage "\n\n" \
- "Print information about USER or the current user\n" \
- "\nOptions:" \
- IF_SELINUX( \
- "\n -Z Security context" \
- ) \
- "\n -u User ID" \
- "\n -g Group ID" \
- "\n -G Supplementary group IDs" \
- "\n -n Print names instead of numbers" \
- "\n -r Print real ID instead of effective ID" \
-
-#define id_example_usage \
- "$ id\n" \
- "uid=1000(andersen) gid=1000(andersen)\n"
-
#define ifconfig_trivial_usage \
IF_FEATURE_IFCONFIG_STATUS("[-a]") " interface [address]"
#define ifconfig_full_usage "\n\n" \
@@ -1542,24 +1068,6 @@ INSERT
"\ninotifyd waits for PROG to exit." \
"\nWhen x event happens for all FILEs, inotifyd exits." \
-/* -v, -b, -c are ignored */
-#define install_trivial_usage \
- "[-cdDsp] [-o USER] [-g GRP] [-m MODE] [SOURCE]... DEST"
-#define install_full_usage "\n\n" \
- "Copy files and set attributes\n" \
- "\nOptions:" \
- "\n -c Just copy (default)" \
- "\n -d Create directories" \
- "\n -D Create leading target directories" \
- "\n -s Strip symbol table" \
- "\n -p Preserve date" \
- "\n -o USER Set ownership" \
- "\n -g GRP Set group ownership" \
- "\n -m MODE Set permissions" \
- IF_SELINUX( \
- "\n -Z Set security context" \
- )
-
/* would need to make the " | " optional depending on more than one selected: */
#define ip_trivial_usage \
"[OPTIONS] {" \
@@ -1732,15 +1240,6 @@ INSERT
"\n -c N Only messages with level < N are printed to console" \
"\n -n Run in foreground" \
-#define length_trivial_usage \
- "STRING"
-#define length_full_usage "\n\n" \
- "Print STRING's length"
-
-#define length_example_usage \
- "$ length Hello\n" \
- "5\n"
-
#define less_trivial_usage \
"[-EMNmh~I?] [FILE]..."
#define less_full_usage "\n\n" \
@@ -1765,22 +1264,6 @@ INSERT
" linux32 Set 32bit uname emulation\n" \
" linux64 Set 64bit uname emulation" \
-#define ln_trivial_usage \
- "[OPTIONS] TARGET... LINK|DIR"
-#define ln_full_usage "\n\n" \
- "Create a link LINK or DIR/TARGET to the specified TARGET(s)\n" \
- "\nOptions:" \
- "\n -s Make symlinks instead of hardlinks" \
- "\n -f Remove existing destinations" \
- "\n -n Don't dereference symlinks - treat like normal file" \
- "\n -b Make a backup of the target (if exists) before link operation" \
- "\n -S suf Use suffix instead of ~ when making backup files" \
-
-#define ln_example_usage \
- "$ ln -s BusyBox /tmp/ls\n" \
- "$ ls -l /tmp/ls\n" \
- "lrwxrwxrwx 1 root root 7 Apr 12 18:39 ls -> BusyBox*\n"
-
#define load_policy_trivial_usage NOUSAGE_STR
#define load_policy_full_usage ""
@@ -1805,14 +1288,6 @@ INSERT
"\n -h Name of the remote host" \
"\n -p Preserve environment" \
-#define logname_trivial_usage \
- ""
-#define logname_full_usage "\n\n" \
- "Print the name of the current user"
-#define logname_example_usage \
- "$ logname\n" \
- "root\n"
-
#define logread_trivial_usage \
"[-f]"
#define logread_full_usage "\n\n" \
@@ -1981,64 +1456,6 @@ INSERT
"\n -p Use prefix to speed translations" \
"\n -V Verify file context on disk matches defaults" \
-#define md5sum_trivial_usage \
- "[FILE]..." \
- IF_FEATURE_MD5_SHA1_SUM_CHECK("\n or: md5sum -c [-sw] [FILE]")
-#define md5sum_full_usage "\n\n" \
- "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " MD5 checksums" \
- IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \
- "\nOptions:" \
- "\n -c Check sums against given list" \
- "\n -s Don't output anything, status code shows success" \
- "\n -w Warn about improperly formatted checksum lines" \
- )
-
-#define md5sum_example_usage \
- "$ md5sum < busybox\n" \
- "6fd11e98b98a58f64ff3398d7b324003\n" \
- "$ md5sum busybox\n" \
- "6fd11e98b98a58f64ff3398d7b324003 busybox\n" \
- "$ md5sum -c -\n" \
- "6fd11e98b98a58f64ff3398d7b324003 busybox\n" \
- "busybox: OK\n" \
- "^D\n"
-
-#define sha1sum_trivial_usage \
- "[FILE]..." \
- IF_FEATURE_MD5_SHA1_SUM_CHECK("\n or: sha1sum -c [-sw] [FILE]")
-#define sha1sum_full_usage "\n\n" \
- "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA1 checksums" \
- IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \
- "\nOptions:" \
- "\n -c Check sums against given list" \
- "\n -s Don't output anything, status code shows success" \
- "\n -w Warn about improperly formatted checksum lines" \
- )
-
-#define sha256sum_trivial_usage \
- "[FILE]..." \
- IF_FEATURE_MD5_SHA1_SUM_CHECK("\n or: sha256sum -c [-sw] [FILE]")
-#define sha256sum_full_usage "\n\n" \
- "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA256 checksums" \
- IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \
- "\nOptions:" \
- "\n -c Check sums against given list" \
- "\n -s Don't output anything, status code shows success" \
- "\n -w Warn about improperly formatted checksum lines" \
- )
-
-#define sha512sum_trivial_usage \
- "[FILE]..." \
- IF_FEATURE_MD5_SHA1_SUM_CHECK("\n or: sha512sum -c [-sw] [FILE]")
-#define sha512sum_full_usage "\n\n" \
- "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA512 checksums" \
- IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \
- "\nOptions:" \
- "\n -c Check sums against given list" \
- "\n -s Don't output anything, status code shows success" \
- "\n -w Warn about improperly formatted checksum lines" \
- )
-
#define mdev_trivial_usage \
"[-s]"
#define mdev_full_usage "\n\n" \
@@ -2084,35 +1501,6 @@ INSERT
"\n -s Set serial line to SPEED" \
"\n -X Disable special meaning of NUL and Ctrl-X from stdin" \
-#define mkdir_trivial_usage \
- "[OPTIONS] DIRECTORY..."
-#define mkdir_full_usage "\n\n" \
- "Create DIRECTORY\n" \
- "\nOptions:" \
- "\n -m MODE Mode" \
- "\n -p No error if exists; make parent directories as needed" \
- IF_SELINUX( \
- "\n -Z Set security context" \
- )
-
-#define mkdir_example_usage \
- "$ mkdir /tmp/foo\n" \
- "$ mkdir /tmp/foo\n" \
- "/tmp/foo: File exists\n" \
- "$ mkdir /tmp/foo/bar/baz\n" \
- "/tmp/foo/bar/baz: No such file or directory\n" \
- "$ mkdir -p /tmp/foo/bar/baz\n"
-
-#define mkfifo_trivial_usage \
- "[-m MODE] " IF_SELINUX("[-Z] ") "NAME"
-#define mkfifo_full_usage "\n\n" \
- "Create named pipe\n" \
- "\nOptions:" \
- "\n -m MODE Mode (default a=rw)" \
- IF_SELINUX( \
- "\n -Z Set security context" \
- )
-
#define mkfs_ext2_trivial_usage \
"[-Fn] " \
/* "[-c|-l filename] " */ \
@@ -2187,24 +1575,6 @@ INSERT
/* "\n -I Allow to use entire disk device (e.g. /dev/hda)" */ \
"\n -n LBL Volume label" \
-#define mknod_trivial_usage \
- "[-m MODE] " IF_SELINUX("[-Z] ") "NAME TYPE MAJOR MINOR"
-#define mknod_full_usage "\n\n" \
- "Create a special file (block, character, or pipe)\n" \
- "\nOptions:" \
- "\n -m MODE Creation mode (default a=rw)" \
- IF_SELINUX( \
- "\n -Z Set security context" \
- ) \
- "\nTYPE:" \
- "\n b Block device" \
- "\n c or u Character device" \
- "\n p Named pipe (MAJOR and MINOR are ignored)" \
-
-#define mknod_example_usage \
- "$ mknod /dev/fd0 b 2 0\n" \
- "$ mknod -m 644 /tmp/pipe p\n"
-
#define mkswap_trivial_usage \
"[-L LBL] BLOCKDEV [KBYTES]"
#define mkswap_full_usage "\n\n" \
@@ -2307,13 +1677,6 @@ INSERT
"ras3 reset retension rewind rewoffline seek setblk setdensity\n" \
"setpart tell unload unlock weof wset" \
-#define nohup_trivial_usage \
- "PROG ARGS"
-#define nohup_full_usage "\n\n" \
- "Run PROG immune to hangups, with output to a non-tty"
-#define nohup_example_usage \
- "$ nohup make &"
-
#define nslookup_trivial_usage \
"[HOST] [SERVER]"
#define nslookup_full_usage "\n\n" \
@@ -2343,12 +1706,6 @@ INSERT
"\n -S PROG Run PROG after stepping time, stratum change, and every 11 mins" \
"\n -p PEER Obtain time from PEER (may be repeated)" \
-#define od_trivial_usage \
- "[-aBbcDdeFfHhIiLlOovXx] " IF_DESKTOP("[-t TYPE] ") "[FILE]"
-#define od_full_usage "\n\n" \
- "Write an unambiguous representation, octal bytes by default, of FILE\n" \
- "(or stdin) to stdout"
-
/*
#define parse_trivial_usage \
"[-n MAXTOKENS] [-m MINTOKENS] [-d DELIMS] [-f FLAGS] FILE..."
@@ -2477,21 +1834,6 @@ INSERT
"$ popmaildir -k ~/Maildir -- nc pop.drvv.ru 110 [<password_file]\n" \
"$ popmaildir ~/Maildir -- openssl s_client -quiet -connect pop.gmail.com:995 [<password_file]\n"
-#define printenv_trivial_usage \
- "[VARIABLE]..."
-#define printenv_full_usage "\n\n" \
- "Print environment VARIABLEs.\n" \
- "If no VARIABLE specified, print all."
-
-#define printf_trivial_usage \
- "FORMAT [ARGUMENT]..."
-#define printf_full_usage "\n\n" \
- "Format and print ARGUMENT(s) according to FORMAT,\n" \
- "where FORMAT controls the output exactly as in C printf"
-#define printf_example_usage \
- "$ printf \"Val=%d\\n\" 5\n" \
- "Val=5\n"
-
#if ENABLE_DESKTOP
@@ -2552,14 +1894,6 @@ INSERT
"\n -t Timeout (default 5000 ms)" \
"\n -T Minimum rtt (default 5 ms, increase for congested hosts)" \
-#define pwd_trivial_usage \
- ""
-#define pwd_full_usage "\n\n" \
- "Print the full filename of the current working directory"
-#define pwd_example_usage \
- "$ pwd\n" \
- "/root\n"
-
#define raidautorun_trivial_usage \
"DEVICE"
#define raidautorun_full_usage "\n\n" \
@@ -2588,17 +1922,6 @@ INSERT
#define readahead_full_usage "\n\n" \
"Preload FILEs to RAM"
-#define readlink_trivial_usage \
- IF_FEATURE_READLINK_FOLLOW("[-fnv] ") "FILE"
-#define readlink_full_usage "\n\n" \
- "Display the value of a symlink" \
- IF_FEATURE_READLINK_FOLLOW( "\n" \
- "\nOptions:" \
- "\n -f Canonicalize by following all symlinks" \
- "\n -n Don't add newline" \
- "\n -v Verbose" \
- ) \
-
#define readprofile_trivial_usage \
"[OPTIONS]"
#define readprofile_full_usage "\n\n" \
@@ -2614,11 +1937,6 @@ INSERT
"\n -r Reset all the counters (root only)" \
"\n -n Disable byte order auto-detection" \
-#define realpath_trivial_usage \
- "FILE..."
-#define realpath_full_usage "\n\n" \
- "Return the absolute pathnames of given FILE"
-
#define reformime_trivial_usage \
"[OPTIONS] [FILE]..."
#define reformime_full_usage "\n\n" \
@@ -2663,34 +1981,6 @@ INSERT
"\n TYPE: all, wlan(wifi), bluetooth, uwb(ultrawideband)," \
"\n wimax, wwan, gps, fm" \
-#define rm_trivial_usage \
- "[-irf] FILE..."
-#define rm_full_usage "\n\n" \
- "Remove (unlink) FILEs\n" \
- "\nOptions:" \
- "\n -i Always prompt before removing" \
- "\n -f Never prompt" \
- "\n -R,-r Recurse" \
-
-#define rm_example_usage \
- "$ rm -rf /tmp/foo\n"
-
-#define rmdir_trivial_usage \
- "[OPTIONS] DIRECTORY..."
-#define rmdir_full_usage "\n\n" \
- "Remove DIRECTORY if it is empty\n" \
- "\nOptions:" \
- IF_FEATURE_RMDIR_LONG_OPTIONS( \
- "\n -p|--parents Include parents" \
- "\n --ignore-fail-on-non-empty" \
- ) \
- IF_NOT_FEATURE_RMDIR_LONG_OPTIONS( \
- "\n -p Include parents" \
- )
-
-#define rmdir_example_usage \
- "# rmdir /tmp/foo\n"
-
#define route_trivial_usage \
"[{add|del|delete}]"
#define route_full_usage "\n\n" \
@@ -2832,15 +2122,6 @@ INSERT
#define selinuxenabled_trivial_usage NOUSAGE_STR
#define selinuxenabled_full_usage ""
-#define seq_trivial_usage \
- "[-w] [-s SEP] [FIRST [INC]] LAST"
-#define seq_full_usage "\n\n" \
- "Print numbers from FIRST to LAST, in steps of INC.\n" \
- "FIRST, INC default to 1.\n" \
- "\nOptions:" \
- "\n -w Pad to last with leading zeros" \
- "\n -s SEP String separator" \
-
#define sestatus_trivial_usage \
"[-vb]"
#define sestatus_full_usage "\n\n" \
@@ -2924,80 +2205,6 @@ INSERT
"\n -L Enable 3-wire operation" \
"\n -F Disable RTS/CTS flow control" \
-#define sleep_trivial_usage \
- IF_FEATURE_FANCY_SLEEP("[") "N" IF_FEATURE_FANCY_SLEEP("]...")
-#define sleep_full_usage "\n\n" \
- IF_NOT_FEATURE_FANCY_SLEEP("Pause for N seconds") \
- IF_FEATURE_FANCY_SLEEP( \
- "Pause for a time equal to the total of the args given, where each arg can\n" \
- "have an optional suffix of (s)econds, (m)inutes, (h)ours, or (d)ays")
-#define sleep_example_usage \
- "$ sleep 2\n" \
- "[2 second delay results]\n" \
- IF_FEATURE_FANCY_SLEEP( \
- "$ sleep 1d 3h 22m 8s\n" \
- "[98528 second delay results]\n")
-
-#define sort_trivial_usage \
- "[-nru" \
- IF_FEATURE_SORT_BIG("gMcszbdfimSTokt] [-o FILE] [-k start[.offset][opts][,end[.offset][opts]] [-t CHAR") \
- "] [FILE]..."
-#define sort_full_usage "\n\n" \
- "Sort lines of text\n" \
- "\nOptions:" \
- IF_FEATURE_SORT_BIG( \
- "\n -b Ignore leading blanks" \
- "\n -c Check whether input is sorted" \
- "\n -d Dictionary order (blank or alphanumeric only)" \
- "\n -f Ignore case" \
- "\n -g General numerical sort" \
- "\n -i Ignore unprintable characters" \
- "\n -k Sort key" \
- "\n -M Sort month" \
- ) \
- "\n -n Sort numbers" \
- IF_FEATURE_SORT_BIG( \
- "\n -o Output to file" \
- "\n -k Sort by key" \
- "\n -t CHAR Key separator" \
- ) \
- "\n -r Reverse sort order" \
- IF_FEATURE_SORT_BIG( \
- "\n -s Stable (don't sort ties alphabetically)" \
- ) \
- "\n -u Suppress duplicate lines" \
- IF_FEATURE_SORT_BIG( \
- "\n -z Lines are terminated by NUL, not newline" \
- "\n -mST Ignored for GNU compatibility") \
-
-#define sort_example_usage \
- "$ echo -e \"e\\nf\\nb\\nd\\nc\\na\" | sort\n" \
- "a\n" \
- "b\n" \
- "c\n" \
- "d\n" \
- "e\n" \
- "f\n" \
- IF_FEATURE_SORT_BIG( \
- "$ echo -e \"c 3\\nb 2\\nd 2\" | $SORT -k 2,2n -k 1,1r\n" \
- "d 2\n" \
- "b 2\n" \
- "c 3\n" \
- ) \
- ""
-
-#define split_trivial_usage \
- "[OPTIONS] [INPUT [PREFIX]]"
-#define split_full_usage "\n\n" \
- "Options:" \
- "\n -b N[k|m] Split by N (kilo|mega)bytes" \
- "\n -l N Split by N lines" \
- "\n -a N Use N letters as suffix" \
-
-#define split_example_usage \
- "$ split TODO foo\n" \
- "$ cat TODO | split -a 2 -l 2 TODO_\n"
-
#define start_stop_daemon_trivial_usage \
"[OPTIONS] [-S|-K] ... [-- ARGS...]"
#define start_stop_daemon_full_usage "\n\n" \
@@ -3061,66 +2268,6 @@ INSERT
"\n -q Quiet" \
) \
-#define stat_trivial_usage \
- "[OPTIONS] FILE..."
-#define stat_full_usage "\n\n" \
- "Display file (default) or filesystem status\n" \
- "\nOptions:" \
- IF_FEATURE_STAT_FORMAT( \
- "\n -c fmt Use the specified format" \
- ) \
- "\n -f Display filesystem status" \
- "\n -L Follow links" \
- "\n -t Display info in terse form" \
- IF_SELINUX( \
- "\n -Z Print security context" \
- ) \
- IF_FEATURE_STAT_FORMAT( \
- "\n\nValid format sequences for files:\n" \
- " %a Access rights in octal\n" \
- " %A Access rights in human readable form\n" \
- " %b Number of blocks allocated (see %B)\n" \
- " %B The size in bytes of each block reported by %b\n" \
- " %d Device number in decimal\n" \
- " %D Device number in hex\n" \
- " %f Raw mode in hex\n" \
- " %F File type\n" \
- " %g Group ID of owner\n" \
- " %G Group name of owner\n" \
- " %h Number of hard links\n" \
- " %i Inode number\n" \
- " %n File name\n" \
- " %N File name, with -> TARGET if symlink\n" \
- " %o I/O block size\n" \
- " %s Total size, in bytes\n" \
- " %t Major device type in hex\n" \
- " %T Minor device type in hex\n" \
- " %u User ID of owner\n" \
- " %U User name of owner\n" \
- " %x Time of last access\n" \
- " %X Time of last access as seconds since Epoch\n" \
- " %y Time of last modification\n" \
- " %Y Time of last modification as seconds since Epoch\n" \
- " %z Time of last change\n" \
- " %Z Time of last change as seconds since Epoch\n" \
- "\nValid format sequences for file systems:\n" \
- " %a Free blocks available to non-superuser\n" \
- " %b Total data blocks in file system\n" \
- " %c Total file nodes in file system\n" \
- " %d Free file nodes in file system\n" \
- " %f Free blocks in file system\n" \
- IF_SELINUX( \
- " %C Security context in selinux\n" \
- ) \
- " %i File System ID in hex\n" \
- " %l Maximum length of filenames\n" \
- " %n File name\n" \
- " %s Block size (for faster transfer)\n" \
- " %S Fundamental block size (for block counts)\n" \
- " %t Type in hex\n" \
- " %T Type in human readable form" \
- ) \
-
#define strings_trivial_usage \
"[-afo] [-n LEN] [FILE]..."
#define strings_full_usage "\n\n" \
@@ -3131,17 +2278,6 @@ INSERT
"\n -n LEN At least LEN characters form a string (default 4)" \
"\n -o Precede strings with decimal offsets" \
-#define stty_trivial_usage \
- "[-a|g] [-F DEVICE] [SETTING]..."
-#define stty_full_usage "\n\n" \
- "Without arguments, prints baud rate, line discipline,\n" \
- "and deviations from stty sane\n" \
- "\nOptions:" \
- "\n -F DEVICE Open device instead of stdin" \
- "\n -a Print all current settings in human-readable form" \
- "\n -g Print in stty-readable form" \
- "\n [SETTING] See manpage" \
-
#define sulogin_trivial_usage \
"[-t N] [TTY]"
#define sulogin_full_usage "\n\n" \
@@ -3149,14 +2285,6 @@ INSERT
"\nOptions:" \
"\n -t N Timeout" \
-#define sum_trivial_usage \
- "[-rs] [FILE]..."
-#define sum_full_usage "\n\n" \
- "Checksum and count the blocks in a file\n" \
- "\nOptions:" \
- "\n -r Use BSD sum algorithm (1K blocks)" \
- "\n -s Use System V sum algorithm (512byte blocks)" \
-
#define sv_trivial_usage \
"[-v] [-w SEC] CMD SERVICE_DIR..."
#define sv_full_usage "\n\n" \
@@ -3199,18 +2327,6 @@ INSERT
"\nOptions:" \
"\n -c DEV Reopen stdio to DEV after switch" \
-#define sync_trivial_usage \
- ""
-#define sync_full_usage "\n\n" \
- "Write all buffered blocks to disk"
-
-#define fsync_trivial_usage \
- "[-d] FILE..."
-#define fsync_full_usage "\n\n" \
- "Write files' buffered blocks to disk\n" \
- "\nOptions:" \
- "\n -d Avoid syncing metadata"
-
#define sysctl_trivial_usage \
"[OPTIONS] [VALUE]..."
#define sysctl_full_usage "\n\n" \
@@ -3257,11 +2373,6 @@ INSERT
"$ syslogd -R masterlog:514\n" \
"$ syslogd -R 192.168.1.1:601\n"
-#define tac_trivial_usage \
- "[FILE]..."
-#define tac_full_usage "\n\n" \
- "Concatenate FILEs and print them in reverse"
-
#define taskset_trivial_usage \
"[-p] [MASK] [PID | PROG ARGS]"
#define taskset_full_usage "\n\n" \
@@ -3280,19 +2391,6 @@ INSERT
"$ taskset -p 1\n" \
"pid 1's current affinity mask: 3\n"
-#define tee_trivial_usage \
- "[-ai] [FILE]..."
-#define tee_full_usage "\n\n" \
- "Copy stdin to each FILE, and also to stdout\n" \
- "\nOptions:" \
- "\n -a Append to the given FILEs, don't overwrite" \
- "\n -i Ignore interrupt signals (SIGINT)" \
-
-#define tee_example_usage \
- "$ echo \"Hello\" | tee /tmp/foo\n" \
- "$ cat /tmp/foo\n" \
- "Hello\n"
-
#if ENABLE_FEATURE_TELNET_AUTOLOGIN
#define telnet_trivial_usage \
"[-a] [-l USER] HOST [PORT]"
@@ -3330,28 +2428,6 @@ INSERT
) \
)
-/* "test --help" does not print help (POSIX compat), only "[ --help" does.
- * We display "<applet> EXPRESSION ]" here (not "<applet> EXPRESSION")
- * Unfortunately, it screws up generated BusyBox.html. TODO. */
-#define test_trivial_usage \
- "EXPRESSION ]"
-#define test_full_usage "\n\n" \
- "Check file types, compare values etc. Return a 0/1 exit code\n" \
- "depending on logical value of EXPRESSION"
-#define test_example_usage \
- "$ test 1 -eq 2\n" \
- "$ echo $?\n" \
- "1\n" \
- "$ test 1 -eq 1\n" \
- "$ echo $?\n" \
- "0\n" \
- "$ [ -d /etc ]\n" \
- "$ echo $?\n" \
- "0\n" \
- "$ [ -d /junk ]\n" \
- "$ echo $?\n" \
- "1\n"
-
#define tc_trivial_usage \
/*"[OPTIONS] "*/"OBJECT CMD [dev STRING]"
#define tc_full_usage "\n\n" \
@@ -3454,19 +2530,6 @@ INSERT
"Runs PROG. Sends SIG to it if it is not gone in SECS seconds.\n" \
"Defaults: SECS: 10, SIG: TERM." \
-#define tr_trivial_usage \
- "[-cds] STRING1 [STRING2]"
-#define tr_full_usage "\n\n" \
- "Translate, squeeze, or delete characters from stdin, writing to stdout\n" \
- "\nOptions:" \
- "\n -c Take complement of STRING1" \
- "\n -d Delete input characters coded STRING1" \
- "\n -s Squeeze multiple output characters of STRING2 into one character" \
-
-#define tr_example_usage \
- "$ echo \"gdkkn vnqkc\" | tr [a-y] [b-z]\n" \
- "hello world\n"
-
#define traceroute_trivial_usage \
"[-"IF_TRACEROUTE6("46")"FIldnrv] [-f 1ST_TTL] [-m MAXTTL] [-p PORT] [-q PROBES]\n" \
" [-s SRC_IP] [-t TOS] [-w WAIT_SEC] [-g GATEWAY] [-i IFACE]\n" \
@@ -3512,27 +2575,6 @@ INSERT
"\n -t Type-of-service in probe packets (default 0)" \
"\n -w Time in seconds to wait for a response (default 3)" \
-#define true_trivial_usage \
- ""
-#define true_full_usage "\n\n" \
- "Return an exit code of TRUE (0)"
-#define true_example_usage \
- "$ true\n" \
- "$ echo $?\n" \
- "0\n"
-
-#define tty_trivial_usage \
- ""
-#define tty_full_usage "\n\n" \
- "Print file name of stdin's terminal" \
- IF_INCLUDE_SUSv2( "\n" \
- "\nOptions:" \
- "\n -s Print nothing, only return exit status" \
- )
-#define tty_example_usage \
- "$ tty\n" \
- "/dev/tty2\n"
-
#define ttysize_trivial_usage \
"[w] [h]"
#define ttysize_full_usage "\n\n" \
@@ -3587,57 +2629,6 @@ INSERT
#define umount_example_usage \
"$ umount /dev/hdc1\n"
-#define uname_trivial_usage \
- "[-amnrspv]"
-#define uname_full_usage "\n\n" \
- "Print system information\n" \
- "\nOptions:" \
- "\n -a Print all" \
- "\n -m The machine (hardware) type" \
- "\n -n Hostname" \
- "\n -r OS release" \
- "\n -s OS name (default)" \
- "\n -p Processor type" \
- "\n -v OS version" \
-
-#define uname_example_usage \
- "$ uname -a\n" \
- "Linux debian 2.4.23 #2 Tue Dec 23 17:09:10 MST 2003 i686 GNU/Linux\n"
-
-#define unexpand_trivial_usage \
- "[-fa][-t N] [FILE]..."
-#define unexpand_full_usage "\n\n" \
- "Convert spaces to tabs, writing to stdout\n" \
- "\nOptions:" \
- IF_FEATURE_UNEXPAND_LONG_OPTIONS( \
- "\n -a,--all Convert all blanks" \
- "\n -f,--first-only Convert only leading blanks" \
- "\n -t,--tabs=N Tabstops every N chars" \
- ) \
- IF_NOT_FEATURE_UNEXPAND_LONG_OPTIONS( \
- "\n -a Convert all blanks" \
- "\n -f Convert only leading blanks" \
- "\n -t N Tabstops every N chars" \
- )
-
-#define uniq_trivial_usage \
- "[-cdu][-f,s,w N] [INPUT [OUTPUT]]"
-#define uniq_full_usage "\n\n" \
- "Discard duplicate lines\n" \
- "\nOptions:" \
- "\n -c Prefix lines by the number of occurrences" \
- "\n -d Only print duplicate lines" \
- "\n -u Only print unique lines" \
- "\n -f N Skip first N fields" \
- "\n -s N Skip first N chars (after any skipped fields)" \
- "\n -w N Compare N characters in line" \
-
-#define uniq_example_usage \
- "$ echo -e \"a\\na\\nb\\nc\\nc\\na\" | sort | uniq\n" \
- "a\n" \
- "b\n" \
- "c\n"
-
#define uptime_trivial_usage \
""
#define uptime_full_usage "\n\n" \
@@ -3647,40 +2638,6 @@ INSERT
"$ uptime\n" \
" 1:55pm up 2:30, load average: 0.09, 0.04, 0.00\n"
-#define usleep_trivial_usage \
- "N"
-#define usleep_full_usage "\n\n" \
- "Pause for N microseconds"
-
-#define usleep_example_usage \
- "$ usleep 1000000\n" \
- "[pauses for 1 second]\n"
-
-#define uudecode_trivial_usage \
- "[-o OUTFILE] [INFILE]"
-#define uudecode_full_usage "\n\n" \
- "Uudecode a file\n" \
- "Finds outfile name in uuencoded source unless -o is given"
-
-#define uudecode_example_usage \
- "$ uudecode -o busybox busybox.uu\n" \
- "$ ls -l busybox\n" \
- "-rwxr-xr-x 1 ams ams 245264 Jun 7 21:35 busybox\n"
-
-#define uuencode_trivial_usage \
- "[-m] [INFILE] STORED_FILENAME"
-#define uuencode_full_usage "\n\n" \
- "Uuencode a file to stdout\n" \
- "\nOptions:" \
- "\n -m Use base64 encoding per RFC1521" \
-
-#define uuencode_example_usage \
- "$ uuencode busybox busybox\n" \
- "begin 755 busybox\n" \
- "<encoded file snipped>\n" \
- "$ uudecode busybox busybox > busybox.uu\n" \
- "$\n"
-
#define vconfig_trivial_usage \
"COMMAND [OPTIONS]"
#define vconfig_full_usage "\n\n" \
@@ -3759,18 +2716,6 @@ INSERT
"$ which login\n" \
"/bin/login\n"
-#define who_trivial_usage \
- "[-a]"
-#define who_full_usage "\n\n" \
- "Show who is logged on\n" \
- "\nOptions:" \
- "\n -a Show all" \
-
-#define whoami_trivial_usage \
- ""
-#define whoami_full_usage "\n\n" \
- "Print the user name associated with the current effective user id"
-
#define zcip_trivial_usage \
"[OPTIONS] IFACE SCRIPT"
#define zcip_full_usage "\n\n" \