diff options
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 @@ | |||
28 | //config: leaving just the filename itself. Enable this option if you wish | 28 | //config: leaving just the filename itself. Enable this option if you wish |
29 | //config: to enable the 'basename' utility. | 29 | //config: to enable the 'basename' utility. |
30 | 30 | ||
31 | //usage:#define basename_trivial_usage | ||
32 | //usage: "FILE [SUFFIX]" | ||
33 | //usage:#define basename_full_usage "\n\n" | ||
34 | //usage: "Strip directory path and .SUFFIX from FILE\n" | ||
35 | //usage: | ||
36 | //usage:#define basename_example_usage | ||
37 | //usage: "$ basename /usr/local/bin/foo\n" | ||
38 | //usage: "foo\n" | ||
39 | //usage: "$ basename /usr/local/bin/\n" | ||
40 | //usage: "bin\n" | ||
41 | //usage: "$ basename /foo/bar.txt .txt\n" | ||
42 | //usage: "bar" | ||
43 | |||
31 | #include "libbb.h" | 44 | #include "libbb.h" |
32 | 45 | ||
33 | /* This is a NOFORK applet. Be very careful! */ | 46 | /* 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 @@ | |||
16 | * | 16 | * |
17 | * Major size reduction... over 50% (>1.5k) on i386. | 17 | * Major size reduction... over 50% (>1.5k) on i386. |
18 | */ | 18 | */ |
19 | |||
20 | //usage:#define cal_trivial_usage | ||
21 | //usage: "[-jy] [[MONTH] YEAR]" | ||
22 | //usage:#define cal_full_usage "\n\n" | ||
23 | //usage: "Display a calendar\n" | ||
24 | //usage: "\nOptions:" | ||
25 | //usage: "\n -j Use julian dates" | ||
26 | //usage: "\n -y Display the entire year" | ||
27 | |||
19 | #include "libbb.h" | 28 | #include "libbb.h" |
20 | #include "unicode.h" | 29 | #include "unicode.h" |
21 | 30 | ||
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 @@ | |||
22 | //config: cat is used to concatenate files and print them to the standard | 22 | //config: cat is used to concatenate files and print them to the standard |
23 | //config: output. Enable this option if you wish to enable the 'cat' utility. | 23 | //config: output. Enable this option if you wish to enable the 'cat' utility. |
24 | 24 | ||
25 | //usage:#define cat_trivial_usage | ||
26 | //usage: "[FILE]..." | ||
27 | //usage:#define cat_full_usage "\n\n" | ||
28 | //usage: "Concatenate FILEs and print them to stdout" | ||
29 | //usage: | ||
30 | //usage:#define cat_example_usage | ||
31 | //usage: "$ cat /proc/uptime\n" | ||
32 | //usage: "110716.72 17.67" | ||
33 | |||
25 | #include "libbb.h" | 34 | #include "libbb.h" |
26 | 35 | ||
27 | /* This is a NOFORK applet. Be very careful! */ | 36 | /* 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 @@ | |||
10 | /* See "Cat -v considered harmful" at | 10 | /* See "Cat -v considered harmful" at |
11 | * http://cm.bell-labs.com/cm/cs/doc/84/kp.ps.gz */ | 11 | * http://cm.bell-labs.com/cm/cs/doc/84/kp.ps.gz */ |
12 | 12 | ||
13 | //usage:#define catv_trivial_usage | ||
14 | //usage: "[-etv] [FILE]..." | ||
15 | //usage:#define catv_full_usage "\n\n" | ||
16 | //usage: "Display nonprinting characters as ^x or M-x\n" | ||
17 | //usage: "\nOptions:" | ||
18 | //usage: "\n -e End each line with $" | ||
19 | //usage: "\n -t Show tabs as ^I" | ||
20 | //usage: "\n -v Don't use ^x or M-x escapes" | ||
21 | |||
13 | #include "libbb.h" | 22 | #include "libbb.h" |
14 | 23 | ||
15 | int catv_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 24 | 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 @@ | |||
11 | /* BB_AUDIT GNU defects - unsupported long options. */ | 11 | /* BB_AUDIT GNU defects - unsupported long options. */ |
12 | /* http://www.opengroup.org/onlinepubs/007904975/utilities/chgrp.html */ | 12 | /* http://www.opengroup.org/onlinepubs/007904975/utilities/chgrp.html */ |
13 | 13 | ||
14 | //usage:#define chgrp_trivial_usage | ||
15 | //usage: "[-RhLHP"IF_DESKTOP("cvf")"]... GROUP FILE..." | ||
16 | //usage:#define chgrp_full_usage "\n\n" | ||
17 | //usage: "Change the group membership of each FILE to GROUP\n" | ||
18 | //usage: "\nOptions:" | ||
19 | //usage: "\n -R Recurse" | ||
20 | //usage: "\n -h Affect symlinks instead of symlink targets" | ||
21 | //usage: "\n -L Traverse all symlinks to directories" | ||
22 | //usage: "\n -H Traverse symlinks on command line only" | ||
23 | //usage: "\n -P Don't traverse symlinks (default)" | ||
24 | //usage: IF_DESKTOP( | ||
25 | //usage: "\n -c List changed files" | ||
26 | //usage: "\n -v Verbose" | ||
27 | //usage: "\n -f Hide errors" | ||
28 | //usage: ) | ||
29 | //usage: | ||
30 | //usage:#define chgrp_example_usage | ||
31 | //usage: "$ ls -l /tmp/foo\n" | ||
32 | //usage: "-r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo\n" | ||
33 | //usage: "$ chgrp root /tmp/foo\n" | ||
34 | //usage: "$ ls -l /tmp/foo\n" | ||
35 | //usage: "-r--r--r-- 1 andersen root 0 Apr 12 18:25 /tmp/foo\n" | ||
36 | |||
14 | #include "libbb.h" | 37 | #include "libbb.h" |
15 | 38 | ||
16 | /* This is a NOEXEC applet. Be very careful! */ | 39 | /* 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 @@ | |||
14 | /* BB_AUDIT GNU defects - unsupported long options. */ | 14 | /* BB_AUDIT GNU defects - unsupported long options. */ |
15 | /* http://www.opengroup.org/onlinepubs/007904975/utilities/chmod.html */ | 15 | /* http://www.opengroup.org/onlinepubs/007904975/utilities/chmod.html */ |
16 | 16 | ||
17 | //usage:#define chmod_trivial_usage | ||
18 | //usage: "[-R"IF_DESKTOP("cvf")"] MODE[,MODE]... FILE..." | ||
19 | //usage:#define chmod_full_usage "\n\n" | ||
20 | //usage: "Each MODE is one or more of the letters ugoa, one of the\n" | ||
21 | //usage: "symbols +-= and one or more of the letters rwxst\n" | ||
22 | //usage: "\nOptions:" | ||
23 | //usage: "\n -R Recurse" | ||
24 | //usage: IF_DESKTOP( | ||
25 | //usage: "\n -c List changed files" | ||
26 | //usage: "\n -v List all files" | ||
27 | //usage: "\n -f Hide errors" | ||
28 | //usage: ) | ||
29 | //usage: | ||
30 | //usage:#define chmod_example_usage | ||
31 | //usage: "$ ls -l /tmp/foo\n" | ||
32 | //usage: "-rw-rw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n" | ||
33 | //usage: "$ chmod u+x /tmp/foo\n" | ||
34 | //usage: "$ ls -l /tmp/foo\n" | ||
35 | //usage: "-rwxrw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo*\n" | ||
36 | //usage: "$ chmod 444 /tmp/foo\n" | ||
37 | //usage: "$ ls -l /tmp/foo\n" | ||
38 | //usage: "-r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n" | ||
39 | |||
17 | #include "libbb.h" | 40 | #include "libbb.h" |
18 | 41 | ||
19 | /* This is a NOEXEC applet. Be very careful! */ | 42 | /* 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 @@ | |||
10 | /* BB_AUDIT SUSv3 defects - none? */ | 10 | /* BB_AUDIT SUSv3 defects - none? */ |
11 | /* http://www.opengroup.org/onlinepubs/007904975/utilities/chown.html */ | 11 | /* http://www.opengroup.org/onlinepubs/007904975/utilities/chown.html */ |
12 | 12 | ||
13 | //usage:#define chown_trivial_usage | ||
14 | //usage: "[-RhLHP"IF_DESKTOP("cvf")"]... OWNER[<.|:>[GROUP]] FILE..." | ||
15 | //usage:#define chown_full_usage "\n\n" | ||
16 | //usage: "Change the owner and/or group of each FILE to OWNER and/or GROUP\n" | ||
17 | //usage: "\nOptions:" | ||
18 | //usage: "\n -R Recurse" | ||
19 | //usage: "\n -h Affect symlinks instead of symlink targets" | ||
20 | //usage: "\n -L Traverse all symlinks to directories" | ||
21 | //usage: "\n -H Traverse symlinks on command line only" | ||
22 | //usage: "\n -P Don't traverse symlinks (default)" | ||
23 | //usage: IF_DESKTOP( | ||
24 | //usage: "\n -c List changed files" | ||
25 | //usage: "\n -v List all files" | ||
26 | //usage: "\n -f Hide errors" | ||
27 | //usage: ) | ||
28 | //usage: | ||
29 | //usage:#define chown_example_usage | ||
30 | //usage: "$ ls -l /tmp/foo\n" | ||
31 | //usage: "-r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo\n" | ||
32 | //usage: "$ chown root /tmp/foo\n" | ||
33 | //usage: "$ ls -l /tmp/foo\n" | ||
34 | //usage: "-r--r--r-- 1 root andersen 0 Apr 12 18:25 /tmp/foo\n" | ||
35 | //usage: "$ chown root.root /tmp/foo\n" | ||
36 | //usage: "ls -l /tmp/foo\n" | ||
37 | //usage: "-r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n" | ||
38 | |||
13 | #include "libbb.h" | 39 | #include "libbb.h" |
14 | 40 | ||
15 | /* This is a NOEXEC applet. Be very careful! */ | 41 | /* 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 @@ | |||
9 | 9 | ||
10 | /* BB_AUDIT SUSv3 N/A -- Matches GNU behavior. */ | 10 | /* BB_AUDIT SUSv3 N/A -- Matches GNU behavior. */ |
11 | 11 | ||
12 | //usage:#define chroot_trivial_usage | ||
13 | //usage: "NEWROOT [PROG ARGS]" | ||
14 | //usage:#define chroot_full_usage "\n\n" | ||
15 | //usage: "Run PROG with root directory set to NEWROOT" | ||
16 | //usage: | ||
17 | //usage:#define chroot_example_usage | ||
18 | //usage: "$ ls -l /bin/ls\n" | ||
19 | //usage: "lrwxrwxrwx 1 root root 12 Apr 13 00:46 /bin/ls -> /BusyBox\n" | ||
20 | //usage: "# mount /dev/hdc1 /mnt -t minix\n" | ||
21 | //usage: "# chroot /mnt\n" | ||
22 | //usage: "# ls -l /bin/ls\n" | ||
23 | //usage: "-rwxr-xr-x 1 root root 40816 Feb 5 07:45 /bin/ls*\n" | ||
24 | |||
12 | #include "libbb.h" | 25 | #include "libbb.h" |
13 | 26 | ||
14 | int chroot_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 27 | 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 @@ | |||
6 | * | 6 | * |
7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
8 | */ | 8 | */ |
9 | |||
10 | //usage:#define cksum_trivial_usage | ||
11 | //usage: "FILES..." | ||
12 | //usage:#define cksum_full_usage "\n\n" | ||
13 | //usage: "Calculate the CRC32 checksums of FILES" | ||
14 | |||
9 | #include "libbb.h" | 15 | #include "libbb.h" |
10 | 16 | ||
11 | /* This is a NOEXEC applet. Be very careful! */ | 17 | /* 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 @@ | |||
7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | //usage:#define comm_trivial_usage | ||
11 | //usage: "[-123] FILE1 FILE2" | ||
12 | //usage:#define comm_full_usage "\n\n" | ||
13 | //usage: "Compare FILE1 with FILE2\n" | ||
14 | //usage: "\nOptions:" | ||
15 | //usage: "\n -1 Suppress lines unique to FILE1" | ||
16 | //usage: "\n -2 Suppress lines unique to FILE2" | ||
17 | //usage: "\n -3 Suppress lines common to both files" | ||
18 | |||
10 | #include "libbb.h" | 19 | #include "libbb.h" |
11 | 20 | ||
12 | #define COMM_OPT_1 (1 << 0) | 21 | #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 @@ | |||
15 | * Size reduction. | 15 | * Size reduction. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | //usage:#define cp_trivial_usage | ||
19 | //usage: "[OPTIONS] SOURCE DEST" | ||
20 | //usage:#define cp_full_usage "\n\n" | ||
21 | //usage: "Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY\n" | ||
22 | //usage: "\nOptions:" | ||
23 | //usage: "\n -a Same as -dpR" | ||
24 | //usage: IF_SELINUX( | ||
25 | //usage: "\n -c Preserve security context" | ||
26 | //usage: ) | ||
27 | //usage: "\n -R,-r Recurse" | ||
28 | //usage: "\n -d,-P Preserve symlinks (default if -R)" | ||
29 | //usage: "\n -L Follow all symlinks" | ||
30 | //usage: "\n -H Follow symlinks on command line" | ||
31 | //usage: "\n -p Preserve file attributes if possible" | ||
32 | //usage: "\n -f Overwrite" | ||
33 | //usage: "\n -i Prompt before overwrite" | ||
34 | //usage: "\n -l,-s Create (sym)links" | ||
35 | |||
18 | #include "libbb.h" | 36 | #include "libbb.h" |
19 | #include "libcoreutils/coreutils.h" | 37 | #include "libcoreutils/coreutils.h" |
20 | 38 | ||
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 @@ | |||
9 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 9 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | //usage:#define cut_trivial_usage | ||
13 | //usage: "[OPTIONS] [FILE]..." | ||
14 | //usage:#define cut_full_usage "\n\n" | ||
15 | //usage: "Print selected fields from each input FILE to stdout\n" | ||
16 | //usage: "\nOptions:" | ||
17 | //usage: "\n -b LIST Output only bytes from LIST" | ||
18 | //usage: "\n -c LIST Output only characters from LIST" | ||
19 | //usage: "\n -d CHAR Use CHAR instead of tab as the field delimiter" | ||
20 | //usage: "\n -s Output only the lines containing delimiter" | ||
21 | //usage: "\n -f N Print only these fields" | ||
22 | //usage: "\n -n Ignored" | ||
23 | //usage: | ||
24 | //usage:#define cut_example_usage | ||
25 | //usage: "$ echo \"Hello world\" | cut -f 1 -d ' '\n" | ||
26 | //usage: "Hello\n" | ||
27 | //usage: "$ echo \"Hello world\" | cut -f 2 -d ' '\n" | ||
28 | //usage: "world\n" | ||
29 | |||
12 | #include "libbb.h" | 30 | #include "libbb.h" |
13 | 31 | ||
14 | /* This is a NOEXEC applet. Be very careful! */ | 32 | /* 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 @@ | |||
8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | //usage:#define dd_trivial_usage | ||
12 | //usage: "[if=FILE] [of=FILE] " IF_FEATURE_DD_IBS_OBS("[ibs=N] [obs=N] ") "[bs=N] [count=N] [skip=N]\n" | ||
13 | //usage: " [seek=N]" IF_FEATURE_DD_IBS_OBS(" [conv=notrunc|noerror|sync|fsync]") | ||
14 | //usage:#define dd_full_usage "\n\n" | ||
15 | //usage: "Copy a file with converting and formatting\n" | ||
16 | //usage: "\nOptions:" | ||
17 | //usage: "\n if=FILE Read from FILE instead of stdin" | ||
18 | //usage: "\n of=FILE Write to FILE instead of stdout" | ||
19 | //usage: "\n bs=N Read and write N bytes at a time" | ||
20 | //usage: IF_FEATURE_DD_IBS_OBS( | ||
21 | //usage: "\n ibs=N Read N bytes at a time" | ||
22 | //usage: ) | ||
23 | //usage: IF_FEATURE_DD_IBS_OBS( | ||
24 | //usage: "\n obs=N Write N bytes at a time" | ||
25 | //usage: ) | ||
26 | //usage: "\n count=N Copy only N input blocks" | ||
27 | //usage: "\n skip=N Skip N input blocks" | ||
28 | //usage: "\n seek=N Skip N output blocks" | ||
29 | //usage: IF_FEATURE_DD_IBS_OBS( | ||
30 | //usage: "\n conv=notrunc Don't truncate output file" | ||
31 | //usage: "\n conv=noerror Continue after read errors" | ||
32 | //usage: "\n conv=sync Pad blocks with zeros" | ||
33 | //usage: "\n conv=fsync Physically write data out before finishing" | ||
34 | //usage: ) | ||
35 | //usage: "\n" | ||
36 | //usage: "\nNumbers may be suffixed by c (x1), w (x2), b (x512), kD (x1000), k (x1024)," | ||
37 | //usage: "\nMD (x1000000), M (x1048576), GD (x1000000000) or G (x1073741824)" | ||
38 | //usage: | ||
39 | //usage:#define dd_example_usage | ||
40 | //usage: "$ dd if=/dev/zero of=/dev/ram1 bs=1M count=4\n" | ||
41 | //usage: "4+0 records in\n" | ||
42 | //usage: "4+0 records out\n" | ||
43 | |||
11 | #include "libbb.h" | 44 | #include "libbb.h" |
12 | 45 | ||
13 | /* This is a NOEXEC applet. Be very careful! */ | 46 | /* 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 @@ | |||
22 | * Implement -P and -B; better coreutils compat; cleanup | 22 | * Implement -P and -B; better coreutils compat; cleanup |
23 | */ | 23 | */ |
24 | 24 | ||
25 | //usage:#define df_trivial_usage | ||
26 | //usage: "[-Pk" | ||
27 | //usage: IF_FEATURE_HUMAN_READABLE("mh") | ||
28 | //usage: IF_FEATURE_DF_FANCY("ai] [-B SIZE") | ||
29 | //usage: "] [FILESYSTEM]..." | ||
30 | //usage:#define df_full_usage "\n\n" | ||
31 | //usage: "Print filesystem usage statistics\n" | ||
32 | //usage: "\nOptions:" | ||
33 | //usage: "\n -P POSIX output format" | ||
34 | //usage: "\n -k 1024-byte blocks (default)" | ||
35 | //usage: IF_FEATURE_HUMAN_READABLE( | ||
36 | //usage: "\n -m 1M-byte blocks" | ||
37 | //usage: "\n -h Human readable (e.g. 1K 243M 2G)" | ||
38 | //usage: ) | ||
39 | //usage: IF_FEATURE_DF_FANCY( | ||
40 | //usage: "\n -a Show all filesystems" | ||
41 | //usage: "\n -i Inodes" | ||
42 | //usage: "\n -B SIZE Blocksize" | ||
43 | //usage: ) | ||
44 | //usage: | ||
45 | //usage:#define df_example_usage | ||
46 | //usage: "$ df\n" | ||
47 | //usage: "Filesystem 1K-blocks Used Available Use% Mounted on\n" | ||
48 | //usage: "/dev/sda3 8690864 8553540 137324 98% /\n" | ||
49 | //usage: "/dev/sda1 64216 36364 27852 57% /boot\n" | ||
50 | //usage: "$ df /dev/sda3\n" | ||
51 | //usage: "Filesystem 1K-blocks Used Available Use% Mounted on\n" | ||
52 | //usage: "/dev/sda3 8690864 8553540 137324 98% /\n" | ||
53 | //usage: "$ POSIXLY_CORRECT=sure df /dev/sda3\n" | ||
54 | //usage: "Filesystem 512B-blocks Used Available Use% Mounted on\n" | ||
55 | //usage: "/dev/sda3 17381728 17107080 274648 98% /\n" | ||
56 | //usage: "$ POSIXLY_CORRECT=yep df -P /dev/sda3\n" | ||
57 | //usage: "Filesystem 512-blocks Used Available Capacity Mounted on\n" | ||
58 | //usage: "/dev/sda3 17381728 17107080 274648 98% /\n" | ||
59 | |||
25 | #include <mntent.h> | 60 | #include <mntent.h> |
26 | #include <sys/vfs.h> | 61 | #include <sys/vfs.h> |
27 | #include "libbb.h" | 62 | #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 @@ | |||
10 | /* BB_AUDIT SUSv3 compliant */ | 10 | /* BB_AUDIT SUSv3 compliant */ |
11 | /* http://www.opengroup.org/onlinepubs/007904975/utilities/dirname.html */ | 11 | /* http://www.opengroup.org/onlinepubs/007904975/utilities/dirname.html */ |
12 | 12 | ||
13 | //usage:#define dirname_trivial_usage | ||
14 | //usage: "FILENAME" | ||
15 | //usage:#define dirname_full_usage "\n\n" | ||
16 | //usage: "Strip non-directory suffix from FILENAME" | ||
17 | //usage: | ||
18 | //usage:#define dirname_example_usage | ||
19 | //usage: "$ dirname /tmp/foo\n" | ||
20 | //usage: "/tmp\n" | ||
21 | //usage: "$ dirname /tmp/foo/\n" | ||
22 | //usage: "/tmp\n" | ||
23 | |||
13 | #include "libbb.h" | 24 | #include "libbb.h" |
14 | 25 | ||
15 | /* This is a NOFORK applet. Be very careful! */ | 26 | /* 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 @@ | |||
12 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 12 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | //usage:#define dos2unix_trivial_usage | ||
16 | //usage: "[-ud] [FILE]" | ||
17 | //usage:#define dos2unix_full_usage "\n\n" | ||
18 | //usage: "Convert FILE in-place from DOS to Unix format.\n" | ||
19 | //usage: "When no file is given, use stdin/stdout.\n" | ||
20 | //usage: "\nOptions:" | ||
21 | //usage: "\n -u dos2unix" | ||
22 | //usage: "\n -d unix2dos" | ||
23 | //usage: | ||
24 | //usage:#define unix2dos_trivial_usage | ||
25 | //usage: "[-ud] [FILE]" | ||
26 | //usage:#define unix2dos_full_usage "\n\n" | ||
27 | //usage: "Convert FILE in-place from Unix to DOS format.\n" | ||
28 | //usage: "When no file is given, use stdin/stdout.\n" | ||
29 | //usage: "\nOptions:" | ||
30 | //usage: "\n -u dos2unix" | ||
31 | //usage: "\n -d unix2dos" | ||
32 | |||
15 | #include "libbb.h" | 33 | #include "libbb.h" |
16 | 34 | ||
17 | /* This is a NOEXEC applet. Be very careful! */ | 35 | /* 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 @@ | |||
23 | * 4) Fixed busybox bug #1284 involving long overflow with human_readable. | 23 | * 4) Fixed busybox bug #1284 involving long overflow with human_readable. |
24 | */ | 24 | */ |
25 | 25 | ||
26 | //usage:#define du_trivial_usage | ||
27 | //usage: "[-aHLdclsx" IF_FEATURE_HUMAN_READABLE("hm") "k] [FILE]..." | ||
28 | //usage:#define du_full_usage "\n\n" | ||
29 | //usage: "Summarize disk space used for each FILE and/or directory.\n" | ||
30 | //usage: "Disk space is printed in units of " | ||
31 | //usage: IF_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("1024") | ||
32 | //usage: IF_NOT_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("512") | ||
33 | //usage: " bytes.\n" | ||
34 | //usage: "\nOptions:" | ||
35 | //usage: "\n -a Show file sizes too" | ||
36 | //usage: "\n -L Follow all symlinks" | ||
37 | //usage: "\n -H Follow symlinks on command line" | ||
38 | //usage: "\n -d N Limit output to directories (and files with -a) of depth < N" | ||
39 | //usage: "\n -c Show grand total" | ||
40 | //usage: "\n -l Count sizes many times if hard linked" | ||
41 | //usage: "\n -s Display only a total for each argument" | ||
42 | //usage: "\n -x Skip directories on different filesystems" | ||
43 | //usage: IF_FEATURE_HUMAN_READABLE( | ||
44 | //usage: "\n -h Sizes in human readable format (e.g., 1K 243M 2G )" | ||
45 | //usage: "\n -m Sizes in megabytes" | ||
46 | //usage: ) | ||
47 | //usage: "\n -k Sizes in kilobytes" | ||
48 | //usage: IF_FEATURE_DU_DEFAULT_BLOCKSIZE_1K(" (default)") | ||
49 | //usage: | ||
50 | //usage:#define du_example_usage | ||
51 | //usage: "$ du\n" | ||
52 | //usage: "16 ./CVS\n" | ||
53 | //usage: "12 ./kernel-patches/CVS\n" | ||
54 | //usage: "80 ./kernel-patches\n" | ||
55 | //usage: "12 ./tests/CVS\n" | ||
56 | //usage: "36 ./tests\n" | ||
57 | //usage: "12 ./scripts/CVS\n" | ||
58 | //usage: "16 ./scripts\n" | ||
59 | //usage: "12 ./docs/CVS\n" | ||
60 | //usage: "104 ./docs\n" | ||
61 | //usage: "2417 .\n" | ||
62 | |||
26 | #include "libbb.h" | 63 | #include "libbb.h" |
27 | 64 | ||
28 | enum { | 65 | 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 @@ | |||
23 | * The previous version did not allow 4-digit octals. | 23 | * The previous version did not allow 4-digit octals. |
24 | */ | 24 | */ |
25 | 25 | ||
26 | //usage:#define echo_trivial_usage | ||
27 | //usage: IF_FEATURE_FANCY_ECHO("[-neE] ") "[ARG]..." | ||
28 | //usage:#define echo_full_usage "\n\n" | ||
29 | //usage: "Print the specified ARGs to stdout" | ||
30 | //usage: IF_FEATURE_FANCY_ECHO( "\n" | ||
31 | //usage: "\nOptions:" | ||
32 | //usage: "\n -n Suppress trailing newline" | ||
33 | //usage: "\n -e Interpret backslash escapes (i.e., \\t=tab)" | ||
34 | //usage: "\n -E Don't interpret backslash escapes (default)" | ||
35 | //usage: ) | ||
36 | //usage: | ||
37 | //usage:#define echo_example_usage | ||
38 | //usage: "$ echo \"Erik is cool\"\n" | ||
39 | //usage: "Erik is cool\n" | ||
40 | //usage: IF_FEATURE_FANCY_ECHO("$ echo -e \"Erik\\nis\\ncool\"\n" | ||
41 | //usage: "Erik\n" | ||
42 | //usage: "is\n" | ||
43 | //usage: "cool\n" | ||
44 | //usage: "$ echo \"Erik\\nis\\ncool\"\n" | ||
45 | //usage: "Erik\\nis\\ncool\n") | ||
46 | |||
26 | #include "libbb.h" | 47 | #include "libbb.h" |
27 | 48 | ||
28 | /* This is a NOFORK applet. Be very careful! */ | 49 | /* 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 @@ | |||
31 | 31 | ||
32 | /* This is a NOEXEC applet. Be very careful! */ | 32 | /* This is a NOEXEC applet. Be very careful! */ |
33 | 33 | ||
34 | //usage:#define env_trivial_usage | ||
35 | //usage: "[-iu] [-] [name=value]... [PROG ARGS]" | ||
36 | //usage:#define env_full_usage "\n\n" | ||
37 | //usage: "Print the current environment or run PROG after setting up\n" | ||
38 | //usage: "the specified environment\n" | ||
39 | //usage: "\nOptions:" | ||
40 | //usage: "\n -, -i Start with an empty environment" | ||
41 | //usage: "\n -u Remove variable from the environment" | ||
42 | |||
34 | #include "libbb.h" | 43 | #include "libbb.h" |
35 | 44 | ||
36 | #if ENABLE_FEATURE_ENV_LONG_OPTIONS | 45 | #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 @@ | |||
20 | * | 20 | * |
21 | * Caveat: this versions of expand and unexpand don't accept tab lists. | 21 | * Caveat: this versions of expand and unexpand don't accept tab lists. |
22 | */ | 22 | */ |
23 | |||
24 | //usage:#define expand_trivial_usage | ||
25 | //usage: "[-i] [-t N] [FILE]..." | ||
26 | //usage:#define expand_full_usage "\n\n" | ||
27 | //usage: "Convert tabs to spaces, writing to stdout\n" | ||
28 | //usage: "\nOptions:" | ||
29 | //usage: IF_FEATURE_EXPAND_LONG_OPTIONS( | ||
30 | //usage: "\n -i,--initial Don't convert tabs after non blanks" | ||
31 | //usage: "\n -t,--tabs=N Tabstops every N chars" | ||
32 | //usage: ) | ||
33 | //usage: IF_NOT_FEATURE_EXPAND_LONG_OPTIONS( | ||
34 | //usage: "\n -i Don't convert tabs after non blanks" | ||
35 | //usage: "\n -t Tabstops every N chars" | ||
36 | //usage: ) | ||
37 | |||
38 | //usage:#define unexpand_trivial_usage | ||
39 | //usage: "[-fa][-t N] [FILE]..." | ||
40 | //usage:#define unexpand_full_usage "\n\n" | ||
41 | //usage: "Convert spaces to tabs, writing to stdout\n" | ||
42 | //usage: "\nOptions:" | ||
43 | //usage: IF_FEATURE_UNEXPAND_LONG_OPTIONS( | ||
44 | //usage: "\n -a,--all Convert all blanks" | ||
45 | //usage: "\n -f,--first-only Convert only leading blanks" | ||
46 | //usage: "\n -t,--tabs=N Tabstops every N chars" | ||
47 | //usage: ) | ||
48 | //usage: IF_NOT_FEATURE_UNEXPAND_LONG_OPTIONS( | ||
49 | //usage: "\n -a Convert all blanks" | ||
50 | //usage: "\n -f Convert only leading blanks" | ||
51 | //usage: "\n -t N Tabstops every N chars" | ||
52 | //usage: ) | ||
53 | |||
23 | #include "libbb.h" | 54 | #include "libbb.h" |
24 | #include "unicode.h" | 55 | #include "unicode.h" |
25 | 56 | ||
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 @@ | |||
25 | 25 | ||
26 | /* no getopt needed */ | 26 | /* no getopt needed */ |
27 | 27 | ||
28 | //usage:#define expr_trivial_usage | ||
29 | //usage: "EXPRESSION" | ||
30 | //usage:#define expr_full_usage "\n\n" | ||
31 | //usage: "Print the value of EXPRESSION to stdout\n" | ||
32 | //usage: "\n" | ||
33 | //usage: "EXPRESSION may be:\n" | ||
34 | //usage: " ARG1 | ARG2 ARG1 if it is neither null nor 0, otherwise ARG2\n" | ||
35 | //usage: " ARG1 & ARG2 ARG1 if neither argument is null or 0, otherwise 0\n" | ||
36 | //usage: " ARG1 < ARG2 1 if ARG1 is less than ARG2, else 0. Similarly:\n" | ||
37 | //usage: " ARG1 <= ARG2\n" | ||
38 | //usage: " ARG1 = ARG2\n" | ||
39 | //usage: " ARG1 != ARG2\n" | ||
40 | //usage: " ARG1 >= ARG2\n" | ||
41 | //usage: " ARG1 > ARG2\n" | ||
42 | //usage: " ARG1 + ARG2 Sum of ARG1 and ARG2. Similarly:\n" | ||
43 | //usage: " ARG1 - ARG2\n" | ||
44 | //usage: " ARG1 * ARG2\n" | ||
45 | //usage: " ARG1 / ARG2\n" | ||
46 | //usage: " ARG1 % ARG2\n" | ||
47 | //usage: " STRING : REGEXP Anchored pattern match of REGEXP in STRING\n" | ||
48 | //usage: " match STRING REGEXP Same as STRING : REGEXP\n" | ||
49 | //usage: " substr STRING POS LENGTH Substring of STRING, POS counted from 1\n" | ||
50 | //usage: " index STRING CHARS Index in STRING where any CHARS is found, or 0\n" | ||
51 | //usage: " length STRING Length of STRING\n" | ||
52 | //usage: " quote TOKEN Interpret TOKEN as a string, even if\n" | ||
53 | //usage: " it is a keyword like 'match' or an\n" | ||
54 | //usage: " operator like '/'\n" | ||
55 | //usage: " (EXPRESSION) Value of EXPRESSION\n" | ||
56 | //usage: "\n" | ||
57 | //usage: "Beware that many operators need to be escaped or quoted for shells.\n" | ||
58 | //usage: "Comparisons are arithmetic if both ARGs are numbers, else\n" | ||
59 | //usage: "lexicographical. Pattern matches return the string matched between\n" | ||
60 | //usage: "\\( and \\) or null; if \\( and \\) are not used, they return the number\n" | ||
61 | //usage: "of characters matched or 0." | ||
62 | |||
28 | #include "libbb.h" | 63 | #include "libbb.h" |
29 | #include "xregex.h" | 64 | #include "xregex.h" |
30 | 65 | ||
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 @@ | |||
10 | /* BB_AUDIT SUSv3 compliant */ | 10 | /* BB_AUDIT SUSv3 compliant */ |
11 | /* http://www.opengroup.org/onlinepubs/000095399/utilities/false.html */ | 11 | /* http://www.opengroup.org/onlinepubs/000095399/utilities/false.html */ |
12 | 12 | ||
13 | //usage:#define false_trivial_usage | ||
14 | //usage: "" | ||
15 | //usage:#define false_full_usage "\n\n" | ||
16 | //usage: "Return an exit code of FALSE (1)" | ||
17 | //usage: | ||
18 | //usage:#define false_example_usage | ||
19 | //usage: "$ false\n" | ||
20 | //usage: "$ echo $?\n" | ||
21 | //usage: "1\n" | ||
22 | |||
13 | #include "libbb.h" | 23 | #include "libbb.h" |
14 | 24 | ||
15 | /* This is a NOFORK applet. Be very careful! */ | 25 | /* 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 @@ | |||
9 | 9 | ||
10 | Licensed under GPLv2 or later, see file LICENSE in this source tree. | 10 | Licensed under GPLv2 or later, see file LICENSE in this source tree. |
11 | */ | 11 | */ |
12 | |||
13 | //usage:#define fold_trivial_usage | ||
14 | //usage: "[-bs] [-w WIDTH] [FILE]..." | ||
15 | //usage:#define fold_full_usage "\n\n" | ||
16 | //usage: "Wrap input lines in each FILE (or stdin), writing to stdout\n" | ||
17 | //usage: "\nOptions:" | ||
18 | //usage: "\n -b Count bytes rather than columns" | ||
19 | //usage: "\n -s Break at spaces" | ||
20 | //usage: "\n -w Use WIDTH columns instead of 80" | ||
21 | |||
12 | #include "libbb.h" | 22 | #include "libbb.h" |
13 | #include "unicode.h" | 23 | #include "unicode.h" |
14 | 24 | ||
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 @@ | |||
6 | * | 6 | * |
7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
8 | */ | 8 | */ |
9 | |||
10 | //usage:#define fsync_trivial_usage | ||
11 | //usage: "[-d] FILE..." | ||
12 | //usage:#define fsync_full_usage "\n\n" | ||
13 | //usage: "Write files' buffered blocks to disk\n" | ||
14 | //usage: "\nOptions:" | ||
15 | //usage: "\n -d Avoid syncing metadata" | ||
16 | |||
9 | #include "libbb.h" | 17 | #include "libbb.h" |
10 | #ifndef O_NOATIME | 18 | #ifndef O_NOATIME |
11 | # define O_NOATIME 0 | 19 | # 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 @@ | |||
11 | /* BB_AUDIT GNU compatible -c, -q, and -v options in 'fancy' configuration. */ | 11 | /* BB_AUDIT GNU compatible -c, -q, and -v options in 'fancy' configuration. */ |
12 | /* http://www.opengroup.org/onlinepubs/007904975/utilities/head.html */ | 12 | /* http://www.opengroup.org/onlinepubs/007904975/utilities/head.html */ |
13 | 13 | ||
14 | //usage:#define head_trivial_usage | ||
15 | //usage: "[OPTIONS] [FILE]..." | ||
16 | //usage:#define head_full_usage "\n\n" | ||
17 | //usage: "Print first 10 lines of each FILE (or stdin) to stdout.\n" | ||
18 | //usage: "With more than one FILE, precede each with a filename header.\n" | ||
19 | //usage: "\nOptions:" | ||
20 | //usage: "\n -n N[kbm] Print first N lines" | ||
21 | //usage: IF_FEATURE_FANCY_HEAD( | ||
22 | //usage: "\n -c N[kbm] Print first N bytes" | ||
23 | //usage: "\n -q Never print headers" | ||
24 | //usage: "\n -v Always print headers" | ||
25 | //usage: ) | ||
26 | //usage: "\n" | ||
27 | //usage: "\nN may be suffixed by k (x1024), b (x512), or m (x1024^2)." | ||
28 | //usage: | ||
29 | //usage:#define head_example_usage | ||
30 | //usage: "$ head -n 2 /etc/passwd\n" | ||
31 | //usage: "root:x:0:0:root:/root:/bin/bash\n" | ||
32 | //usage: "daemon:x:1:1:daemon:/usr/sbin:/bin/sh\n" | ||
33 | |||
14 | #include "libbb.h" | 34 | #include "libbb.h" |
15 | 35 | ||
16 | /* This is a NOEXEC applet. Be very careful! */ | 36 | /* 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 @@ | |||
9 | 9 | ||
10 | /* BB_AUDIT SUSv3 N/A -- Matches GNU behavior. */ | 10 | /* BB_AUDIT SUSv3 N/A -- Matches GNU behavior. */ |
11 | 11 | ||
12 | //usage:#define hostid_trivial_usage | ||
13 | //usage: "" | ||
14 | //usage:#define hostid_full_usage "\n\n" | ||
15 | //usage: "Print out a unique 32-bit identifier for the machine" | ||
16 | |||
12 | #include "libbb.h" | 17 | #include "libbb.h" |
13 | 18 | ||
14 | /* This is a NOFORK applet. Be very careful! */ | 19 | /* 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 @@ | |||
15 | * Added -G option Tito Ragusa (C) 2008 for SUSv3. | 15 | * Added -G option Tito Ragusa (C) 2008 for SUSv3. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | //usage:#define id_trivial_usage | ||
19 | //usage: "[OPTIONS] [USER]" | ||
20 | //usage:#define id_full_usage "\n\n" | ||
21 | //usage: "Print information about USER or the current user\n" | ||
22 | //usage: "\nOptions:" | ||
23 | //usage: IF_SELINUX( | ||
24 | //usage: "\n -Z Security context" | ||
25 | //usage: ) | ||
26 | //usage: "\n -u User ID" | ||
27 | //usage: "\n -g Group ID" | ||
28 | //usage: "\n -G Supplementary group IDs" | ||
29 | //usage: "\n -n Print names instead of numbers" | ||
30 | //usage: "\n -r Print real ID instead of effective ID" | ||
31 | //usage: | ||
32 | //usage:#define id_example_usage | ||
33 | //usage: "$ id\n" | ||
34 | //usage: "uid=1000(andersen) gid=1000(andersen)\n" | ||
35 | |||
18 | #include "libbb.h" | 36 | #include "libbb.h" |
19 | 37 | ||
20 | /* This is a NOEXEC applet. Be very careful! */ | 38 | /* 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 @@ | |||
6 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 6 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | /* -v, -b, -c are ignored */ | ||
10 | //usage:#define install_trivial_usage | ||
11 | //usage: "[-cdDsp] [-o USER] [-g GRP] [-m MODE] [SOURCE]... DEST" | ||
12 | //usage:#define install_full_usage "\n\n" | ||
13 | //usage: "Copy files and set attributes\n" | ||
14 | //usage: "\nOptions:" | ||
15 | //usage: "\n -c Just copy (default)" | ||
16 | //usage: "\n -d Create directories" | ||
17 | //usage: "\n -D Create leading target directories" | ||
18 | //usage: "\n -s Strip symbol table" | ||
19 | //usage: "\n -p Preserve date" | ||
20 | //usage: "\n -o USER Set ownership" | ||
21 | //usage: "\n -g GRP Set group ownership" | ||
22 | //usage: "\n -m MODE Set permissions" | ||
23 | //usage: IF_SELINUX( | ||
24 | //usage: "\n -Z Set security context" | ||
25 | //usage: ) | ||
26 | |||
9 | #include "libbb.h" | 27 | #include "libbb.h" |
10 | #include "libcoreutils/coreutils.h" | 28 | #include "libcoreutils/coreutils.h" |
11 | 29 | ||
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 @@ | |||
11 | /* BB_AUDIT GNU options missing: -d, -F, -i, and -v. */ | 11 | /* BB_AUDIT GNU options missing: -d, -F, -i, and -v. */ |
12 | /* http://www.opengroup.org/onlinepubs/007904975/utilities/ln.html */ | 12 | /* http://www.opengroup.org/onlinepubs/007904975/utilities/ln.html */ |
13 | 13 | ||
14 | //usage:#define ln_trivial_usage | ||
15 | //usage: "[OPTIONS] TARGET... LINK|DIR" | ||
16 | //usage:#define ln_full_usage "\n\n" | ||
17 | //usage: "Create a link LINK or DIR/TARGET to the specified TARGET(s)\n" | ||
18 | //usage: "\nOptions:" | ||
19 | //usage: "\n -s Make symlinks instead of hardlinks" | ||
20 | //usage: "\n -f Remove existing destinations" | ||
21 | //usage: "\n -n Don't dereference symlinks - treat like normal file" | ||
22 | //usage: "\n -b Make a backup of the target (if exists) before link operation" | ||
23 | //usage: "\n -S suf Use suffix instead of ~ when making backup files" | ||
24 | //usage: | ||
25 | //usage:#define ln_example_usage | ||
26 | //usage: "$ ln -s BusyBox /tmp/ls\n" | ||
27 | //usage: "$ ls -l /tmp/ls\n" | ||
28 | //usage: "lrwxrwxrwx 1 root root 7 Apr 12 18:39 ls -> BusyBox*\n" | ||
29 | |||
14 | #include "libbb.h" | 30 | #include "libbb.h" |
15 | 31 | ||
16 | /* This is a NOEXEC applet. Be very careful! */ | 32 | /* 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 @@ | |||
20 | * a diagnostic message and an error return. | 20 | * a diagnostic message and an error return. |
21 | */ | 21 | */ |
22 | 22 | ||
23 | //usage:#define logname_trivial_usage | ||
24 | //usage: "" | ||
25 | //usage:#define logname_full_usage "\n\n" | ||
26 | //usage: "Print the name of the current user" | ||
27 | //usage: | ||
28 | //usage:#define logname_example_usage | ||
29 | //usage: "$ logname\n" | ||
30 | //usage: "root\n" | ||
31 | |||
23 | #include "libbb.h" | 32 | #include "libbb.h" |
24 | 33 | ||
25 | /* This is a NOFORK applet. Be very careful! */ | 34 | /* 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 @@ | |||
6 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 6 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | //usage:#define md5sum_trivial_usage | ||
10 | //usage: "[FILE]..." | ||
11 | //usage: IF_FEATURE_MD5_SHA1_SUM_CHECK("\n or: md5sum -c [-sw] [FILE]") | ||
12 | //usage:#define md5sum_full_usage "\n\n" | ||
13 | //usage: "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " MD5 checksums" | ||
14 | //usage: IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" | ||
15 | //usage: "\nOptions:" | ||
16 | //usage: "\n -c Check sums against given list" | ||
17 | //usage: "\n -s Don't output anything, status code shows success" | ||
18 | //usage: "\n -w Warn about improperly formatted checksum lines" | ||
19 | //usage: ) | ||
20 | //usage: | ||
21 | //usage:#define md5sum_example_usage | ||
22 | //usage: "$ md5sum < busybox\n" | ||
23 | //usage: "6fd11e98b98a58f64ff3398d7b324003\n" | ||
24 | //usage: "$ md5sum busybox\n" | ||
25 | //usage: "6fd11e98b98a58f64ff3398d7b324003 busybox\n" | ||
26 | //usage: "$ md5sum -c -\n" | ||
27 | //usage: "6fd11e98b98a58f64ff3398d7b324003 busybox\n" | ||
28 | //usage: "busybox: OK\n" | ||
29 | //usage: "^D\n" | ||
30 | //usage: | ||
31 | //usage:#define sha1sum_trivial_usage | ||
32 | //usage: "[FILE]..." | ||
33 | //usage: IF_FEATURE_MD5_SHA1_SUM_CHECK("\n or: sha1sum -c [-sw] [FILE]") | ||
34 | //usage:#define sha1sum_full_usage "\n\n" | ||
35 | //usage: "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA1 checksums" | ||
36 | //usage: IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" | ||
37 | //usage: "\nOptions:" | ||
38 | //usage: "\n -c Check sums against given list" | ||
39 | //usage: "\n -s Don't output anything, status code shows success" | ||
40 | //usage: "\n -w Warn about improperly formatted checksum lines" | ||
41 | //usage: ) | ||
42 | //usage: | ||
43 | //usage:#define sha256sum_trivial_usage | ||
44 | //usage: "[FILE]..." | ||
45 | //usage: IF_FEATURE_MD5_SHA1_SUM_CHECK("\n or: sha256sum -c [-sw] [FILE]") | ||
46 | //usage:#define sha256sum_full_usage "\n\n" | ||
47 | //usage: "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA256 checksums" | ||
48 | //usage: IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" | ||
49 | //usage: "\nOptions:" | ||
50 | //usage: "\n -c Check sums against given list" | ||
51 | //usage: "\n -s Don't output anything, status code shows success" | ||
52 | //usage: "\n -w Warn about improperly formatted checksum lines" | ||
53 | //usage: ) | ||
54 | //usage: | ||
55 | //usage:#define sha512sum_trivial_usage | ||
56 | //usage: "[FILE]..." | ||
57 | //usage: IF_FEATURE_MD5_SHA1_SUM_CHECK("\n or: sha512sum -c [-sw] [FILE]") | ||
58 | //usage:#define sha512sum_full_usage "\n\n" | ||
59 | //usage: "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA512 checksums" | ||
60 | //usage: IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" | ||
61 | //usage: "\nOptions:" | ||
62 | //usage: "\n -c Check sums against given list" | ||
63 | //usage: "\n -s Don't output anything, status code shows success" | ||
64 | //usage: "\n -w Warn about improperly formatted checksum lines" | ||
65 | //usage: ) | ||
66 | |||
9 | #include "libbb.h" | 67 | #include "libbb.h" |
10 | 68 | ||
11 | /* This is a NOEXEC applet. Be very careful! */ | 69 | /* 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 @@ | |||
19 | /* Nov 28, 2006 Yoshinori Sato <ysato@users.sourceforge.jp>: Add SELinux Support. | 19 | /* Nov 28, 2006 Yoshinori Sato <ysato@users.sourceforge.jp>: Add SELinux Support. |
20 | */ | 20 | */ |
21 | 21 | ||
22 | //usage:#define mkdir_trivial_usage | ||
23 | //usage: "[OPTIONS] DIRECTORY..." | ||
24 | //usage:#define mkdir_full_usage "\n\n" | ||
25 | //usage: "Create DIRECTORY\n" | ||
26 | //usage: "\nOptions:" | ||
27 | //usage: "\n -m MODE Mode" | ||
28 | //usage: "\n -p No error if exists; make parent directories as needed" | ||
29 | //usage: IF_SELINUX( | ||
30 | //usage: "\n -Z Set security context" | ||
31 | //usage: ) | ||
32 | //usage: | ||
33 | //usage:#define mkdir_example_usage | ||
34 | //usage: "$ mkdir /tmp/foo\n" | ||
35 | //usage: "$ mkdir /tmp/foo\n" | ||
36 | //usage: "/tmp/foo: File exists\n" | ||
37 | //usage: "$ mkdir /tmp/foo/bar/baz\n" | ||
38 | //usage: "/tmp/foo/bar/baz: No such file or directory\n" | ||
39 | //usage: "$ mkdir -p /tmp/foo/bar/baz\n" | ||
40 | |||
22 | #include "libbb.h" | 41 | #include "libbb.h" |
23 | 42 | ||
24 | /* This is a NOFORK applet. Be very careful! */ | 43 | /* 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 @@ | |||
10 | /* BB_AUDIT SUSv3 compliant */ | 10 | /* BB_AUDIT SUSv3 compliant */ |
11 | /* http://www.opengroup.org/onlinepubs/007904975/utilities/mkfifo.html */ | 11 | /* http://www.opengroup.org/onlinepubs/007904975/utilities/mkfifo.html */ |
12 | 12 | ||
13 | //usage:#define mkfifo_trivial_usage | ||
14 | //usage: "[-m MODE] " IF_SELINUX("[-Z] ") "NAME" | ||
15 | //usage:#define mkfifo_full_usage "\n\n" | ||
16 | //usage: "Create named pipe\n" | ||
17 | //usage: "\nOptions:" | ||
18 | //usage: "\n -m MODE Mode (default a=rw)" | ||
19 | //usage: IF_SELINUX( | ||
20 | //usage: "\n -Z Set security context" | ||
21 | //usage: ) | ||
22 | |||
13 | #include "libbb.h" | 23 | #include "libbb.h" |
14 | #include "libcoreutils/coreutils.h" | 24 | #include "libcoreutils/coreutils.h" |
15 | 25 | ||
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 @@ | |||
9 | 9 | ||
10 | /* BB_AUDIT SUSv3 N/A -- Matches GNU behavior. */ | 10 | /* BB_AUDIT SUSv3 N/A -- Matches GNU behavior. */ |
11 | 11 | ||
12 | //usage:#define mknod_trivial_usage | ||
13 | //usage: "[-m MODE] " IF_SELINUX("[-Z] ") "NAME TYPE MAJOR MINOR" | ||
14 | //usage:#define mknod_full_usage "\n\n" | ||
15 | //usage: "Create a special file (block, character, or pipe)\n" | ||
16 | //usage: "\nOptions:" | ||
17 | //usage: "\n -m MODE Creation mode (default a=rw)" | ||
18 | //usage: IF_SELINUX( | ||
19 | //usage: "\n -Z Set security context" | ||
20 | //usage: ) | ||
21 | //usage: "\nTYPE:" | ||
22 | //usage: "\n b Block device" | ||
23 | //usage: "\n c or u Character device" | ||
24 | //usage: "\n p Named pipe (MAJOR and MINOR are ignored)" | ||
25 | //usage: | ||
26 | //usage:#define mknod_example_usage | ||
27 | //usage: "$ mknod /dev/fd0 b 2 0\n" | ||
28 | //usage: "$ mknod -m 644 /tmp/pipe p\n" | ||
29 | |||
12 | #include <sys/sysmacros.h> // For makedev | 30 | #include <sys/sysmacros.h> // For makedev |
13 | 31 | ||
14 | #include "libbb.h" | 32 | #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 @@ | |||
7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | //usage:#define nice_trivial_usage | ||
11 | //usage: "[-n ADJUST] [PROG ARGS]" | ||
12 | //usage:#define nice_full_usage "\n\n" | ||
13 | //usage: "Change scheduling priority, run PROG\n" | ||
14 | //usage: "\nOptions:" | ||
15 | //usage: "\n -n ADJUST Adjust priority by ADJUST" | ||
16 | |||
10 | #include <sys/resource.h> | 17 | #include <sys/resource.h> |
11 | #include "libbb.h" | 18 | #include "libbb.h" |
12 | 19 | ||
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 @@ | |||
10 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 10 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | //usage:#define nohup_trivial_usage | ||
14 | //usage: "PROG ARGS" | ||
15 | //usage:#define nohup_full_usage "\n\n" | ||
16 | //usage: "Run PROG immune to hangups, with output to a non-tty" | ||
17 | //usage: | ||
18 | //usage:#define nohup_example_usage | ||
19 | //usage: "$ nohup make &" | ||
20 | |||
13 | #include "libbb.h" | 21 | #include "libbb.h" |
14 | 22 | ||
15 | /* Compat info: nohup (GNU coreutils 6.8) does this: | 23 | /* 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 @@ | |||
11 | * Original copyright notice is retained at the end of this file. | 11 | * Original copyright notice is retained at the end of this file. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | //usage:#define od_trivial_usage | ||
15 | //usage: "[-aBbcDdeFfHhIiLlOovXx] " IF_DESKTOP("[-t TYPE] ") "[FILE]" | ||
16 | //usage:#define od_full_usage "\n\n" | ||
17 | //usage: "Write an unambiguous representation, octal bytes by default, of FILE\n" | ||
18 | //usage: "(or stdin) to stdout" | ||
14 | 19 | ||
15 | #include "libbb.h" | 20 | #include "libbb.h" |
16 | #if ENABLE_DESKTOP | 21 | #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 @@ | |||
8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | //usage:#define printenv_trivial_usage | ||
12 | //usage: "[VARIABLE]..." | ||
13 | //usage:#define printenv_full_usage "\n\n" | ||
14 | //usage: "Print environment VARIABLEs.\n" | ||
15 | //usage: "If no VARIABLE specified, print all." | ||
16 | |||
11 | #include "libbb.h" | 17 | #include "libbb.h" |
12 | 18 | ||
13 | /* This is a NOFORK applet. Be very careful! */ | 19 | /* 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 @@ | |||
38 | 38 | ||
39 | // 19990508 Busy Boxed! Dave Cinege | 39 | // 19990508 Busy Boxed! Dave Cinege |
40 | 40 | ||
41 | //usage:#define printf_trivial_usage | ||
42 | //usage: "FORMAT [ARGUMENT]..." | ||
43 | //usage:#define printf_full_usage "\n\n" | ||
44 | //usage: "Format and print ARGUMENT(s) according to FORMAT,\n" | ||
45 | //usage: "where FORMAT controls the output exactly as in C printf" | ||
46 | //usage: | ||
47 | //usage:#define printf_example_usage | ||
48 | //usage: "$ printf \"Val=%d\\n\" 5\n" | ||
49 | //usage: "Val=5\n" | ||
50 | |||
41 | #include "libbb.h" | 51 | #include "libbb.h" |
42 | 52 | ||
43 | /* A note on bad input: neither bash 3.2 nor coreutils 6.10 stop on it. | 53 | /* 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 @@ | |||
7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | //usage:#define pwd_trivial_usage | ||
11 | //usage: "" | ||
12 | //usage:#define pwd_full_usage "\n\n" | ||
13 | //usage: "Print the full filename of the current working directory" | ||
14 | //usage: | ||
15 | //usage:#define pwd_example_usage | ||
16 | //usage: "$ pwd\n" | ||
17 | //usage: "/root\n" | ||
18 | |||
10 | #include "libbb.h" | 19 | #include "libbb.h" |
11 | 20 | ||
12 | /* This is a NOFORK applet. Be very careful! */ | 21 | /* 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 @@ | |||
6 | * | 6 | * |
7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
8 | */ | 8 | */ |
9 | |||
10 | //usage:#define readlink_trivial_usage | ||
11 | //usage: IF_FEATURE_READLINK_FOLLOW("[-fnv] ") "FILE" | ||
12 | //usage:#define readlink_full_usage "\n\n" | ||
13 | //usage: "Display the value of a symlink" | ||
14 | //usage: IF_FEATURE_READLINK_FOLLOW( "\n" | ||
15 | //usage: "\nOptions:" | ||
16 | //usage: "\n -f Canonicalize by following all symlinks" | ||
17 | //usage: "\n -n Don't add newline" | ||
18 | //usage: "\n -v Verbose" | ||
19 | //usage: ) | ||
20 | |||
9 | #include "libbb.h" | 21 | #include "libbb.h" |
10 | 22 | ||
11 | /* | 23 | /* |
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 @@ | |||
10 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 10 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | //usage:#define realpath_trivial_usage | ||
14 | //usage: "FILE..." | ||
15 | //usage:#define realpath_full_usage "\n\n" | ||
16 | //usage: "Return the absolute pathnames of given FILE" | ||
17 | |||
13 | #include "libbb.h" | 18 | #include "libbb.h" |
14 | 19 | ||
15 | int realpath_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 20 | 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 @@ | |||
15 | * Size reduction. | 15 | * Size reduction. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | //usage:#define rm_trivial_usage | ||
19 | //usage: "[-irf] FILE..." | ||
20 | //usage:#define rm_full_usage "\n\n" | ||
21 | //usage: "Remove (unlink) FILEs\n" | ||
22 | //usage: "\nOptions:" | ||
23 | //usage: "\n -i Always prompt before removing" | ||
24 | //usage: "\n -f Never prompt" | ||
25 | //usage: "\n -R,-r Recurse" | ||
26 | //usage: | ||
27 | //usage:#define rm_example_usage | ||
28 | //usage: "$ rm -rf /tmp/foo\n" | ||
29 | |||
18 | #include "libbb.h" | 30 | #include "libbb.h" |
19 | 31 | ||
20 | /* This is a NOFORK applet. Be very careful! */ | 32 | /* 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 @@ | |||
10 | /* BB_AUDIT SUSv3 compliant */ | 10 | /* BB_AUDIT SUSv3 compliant */ |
11 | /* http://www.opengroup.org/onlinepubs/007904975/utilities/rmdir.html */ | 11 | /* http://www.opengroup.org/onlinepubs/007904975/utilities/rmdir.html */ |
12 | 12 | ||
13 | //usage:#define rmdir_trivial_usage | ||
14 | //usage: "[OPTIONS] DIRECTORY..." | ||
15 | //usage:#define rmdir_full_usage "\n\n" | ||
16 | //usage: "Remove DIRECTORY if it is empty\n" | ||
17 | //usage: "\nOptions:" | ||
18 | //usage: IF_FEATURE_RMDIR_LONG_OPTIONS( | ||
19 | //usage: "\n -p|--parents Include parents" | ||
20 | //usage: "\n --ignore-fail-on-non-empty" | ||
21 | //usage: ) | ||
22 | //usage: IF_NOT_FEATURE_RMDIR_LONG_OPTIONS( | ||
23 | //usage: "\n -p Include parents" | ||
24 | //usage: ) | ||
25 | //usage: | ||
26 | //usage:#define rmdir_example_usage | ||
27 | //usage: "# rmdir /tmp/foo\n" | ||
28 | |||
13 | #include "libbb.h" | 29 | #include "libbb.h" |
14 | 30 | ||
15 | /* This is a NOFORK applet. Be very careful! */ | 31 | /* 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 @@ | |||
6 | * | 6 | * |
7 | * Licensed under GPLv2, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2, see file LICENSE in this source tree. |
8 | */ | 8 | */ |
9 | |||
10 | //usage:#define seq_trivial_usage | ||
11 | //usage: "[-w] [-s SEP] [FIRST [INC]] LAST" | ||
12 | //usage:#define seq_full_usage "\n\n" | ||
13 | //usage: "Print numbers from FIRST to LAST, in steps of INC.\n" | ||
14 | //usage: "FIRST, INC default to 1.\n" | ||
15 | //usage: "\nOptions:" | ||
16 | //usage: "\n -w Pad to last with leading zeros" | ||
17 | //usage: "\n -s SEP String separator" | ||
18 | |||
9 | #include "libbb.h" | 19 | #include "libbb.h" |
10 | 20 | ||
11 | /* This is a NOFORK applet. Be very careful! */ | 21 | /* 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 @@ | |||
18 | * time suffixes for seconds, minutes, hours, and days. | 18 | * time suffixes for seconds, minutes, hours, and days. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | //usage:#define sleep_trivial_usage | ||
22 | //usage: IF_FEATURE_FANCY_SLEEP("[") "N" IF_FEATURE_FANCY_SLEEP("]...") | ||
23 | //usage:#define sleep_full_usage "\n\n" | ||
24 | //usage: IF_NOT_FEATURE_FANCY_SLEEP("Pause for N seconds") | ||
25 | //usage: IF_FEATURE_FANCY_SLEEP( | ||
26 | //usage: "Pause for a time equal to the total of the args given, where each arg can\n" | ||
27 | //usage: "have an optional suffix of (s)econds, (m)inutes, (h)ours, or (d)ays") | ||
28 | //usage: | ||
29 | //usage:#define sleep_example_usage | ||
30 | //usage: "$ sleep 2\n" | ||
31 | //usage: "[2 second delay results]\n" | ||
32 | //usage: IF_FEATURE_FANCY_SLEEP( | ||
33 | //usage: "$ sleep 1d 3h 22m 8s\n" | ||
34 | //usage: "[98528 second delay results]\n") | ||
35 | |||
21 | #include "libbb.h" | 36 | #include "libbb.h" |
22 | 37 | ||
23 | /* Do not make this applet NOFORK. It breaks ^C-ing of pauses in shells */ | 38 | /* 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 @@ | |||
12 | * http://www.opengroup.org/onlinepubs/007904975/utilities/sort.html | 12 | * http://www.opengroup.org/onlinepubs/007904975/utilities/sort.html |
13 | */ | 13 | */ |
14 | 14 | ||
15 | //usage:#define sort_trivial_usage | ||
16 | //usage: "[-nru" | ||
17 | //usage: IF_FEATURE_SORT_BIG("gMcszbdfimSTokt] [-o FILE] [-k start[.offset][opts][,end[.offset][opts]] [-t CHAR") | ||
18 | //usage: "] [FILE]..." | ||
19 | //usage:#define sort_full_usage "\n\n" | ||
20 | //usage: "Sort lines of text\n" | ||
21 | //usage: "\nOptions:" | ||
22 | //usage: IF_FEATURE_SORT_BIG( | ||
23 | //usage: "\n -b Ignore leading blanks" | ||
24 | //usage: "\n -c Check whether input is sorted" | ||
25 | //usage: "\n -d Dictionary order (blank or alphanumeric only)" | ||
26 | //usage: "\n -f Ignore case" | ||
27 | //usage: "\n -g General numerical sort" | ||
28 | //usage: "\n -i Ignore unprintable characters" | ||
29 | //usage: "\n -k Sort key" | ||
30 | //usage: "\n -M Sort month" | ||
31 | //usage: ) | ||
32 | //usage: "\n -n Sort numbers" | ||
33 | //usage: IF_FEATURE_SORT_BIG( | ||
34 | //usage: "\n -o Output to file" | ||
35 | //usage: "\n -k Sort by key" | ||
36 | //usage: "\n -t CHAR Key separator" | ||
37 | //usage: ) | ||
38 | //usage: "\n -r Reverse sort order" | ||
39 | //usage: IF_FEATURE_SORT_BIG( | ||
40 | //usage: "\n -s Stable (don't sort ties alphabetically)" | ||
41 | //usage: ) | ||
42 | //usage: "\n -u Suppress duplicate lines" | ||
43 | //usage: IF_FEATURE_SORT_BIG( | ||
44 | //usage: "\n -z Lines are terminated by NUL, not newline" | ||
45 | //usage: "\n -mST Ignored for GNU compatibility") | ||
46 | //usage: | ||
47 | //usage:#define sort_example_usage | ||
48 | //usage: "$ echo -e \"e\\nf\\nb\\nd\\nc\\na\" | sort\n" | ||
49 | //usage: "a\n" | ||
50 | //usage: "b\n" | ||
51 | //usage: "c\n" | ||
52 | //usage: "d\n" | ||
53 | //usage: "e\n" | ||
54 | //usage: "f\n" | ||
55 | //usage: IF_FEATURE_SORT_BIG( | ||
56 | //usage: "$ echo -e \"c 3\\nb 2\\nd 2\" | $SORT -k 2,2n -k 1,1r\n" | ||
57 | //usage: "d 2\n" | ||
58 | //usage: "b 2\n" | ||
59 | //usage: "c 3\n" | ||
60 | //usage: ) | ||
61 | //usage: "" | ||
62 | |||
15 | #include "libbb.h" | 63 | #include "libbb.h" |
16 | 64 | ||
17 | /* This is a NOEXEC applet. Be very careful! */ | 65 | /* 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 @@ | |||
9 | * SUSv3 requirements: | 9 | * SUSv3 requirements: |
10 | * http://www.opengroup.org/onlinepubs/009695399/utilities/split.html | 10 | * http://www.opengroup.org/onlinepubs/009695399/utilities/split.html |
11 | */ | 11 | */ |
12 | |||
13 | //usage:#define split_trivial_usage | ||
14 | //usage: "[OPTIONS] [INPUT [PREFIX]]" | ||
15 | //usage:#define split_full_usage "\n\n" | ||
16 | //usage: "Options:" | ||
17 | //usage: "\n -b N[k|m] Split by N (kilo|mega)bytes" | ||
18 | //usage: "\n -l N Split by N lines" | ||
19 | //usage: "\n -a N Use N letters as suffix" | ||
20 | //usage: | ||
21 | //usage:#define split_example_usage | ||
22 | //usage: "$ split TODO foo\n" | ||
23 | //usage: "$ cat TODO | split -a 2 -l 2 TODO_\n" | ||
24 | |||
12 | #include "libbb.h" | 25 | #include "libbb.h" |
13 | 26 | ||
14 | static const struct suffix_mult split_suffices[] = { | 27 | 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 @@ | |||
12 | * | 12 | * |
13 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 13 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
14 | */ | 14 | */ |
15 | |||
16 | //usage:#define stat_trivial_usage | ||
17 | //usage: "[OPTIONS] FILE..." | ||
18 | //usage:#define stat_full_usage "\n\n" | ||
19 | //usage: "Display file (default) or filesystem status\n" | ||
20 | //usage: "\nOptions:" | ||
21 | //usage: IF_FEATURE_STAT_FORMAT( | ||
22 | //usage: "\n -c fmt Use the specified format" | ||
23 | //usage: ) | ||
24 | //usage: "\n -f Display filesystem status" | ||
25 | //usage: "\n -L Follow links" | ||
26 | //usage: "\n -t Display info in terse form" | ||
27 | //usage: IF_SELINUX( | ||
28 | //usage: "\n -Z Print security context" | ||
29 | //usage: ) | ||
30 | //usage: IF_FEATURE_STAT_FORMAT( | ||
31 | //usage: "\n\nValid format sequences for files:\n" | ||
32 | //usage: " %a Access rights in octal\n" | ||
33 | //usage: " %A Access rights in human readable form\n" | ||
34 | //usage: " %b Number of blocks allocated (see %B)\n" | ||
35 | //usage: " %B The size in bytes of each block reported by %b\n" | ||
36 | //usage: " %d Device number in decimal\n" | ||
37 | //usage: " %D Device number in hex\n" | ||
38 | //usage: " %f Raw mode in hex\n" | ||
39 | //usage: " %F File type\n" | ||
40 | //usage: " %g Group ID of owner\n" | ||
41 | //usage: " %G Group name of owner\n" | ||
42 | //usage: " %h Number of hard links\n" | ||
43 | //usage: " %i Inode number\n" | ||
44 | //usage: " %n File name\n" | ||
45 | //usage: " %N File name, with -> TARGET if symlink\n" | ||
46 | //usage: " %o I/O block size\n" | ||
47 | //usage: " %s Total size, in bytes\n" | ||
48 | //usage: " %t Major device type in hex\n" | ||
49 | //usage: " %T Minor device type in hex\n" | ||
50 | //usage: " %u User ID of owner\n" | ||
51 | //usage: " %U User name of owner\n" | ||
52 | //usage: " %x Time of last access\n" | ||
53 | //usage: " %X Time of last access as seconds since Epoch\n" | ||
54 | //usage: " %y Time of last modification\n" | ||
55 | //usage: " %Y Time of last modification as seconds since Epoch\n" | ||
56 | //usage: " %z Time of last change\n" | ||
57 | //usage: " %Z Time of last change as seconds since Epoch\n" | ||
58 | //usage: "\nValid format sequences for file systems:\n" | ||
59 | //usage: " %a Free blocks available to non-superuser\n" | ||
60 | //usage: " %b Total data blocks in file system\n" | ||
61 | //usage: " %c Total file nodes in file system\n" | ||
62 | //usage: " %d Free file nodes in file system\n" | ||
63 | //usage: " %f Free blocks in file system\n" | ||
64 | //usage: IF_SELINUX( | ||
65 | //usage: " %C Security context in selinux\n" | ||
66 | //usage: ) | ||
67 | //usage: " %i File System ID in hex\n" | ||
68 | //usage: " %l Maximum length of filenames\n" | ||
69 | //usage: " %n File name\n" | ||
70 | //usage: " %s Block size (for faster transfer)\n" | ||
71 | //usage: " %S Fundamental block size (for block counts)\n" | ||
72 | //usage: " %t Type in hex\n" | ||
73 | //usage: " %T Type in human readable form" | ||
74 | //usage: ) | ||
75 | |||
15 | #include "libbb.h" | 76 | #include "libbb.h" |
16 | 77 | ||
17 | #define OPT_FILESYS (1 << 0) | 78 | #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 @@ | |||
21 | 21 | ||
22 | */ | 22 | */ |
23 | 23 | ||
24 | //usage:#define stty_trivial_usage | ||
25 | //usage: "[-a|g] [-F DEVICE] [SETTING]..." | ||
26 | //usage:#define stty_full_usage "\n\n" | ||
27 | //usage: "Without arguments, prints baud rate, line discipline,\n" | ||
28 | //usage: "and deviations from stty sane\n" | ||
29 | //usage: "\nOptions:" | ||
30 | //usage: "\n -F DEVICE Open device instead of stdin" | ||
31 | //usage: "\n -a Print all current settings in human-readable form" | ||
32 | //usage: "\n -g Print in stty-readable form" | ||
33 | //usage: "\n [SETTING] See manpage" | ||
34 | |||
24 | #include "libbb.h" | 35 | #include "libbb.h" |
25 | 36 | ||
26 | #ifndef _POSIX_VDISABLE | 37 | #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 @@ | |||
13 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 13 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
14 | */ | 14 | */ |
15 | 15 | ||
16 | //usage:#define sum_trivial_usage | ||
17 | //usage: "[-rs] [FILE]..." | ||
18 | //usage:#define sum_full_usage "\n\n" | ||
19 | //usage: "Checksum and count the blocks in a file\n" | ||
20 | //usage: "\nOptions:" | ||
21 | //usage: "\n -r Use BSD sum algorithm (1K blocks)" | ||
22 | //usage: "\n -s Use System V sum algorithm (512byte blocks)" | ||
23 | |||
16 | #include "libbb.h" | 24 | #include "libbb.h" |
17 | 25 | ||
18 | enum { SUM_BSD, PRINT_NAME, SUM_SYSV }; | 26 | 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 @@ | |||
9 | 9 | ||
10 | /* BB_AUDIT SUSv3 N/A -- Matches GNU behavior. */ | 10 | /* BB_AUDIT SUSv3 N/A -- Matches GNU behavior. */ |
11 | 11 | ||
12 | //usage:#define sync_trivial_usage | ||
13 | //usage: "" | ||
14 | //usage:#define sync_full_usage "\n\n" | ||
15 | //usage: "Write all buffered blocks to disk" | ||
16 | |||
12 | #include "libbb.h" | 17 | #include "libbb.h" |
13 | 18 | ||
14 | /* This is a NOFORK applet. Be very careful! */ | 19 | /* 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 @@ | |||
16 | * http://www.uclibc.org/lists/busybox/2003-July/008813.html | 16 | * http://www.uclibc.org/lists/busybox/2003-July/008813.html |
17 | */ | 17 | */ |
18 | 18 | ||
19 | //usage:#define tac_trivial_usage | ||
20 | //usage: "[FILE]..." | ||
21 | //usage:#define tac_full_usage "\n\n" | ||
22 | //usage: "Concatenate FILEs and print them in reverse" | ||
23 | |||
19 | #include "libbb.h" | 24 | #include "libbb.h" |
20 | 25 | ||
21 | /* This is a NOEXEC applet. Be very careful! */ | 26 | /* 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 @@ | |||
24 | * 7) lseek attempted when count==0 even if arg was +0 (from top) | 24 | * 7) lseek attempted when count==0 even if arg was +0 (from top) |
25 | */ | 25 | */ |
26 | 26 | ||
27 | //usage:#define tail_trivial_usage | ||
28 | //usage: "[OPTIONS] [FILE]..." | ||
29 | //usage:#define tail_full_usage "\n\n" | ||
30 | //usage: "Print last 10 lines of each FILE (or stdin) to stdout.\n" | ||
31 | //usage: "With more than one FILE, precede each with a filename header.\n" | ||
32 | //usage: "\nOptions:" | ||
33 | //usage: "\n -f Print data as file grows" | ||
34 | //usage: IF_FEATURE_FANCY_TAIL( | ||
35 | //usage: "\n -s SECONDS Wait SECONDS between reads with -f" | ||
36 | //usage: ) | ||
37 | //usage: "\n -n N[kbm] Print last N lines" | ||
38 | //usage: IF_FEATURE_FANCY_TAIL( | ||
39 | //usage: "\n -c N[kbm] Print last N bytes" | ||
40 | //usage: "\n -q Never print headers" | ||
41 | //usage: "\n -v Always print headers" | ||
42 | //usage: "\n" | ||
43 | //usage: "\nN may be suffixed by k (x1024), b (x512), or m (x1024^2)." | ||
44 | //usage: "\nIf N starts with a '+', output begins with the Nth item from the start" | ||
45 | //usage: "\nof each file, not from the end." | ||
46 | //usage: ) | ||
47 | //usage: | ||
48 | //usage:#define tail_example_usage | ||
49 | //usage: "$ tail -n 1 /etc/resolv.conf\n" | ||
50 | //usage: "nameserver 10.0.0.1\n" | ||
51 | |||
27 | #include "libbb.h" | 52 | #include "libbb.h" |
28 | 53 | ||
29 | static const struct suffix_mult tail_suffixes[] = { | 54 | 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 @@ | |||
10 | /* BB_AUDIT SUSv3 compliant */ | 10 | /* BB_AUDIT SUSv3 compliant */ |
11 | /* http://www.opengroup.org/onlinepubs/007904975/utilities/tee.html */ | 11 | /* http://www.opengroup.org/onlinepubs/007904975/utilities/tee.html */ |
12 | 12 | ||
13 | //usage:#define tee_trivial_usage | ||
14 | //usage: "[-ai] [FILE]..." | ||
15 | //usage:#define tee_full_usage "\n\n" | ||
16 | //usage: "Copy stdin to each FILE, and also to stdout\n" | ||
17 | //usage: "\nOptions:" | ||
18 | //usage: "\n -a Append to the given FILEs, don't overwrite" | ||
19 | //usage: "\n -i Ignore interrupt signals (SIGINT)" | ||
20 | //usage: | ||
21 | //usage:#define tee_example_usage | ||
22 | //usage: "$ echo \"Hello\" | tee /tmp/foo\n" | ||
23 | //usage: "$ cat /tmp/foo\n" | ||
24 | //usage: "Hello\n" | ||
25 | |||
13 | #include "libbb.h" | 26 | #include "libbb.h" |
14 | 27 | ||
15 | int tee_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 28 | 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 @@ | |||
39 | //config: help | 39 | //config: help |
40 | //config: Enable 64-bit support in test. | 40 | //config: Enable 64-bit support in test. |
41 | 41 | ||
42 | /* "test --help" does not print help (POSIX compat), only "[ --help" does. | ||
43 | * We display "<applet> EXPRESSION ]" here (not "<applet> EXPRESSION") | ||
44 | * Unfortunately, it screws up generated BusyBox.html. TODO. */ | ||
45 | //usage:#define test_trivial_usage | ||
46 | //usage: "EXPRESSION ]" | ||
47 | //usage:#define test_full_usage "\n\n" | ||
48 | //usage: "Check file types, compare values etc. Return a 0/1 exit code\n" | ||
49 | //usage: "depending on logical value of EXPRESSION" | ||
50 | //usage: | ||
51 | //usage:#define test_example_usage | ||
52 | //usage: "$ test 1 -eq 2\n" | ||
53 | //usage: "$ echo $?\n" | ||
54 | //usage: "1\n" | ||
55 | //usage: "$ test 1 -eq 1\n" | ||
56 | //usage: "$ echo $?\n" | ||
57 | //usage: "0\n" | ||
58 | //usage: "$ [ -d /etc ]\n" | ||
59 | //usage: "$ echo $?\n" | ||
60 | //usage: "0\n" | ||
61 | //usage: "$ [ -d /junk ]\n" | ||
62 | //usage: "$ echo $?\n" | ||
63 | //usage: "1\n" | ||
64 | |||
42 | #include "libbb.h" | 65 | #include "libbb.h" |
43 | #include <setjmp.h> | 66 | #include <setjmp.h> |
44 | 67 | ||
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 @@ | |||
47 | //config: useful for cases when no other way of expressing a character | 47 | //config: useful for cases when no other way of expressing a character |
48 | //config: is possible. | 48 | //config: is possible. |
49 | 49 | ||
50 | //usage:#define tr_trivial_usage | ||
51 | //usage: "[-cds] STRING1 [STRING2]" | ||
52 | //usage:#define tr_full_usage "\n\n" | ||
53 | //usage: "Translate, squeeze, or delete characters from stdin, writing to stdout\n" | ||
54 | //usage: "\nOptions:" | ||
55 | //usage: "\n -c Take complement of STRING1" | ||
56 | //usage: "\n -d Delete input characters coded STRING1" | ||
57 | //usage: "\n -s Squeeze multiple output characters of STRING2 into one character" | ||
58 | //usage: | ||
59 | //usage:#define tr_example_usage | ||
60 | //usage: "$ echo \"gdkkn vnqkc\" | tr [a-y] [b-z]\n" | ||
61 | //usage: "hello world\n" | ||
62 | |||
50 | #include "libbb.h" | 63 | #include "libbb.h" |
51 | 64 | ||
52 | enum { | 65 | 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 @@ | |||
10 | /* BB_AUDIT SUSv3 compliant */ | 10 | /* BB_AUDIT SUSv3 compliant */ |
11 | /* http://www.opengroup.org/onlinepubs/007904975/utilities/true.html */ | 11 | /* http://www.opengroup.org/onlinepubs/007904975/utilities/true.html */ |
12 | 12 | ||
13 | //usage:#define true_trivial_usage | ||
14 | //usage: "" | ||
15 | //usage:#define true_full_usage "\n\n" | ||
16 | //usage: "Return an exit code of TRUE (0)" | ||
17 | //usage: | ||
18 | //usage:#define true_example_usage | ||
19 | //usage: "$ true\n" | ||
20 | //usage: "$ echo $?\n" | ||
21 | //usage: "0\n" | ||
22 | |||
13 | #include "libbb.h" | 23 | #include "libbb.h" |
14 | 24 | ||
15 | /* This is a NOFORK applet. Be very careful! */ | 25 | /* 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 @@ | |||
10 | /* BB_AUDIT SUSv4 compliant */ | 10 | /* BB_AUDIT SUSv4 compliant */ |
11 | /* http://www.opengroup.org/onlinepubs/9699919799/utilities/tty.html */ | 11 | /* http://www.opengroup.org/onlinepubs/9699919799/utilities/tty.html */ |
12 | 12 | ||
13 | //usage:#define tty_trivial_usage | ||
14 | //usage: "" | ||
15 | //usage:#define tty_full_usage "\n\n" | ||
16 | //usage: "Print file name of stdin's terminal" | ||
17 | //usage: IF_INCLUDE_SUSv2( "\n" | ||
18 | //usage: "\nOptions:" | ||
19 | //usage: "\n -s Print nothing, only return exit status" | ||
20 | //usage: ) | ||
21 | //usage: | ||
22 | //usage:#define tty_example_usage | ||
23 | //usage: "$ tty\n" | ||
24 | //usage: "/dev/tty2\n" | ||
25 | |||
13 | #include "libbb.h" | 26 | #include "libbb.h" |
14 | 27 | ||
15 | int tty_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 28 | 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 @@ | |||
48 | * Fix handling of -a to not print "unknown", add -o and -i support. | 48 | * Fix handling of -a to not print "unknown", add -o and -i support. |
49 | */ | 49 | */ |
50 | 50 | ||
51 | //usage:#define uname_trivial_usage | ||
52 | //usage: "[-amnrspv]" | ||
53 | //usage:#define uname_full_usage "\n\n" | ||
54 | //usage: "Print system information\n" | ||
55 | //usage: "\nOptions:" | ||
56 | //usage: "\n -a Print all" | ||
57 | //usage: "\n -m The machine (hardware) type" | ||
58 | //usage: "\n -n Hostname" | ||
59 | //usage: "\n -r OS release" | ||
60 | //usage: "\n -s OS name (default)" | ||
61 | //usage: "\n -p Processor type" | ||
62 | //usage: "\n -v OS version" | ||
63 | //usage: | ||
64 | //usage:#define uname_example_usage | ||
65 | //usage: "$ uname -a\n" | ||
66 | //usage: "Linux debian 2.4.23 #2 Tue Dec 23 17:09:10 MST 2003 i686 GNU/Linux\n" | ||
67 | |||
51 | #include "libbb.h" | 68 | #include "libbb.h" |
52 | /* After libbb.h, since it needs sys/types.h on some systems */ | 69 | /* After libbb.h, since it needs sys/types.h on some systems */ |
53 | #include <sys/utsname.h> | 70 | #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 @@ | |||
10 | /* BB_AUDIT SUSv3 compliant */ | 10 | /* BB_AUDIT SUSv3 compliant */ |
11 | /* http://www.opengroup.org/onlinepubs/007904975/utilities/uniq.html */ | 11 | /* http://www.opengroup.org/onlinepubs/007904975/utilities/uniq.html */ |
12 | 12 | ||
13 | //usage:#define uniq_trivial_usage | ||
14 | //usage: "[-cdu][-f,s,w N] [INPUT [OUTPUT]]" | ||
15 | //usage:#define uniq_full_usage "\n\n" | ||
16 | //usage: "Discard duplicate lines\n" | ||
17 | //usage: "\nOptions:" | ||
18 | //usage: "\n -c Prefix lines by the number of occurrences" | ||
19 | //usage: "\n -d Only print duplicate lines" | ||
20 | //usage: "\n -u Only print unique lines" | ||
21 | //usage: "\n -f N Skip first N fields" | ||
22 | //usage: "\n -s N Skip first N chars (after any skipped fields)" | ||
23 | //usage: "\n -w N Compare N characters in line" | ||
24 | //usage: | ||
25 | //usage:#define uniq_example_usage | ||
26 | //usage: "$ echo -e \"a\\na\\nb\\nc\\nc\\na\" | sort | uniq\n" | ||
27 | //usage: "a\n" | ||
28 | //usage: "b\n" | ||
29 | //usage: "c\n" | ||
30 | |||
13 | #include "libbb.h" | 31 | #include "libbb.h" |
14 | 32 | ||
15 | int uniq_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 33 | 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 @@ | |||
9 | 9 | ||
10 | /* BB_AUDIT SUSv3 N/A -- Apparently a busybox extension. */ | 10 | /* BB_AUDIT SUSv3 N/A -- Apparently a busybox extension. */ |
11 | 11 | ||
12 | //usage:#define usleep_trivial_usage | ||
13 | //usage: "N" | ||
14 | //usage:#define usleep_full_usage "\n\n" | ||
15 | //usage: "Pause for N microseconds" | ||
16 | //usage: | ||
17 | //usage:#define usleep_example_usage | ||
18 | //usage: "$ usleep 1000000\n" | ||
19 | //usage: "[pauses for 1 second]\n" | ||
20 | |||
12 | #include "libbb.h" | 21 | #include "libbb.h" |
13 | 22 | ||
14 | /* This is a NOFORK applet. Be very careful! */ | 23 | /* 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 @@ | |||
10 | * Bugs: the spec doesn't mention anything about "`\n`\n" prior to the | 10 | * Bugs: the spec doesn't mention anything about "`\n`\n" prior to the |
11 | * "end" line | 11 | * "end" line |
12 | */ | 12 | */ |
13 | |||
14 | //usage:#define uudecode_trivial_usage | ||
15 | //usage: "[-o OUTFILE] [INFILE]" | ||
16 | //usage:#define uudecode_full_usage "\n\n" | ||
17 | //usage: "Uudecode a file\n" | ||
18 | //usage: "Finds outfile name in uuencoded source unless -o is given" | ||
19 | //usage: | ||
20 | //usage:#define uudecode_example_usage | ||
21 | //usage: "$ uudecode -o busybox busybox.uu\n" | ||
22 | //usage: "$ ls -l busybox\n" | ||
23 | //usage: "-rwxr-xr-x 1 ams ams 245264 Jun 7 21:35 busybox\n" | ||
24 | |||
13 | #include "libbb.h" | 25 | #include "libbb.h" |
14 | 26 | ||
15 | #if ENABLE_UUDECODE | 27 | #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 @@ | |||
8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | //usage:#define uuencode_trivial_usage | ||
12 | //usage: "[-m] [INFILE] STORED_FILENAME" | ||
13 | //usage:#define uuencode_full_usage "\n\n" | ||
14 | //usage: "Uuencode a file to stdout\n" | ||
15 | //usage: "\nOptions:" | ||
16 | //usage: "\n -m Use base64 encoding per RFC1521" | ||
17 | //usage: | ||
18 | //usage:#define uuencode_example_usage | ||
19 | //usage: "$ uuencode busybox busybox\n" | ||
20 | //usage: "begin 755 busybox\n" | ||
21 | //usage: "<encoded file snipped>\n" | ||
22 | //usage: "$ uudecode busybox busybox > busybox.uu\n" | ||
23 | //usage: "$\n" | ||
24 | |||
11 | #include "libbb.h" | 25 | #include "libbb.h" |
12 | 26 | ||
13 | enum { | 27 | 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 @@ | |||
18 | */ | 18 | */ |
19 | /* BB_AUDIT SUSv3 _NOT_ compliant -- missing options -b, -d, -l, -m, -p, -q, -r, -s, -t, -T, -u; Missing argument 'file'. */ | 19 | /* BB_AUDIT SUSv3 _NOT_ compliant -- missing options -b, -d, -l, -m, -p, -q, -r, -s, -t, -T, -u; Missing argument 'file'. */ |
20 | 20 | ||
21 | //usage:#define who_trivial_usage | ||
22 | //usage: "[-a]" | ||
23 | //usage:#define who_full_usage "\n\n" | ||
24 | //usage: "Show who is logged on\n" | ||
25 | //usage: "\nOptions:" | ||
26 | //usage: "\n -a Show all" | ||
27 | |||
21 | #include "libbb.h" | 28 | #include "libbb.h" |
22 | 29 | ||
23 | static void idle_string(char *str6, time_t t) | 30 | 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 @@ | |||
9 | 9 | ||
10 | /* BB_AUDIT SUSv3 N/A -- Matches GNU behavior. */ | 10 | /* BB_AUDIT SUSv3 N/A -- Matches GNU behavior. */ |
11 | 11 | ||
12 | //usage:#define whoami_trivial_usage | ||
13 | //usage: "" | ||
14 | //usage:#define whoami_full_usage "\n\n" | ||
15 | //usage: "Print the user name associated with the current effective user id" | ||
16 | |||
12 | #include "libbb.h" | 17 | #include "libbb.h" |
13 | 18 | ||
14 | /* This is a NOFORK applet. Be very careful! */ | 19 | /* 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 | |||
118 | "\n -F SEP Use SEP as field separator" \ | 118 | "\n -F SEP Use SEP as field separator" \ |
119 | "\n -f FILE Read program from FILE" \ | 119 | "\n -f FILE Read program from FILE" \ |
120 | 120 | ||
121 | #define basename_trivial_usage \ | ||
122 | "FILE [SUFFIX]" | ||
123 | #define basename_full_usage "\n\n" \ | ||
124 | "Strip directory path and .SUFFIX from FILE\n" | ||
125 | #define basename_example_usage \ | ||
126 | "$ basename /usr/local/bin/foo\n" \ | ||
127 | "foo\n" \ | ||
128 | "$ basename /usr/local/bin/\n" \ | ||
129 | "bin\n" \ | ||
130 | "$ basename /foo/bar.txt .txt\n" \ | ||
131 | "bar" | ||
132 | |||
133 | #define beep_trivial_usage \ | 121 | #define beep_trivial_usage \ |
134 | "-f FREQ -l LEN -d DELAY -r COUNT -n" | 122 | "-f FREQ -l LEN -d DELAY -r COUNT -n" |
135 | #define beep_full_usage "\n\n" \ | 123 | #define beep_full_usage "\n\n" \ |
@@ -171,32 +159,6 @@ INSERT | |||
171 | #define busybox_notes_usage \ | 159 | #define busybox_notes_usage \ |
172 | "Hello world!\n" | 160 | "Hello world!\n" |
173 | 161 | ||
174 | #define cal_trivial_usage \ | ||
175 | "[-jy] [[MONTH] YEAR]" | ||
176 | #define cal_full_usage "\n\n" \ | ||
177 | "Display a calendar\n" \ | ||
178 | "\nOptions:" \ | ||
179 | "\n -j Use julian dates" \ | ||
180 | "\n -y Display the entire year" \ | ||
181 | |||
182 | #define cat_trivial_usage \ | ||
183 | "[FILE]..." | ||
184 | #define cat_full_usage "\n\n" \ | ||
185 | "Concatenate FILEs and print them to stdout" \ | ||
186 | |||
187 | #define cat_example_usage \ | ||
188 | "$ cat /proc/uptime\n" \ | ||
189 | "110716.72 17.67" | ||
190 | |||
191 | #define catv_trivial_usage \ | ||
192 | "[-etv] [FILE]..." | ||
193 | #define catv_full_usage "\n\n" \ | ||
194 | "Display nonprinting characters as ^x or M-x\n" \ | ||
195 | "\nOptions:" \ | ||
196 | "\n -e End each line with $" \ | ||
197 | "\n -t Show tabs as ^I" \ | ||
198 | "\n -v Don't use ^x or M-x escapes" \ | ||
199 | |||
200 | #define chat_trivial_usage \ | 162 | #define chat_trivial_usage \ |
201 | "EXPECT [SEND [EXPECT [SEND...]]]" | 163 | "EXPECT [SEND [EXPECT [SEND...]]]" |
202 | #define chat_full_usage "\n\n" \ | 164 | #define chat_full_usage "\n\n" \ |
@@ -261,75 +223,6 @@ INSERT | |||
261 | "\n -R Recurse" \ | 223 | "\n -R Recurse" \ |
262 | ) | 224 | ) |
263 | 225 | ||
264 | #define chmod_trivial_usage \ | ||
265 | "[-R"IF_DESKTOP("cvf")"] MODE[,MODE]... FILE..." | ||
266 | #define chmod_full_usage "\n\n" \ | ||
267 | "Each MODE is one or more of the letters ugoa, one of the\n" \ | ||
268 | "symbols +-= and one or more of the letters rwxst\n" \ | ||
269 | "\nOptions:" \ | ||
270 | "\n -R Recurse" \ | ||
271 | IF_DESKTOP( \ | ||
272 | "\n -c List changed files" \ | ||
273 | "\n -v List all files" \ | ||
274 | "\n -f Hide errors" \ | ||
275 | ) | ||
276 | #define chmod_example_usage \ | ||
277 | "$ ls -l /tmp/foo\n" \ | ||
278 | "-rw-rw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n" \ | ||
279 | "$ chmod u+x /tmp/foo\n" \ | ||
280 | "$ ls -l /tmp/foo\n" \ | ||
281 | "-rwxrw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo*\n" \ | ||
282 | "$ chmod 444 /tmp/foo\n" \ | ||
283 | "$ ls -l /tmp/foo\n" \ | ||
284 | "-r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n" | ||
285 | |||
286 | #define chgrp_trivial_usage \ | ||
287 | "[-RhLHP"IF_DESKTOP("cvf")"]... GROUP FILE..." | ||
288 | #define chgrp_full_usage "\n\n" \ | ||
289 | "Change the group membership of each FILE to GROUP\n" \ | ||
290 | "\nOptions:" \ | ||
291 | "\n -R Recurse" \ | ||
292 | "\n -h Affect symlinks instead of symlink targets" \ | ||
293 | "\n -L Traverse all symlinks to directories" \ | ||
294 | "\n -H Traverse symlinks on command line only" \ | ||
295 | "\n -P Don't traverse symlinks (default)" \ | ||
296 | IF_DESKTOP( \ | ||
297 | "\n -c List changed files" \ | ||
298 | "\n -v Verbose" \ | ||
299 | "\n -f Hide errors" \ | ||
300 | ) | ||
301 | #define chgrp_example_usage \ | ||
302 | "$ ls -l /tmp/foo\n" \ | ||
303 | "-r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo\n" \ | ||
304 | "$ chgrp root /tmp/foo\n" \ | ||
305 | "$ ls -l /tmp/foo\n" \ | ||
306 | "-r--r--r-- 1 andersen root 0 Apr 12 18:25 /tmp/foo\n" | ||
307 | |||
308 | #define chown_trivial_usage \ | ||
309 | "[-RhLHP"IF_DESKTOP("cvf")"]... OWNER[<.|:>[GROUP]] FILE..." | ||
310 | #define chown_full_usage "\n\n" \ | ||
311 | "Change the owner and/or group of each FILE to OWNER and/or GROUP\n" \ | ||
312 | "\nOptions:" \ | ||
313 | "\n -R Recurse" \ | ||
314 | "\n -h Affect symlinks instead of symlink targets" \ | ||
315 | "\n -L Traverse all symlinks to directories" \ | ||
316 | "\n -H Traverse symlinks on command line only" \ | ||
317 | "\n -P Don't traverse symlinks (default)" \ | ||
318 | IF_DESKTOP( \ | ||
319 | "\n -c List changed files" \ | ||
320 | "\n -v List all files" \ | ||
321 | "\n -f Hide errors" \ | ||
322 | ) | ||
323 | #define chown_example_usage \ | ||
324 | "$ ls -l /tmp/foo\n" \ | ||
325 | "-r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo\n" \ | ||
326 | "$ chown root /tmp/foo\n" \ | ||
327 | "$ ls -l /tmp/foo\n" \ | ||
328 | "-r--r--r-- 1 root andersen 0 Apr 12 18:25 /tmp/foo\n" \ | ||
329 | "$ chown root.root /tmp/foo\n" \ | ||
330 | "ls -l /tmp/foo\n" \ | ||
331 | "-r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n" | ||
332 | |||
333 | #define chpst_trivial_usage \ | 226 | #define chpst_trivial_usage \ |
334 | "[-vP012] [-u USER[:GRP]] [-U USER[:GRP]] [-e DIR]\n" \ | 227 | "[-vP012] [-u USER[:GRP]] [-U USER[:GRP]] [-e DIR]\n" \ |
335 | " [-/ DIR] [-n NICE] [-m BYTES] [-d BYTES] [-o N]\n" \ | 228 | " [-/ DIR] [-n NICE] [-m BYTES] [-d BYTES] [-o N]\n" \ |
@@ -391,23 +284,6 @@ INSERT | |||
391 | "\n -t N Limit CPU time, process receives" \ | 284 | "\n -t N Limit CPU time, process receives" \ |
392 | "\n a SIGXCPU after N seconds" \ | 285 | "\n a SIGXCPU after N seconds" \ |
393 | 286 | ||
394 | #define chroot_trivial_usage \ | ||
395 | "NEWROOT [PROG ARGS]" | ||
396 | #define chroot_full_usage "\n\n" \ | ||
397 | "Run PROG with root directory set to NEWROOT" | ||
398 | #define chroot_example_usage \ | ||
399 | "$ ls -l /bin/ls\n" \ | ||
400 | "lrwxrwxrwx 1 root root 12 Apr 13 00:46 /bin/ls -> /BusyBox\n" \ | ||
401 | "# mount /dev/hdc1 /mnt -t minix\n" \ | ||
402 | "# chroot /mnt\n" \ | ||
403 | "# ls -l /bin/ls\n" \ | ||
404 | "-rwxr-xr-x 1 root root 40816 Feb 5 07:45 /bin/ls*\n" | ||
405 | |||
406 | #define cksum_trivial_usage \ | ||
407 | "FILES..." | ||
408 | #define cksum_full_usage "\n\n" \ | ||
409 | "Calculate the CRC32 checksums of FILES" | ||
410 | |||
411 | #define cmp_trivial_usage \ | 287 | #define cmp_trivial_usage \ |
412 | "[-l] [-s] FILE1 [FILE2" IF_DESKTOP(" [SKIP1 [SKIP2]]") "]" | 288 | "[-l] [-s] FILE1 [FILE2" IF_DESKTOP(" [SKIP1 [SKIP2]]") "]" |
413 | #define cmp_full_usage "\n\n" \ | 289 | #define cmp_full_usage "\n\n" \ |
@@ -417,15 +293,6 @@ INSERT | |||
417 | "\n for all differing bytes" \ | 293 | "\n for all differing bytes" \ |
418 | "\n -s Quiet" \ | 294 | "\n -s Quiet" \ |
419 | 295 | ||
420 | #define comm_trivial_usage \ | ||
421 | "[-123] FILE1 FILE2" | ||
422 | #define comm_full_usage "\n\n" \ | ||
423 | "Compare FILE1 with FILE2\n" \ | ||
424 | "\nOptions:" \ | ||
425 | "\n -1 Suppress lines unique to FILE1" \ | ||
426 | "\n -2 Suppress lines unique to FILE2" \ | ||
427 | "\n -3 Suppress lines common to both files" \ | ||
428 | |||
429 | #define bbconfig_trivial_usage \ | 296 | #define bbconfig_trivial_usage \ |
430 | "" | 297 | "" |
431 | #define bbconfig_full_usage "\n\n" \ | 298 | #define bbconfig_full_usage "\n\n" \ |
@@ -447,13 +314,6 @@ INSERT | |||
447 | "$ chrt -f -p 3 $x\n" \ | 314 | "$ chrt -f -p 3 $x\n" \ |
448 | "You need CAP_SYS_NICE privileges to set scheduling attributes of a process" | 315 | "You need CAP_SYS_NICE privileges to set scheduling attributes of a process" |
449 | 316 | ||
450 | #define nice_trivial_usage \ | ||
451 | "[-n ADJUST] [PROG ARGS]" | ||
452 | #define nice_full_usage "\n\n" \ | ||
453 | "Change scheduling priority, run PROG\n" \ | ||
454 | "\nOptions:" \ | ||
455 | "\n -n ADJUST Adjust priority by ADJUST" \ | ||
456 | |||
457 | #define renice_trivial_usage \ | 317 | #define renice_trivial_usage \ |
458 | "{{-n INCREMENT} | PRIORITY} [[-p | -g | -u] ID...]" | 318 | "{{-n INCREMENT} | PRIORITY} [[-p | -g | -u] ID...]" |
459 | #define renice_full_usage "\n\n" \ | 319 | #define renice_full_usage "\n\n" \ |
@@ -472,24 +332,6 @@ INSERT | |||
472 | "\n -c Class. 1:realtime 2:best-effort 3:idle" \ | 332 | "\n -c Class. 1:realtime 2:best-effort 3:idle" \ |
473 | "\n -n Priority" \ | 333 | "\n -n Priority" \ |
474 | 334 | ||
475 | #define cp_trivial_usage \ | ||
476 | "[OPTIONS] SOURCE DEST" | ||
477 | #define cp_full_usage "\n\n" \ | ||
478 | "Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY\n" \ | ||
479 | "\nOptions:" \ | ||
480 | "\n -a Same as -dpR" \ | ||
481 | IF_SELINUX( \ | ||
482 | "\n -c Preserve security context" \ | ||
483 | ) \ | ||
484 | "\n -R,-r Recurse" \ | ||
485 | "\n -d,-P Preserve symlinks (default if -R)" \ | ||
486 | "\n -L Follow all symlinks" \ | ||
487 | "\n -H Follow symlinks on command line" \ | ||
488 | "\n -p Preserve file attributes if possible" \ | ||
489 | "\n -f Overwrite" \ | ||
490 | "\n -i Prompt before overwrite" \ | ||
491 | "\n -l,-s Create (sym)links" \ | ||
492 | |||
493 | #define crond_trivial_usage \ | 335 | #define crond_trivial_usage \ |
494 | "-fbS -l N " IF_FEATURE_CROND_D("-d N ") "-L LOGFILE -c DIR" | 336 | "-fbS -l N " IF_FEATURE_CROND_D("-d N ") "-L LOGFILE -c DIR" |
495 | #define crond_full_usage "\n\n" \ | 337 | #define crond_full_usage "\n\n" \ |
@@ -553,57 +395,6 @@ INSERT | |||
553 | "\n -S SALT" \ | 395 | "\n -S SALT" \ |
554 | ) \ | 396 | ) \ |
555 | 397 | ||
556 | #define cut_trivial_usage \ | ||
557 | "[OPTIONS] [FILE]..." | ||
558 | #define cut_full_usage "\n\n" \ | ||
559 | "Print selected fields from each input FILE to stdout\n" \ | ||
560 | "\nOptions:" \ | ||
561 | "\n -b LIST Output only bytes from LIST" \ | ||
562 | "\n -c LIST Output only characters from LIST" \ | ||
563 | "\n -d CHAR Use CHAR instead of tab as the field delimiter" \ | ||
564 | "\n -s Output only the lines containing delimiter" \ | ||
565 | "\n -f N Print only these fields" \ | ||
566 | "\n -n Ignored" \ | ||
567 | |||
568 | #define cut_example_usage \ | ||
569 | "$ echo \"Hello world\" | cut -f 1 -d ' '\n" \ | ||
570 | "Hello\n" \ | ||
571 | "$ echo \"Hello world\" | cut -f 2 -d ' '\n" \ | ||
572 | "world\n" | ||
573 | |||
574 | #define dd_trivial_usage \ | ||
575 | "[if=FILE] [of=FILE] " IF_FEATURE_DD_IBS_OBS("[ibs=N] [obs=N] ") "[bs=N] [count=N] [skip=N]\n" \ | ||
576 | " [seek=N]" IF_FEATURE_DD_IBS_OBS(" [conv=notrunc|noerror|sync|fsync]") | ||
577 | #define dd_full_usage "\n\n" \ | ||
578 | "Copy a file with converting and formatting\n" \ | ||
579 | "\nOptions:" \ | ||
580 | "\n if=FILE Read from FILE instead of stdin" \ | ||
581 | "\n of=FILE Write to FILE instead of stdout" \ | ||
582 | "\n bs=N Read and write N bytes at a time" \ | ||
583 | IF_FEATURE_DD_IBS_OBS( \ | ||
584 | "\n ibs=N Read N bytes at a time" \ | ||
585 | ) \ | ||
586 | IF_FEATURE_DD_IBS_OBS( \ | ||
587 | "\n obs=N Write N bytes at a time" \ | ||
588 | ) \ | ||
589 | "\n count=N Copy only N input blocks" \ | ||
590 | "\n skip=N Skip N input blocks" \ | ||
591 | "\n seek=N Skip N output blocks" \ | ||
592 | IF_FEATURE_DD_IBS_OBS( \ | ||
593 | "\n conv=notrunc Don't truncate output file" \ | ||
594 | "\n conv=noerror Continue after read errors" \ | ||
595 | "\n conv=sync Pad blocks with zeros" \ | ||
596 | "\n conv=fsync Physically write data out before finishing" \ | ||
597 | ) \ | ||
598 | "\n" \ | ||
599 | "\nNumbers may be suffixed by c (x1), w (x2), b (x512), kD (x1000), k (x1024)," \ | ||
600 | "\nMD (x1000000), M (x1048576), GD (x1000000000) or G (x1073741824)" \ | ||
601 | |||
602 | #define dd_example_usage \ | ||
603 | "$ dd if=/dev/zero of=/dev/ram1 bs=1M count=4\n" \ | ||
604 | "4+0 records in\n" \ | ||
605 | "4+0 records out\n" | ||
606 | |||
607 | #define delgroup_trivial_usage \ | 398 | #define delgroup_trivial_usage \ |
608 | IF_FEATURE_DEL_USER_FROM_GROUP("[USER] ")"GROUP" | 399 | IF_FEATURE_DEL_USER_FROM_GROUP("[USER] ")"GROUP" |
609 | #define delgroup_full_usage "\n\n" \ | 400 | #define delgroup_full_usage "\n\n" \ |
@@ -639,41 +430,6 @@ INSERT | |||
639 | "\n don't poll for events" \ | 430 | "\n don't poll for events" \ |
640 | ) | 431 | ) |
641 | 432 | ||
642 | #define df_trivial_usage \ | ||
643 | "[-Pk" \ | ||
644 | IF_FEATURE_HUMAN_READABLE("mh") \ | ||
645 | IF_FEATURE_DF_FANCY("ai] [-B SIZE") \ | ||
646 | "] [FILESYSTEM]..." | ||
647 | #define df_full_usage "\n\n" \ | ||
648 | "Print filesystem usage statistics\n" \ | ||
649 | "\nOptions:" \ | ||
650 | "\n -P POSIX output format" \ | ||
651 | "\n -k 1024-byte blocks (default)" \ | ||
652 | IF_FEATURE_HUMAN_READABLE( \ | ||
653 | "\n -m 1M-byte blocks" \ | ||
654 | "\n -h Human readable (e.g. 1K 243M 2G)" \ | ||
655 | ) \ | ||
656 | IF_FEATURE_DF_FANCY( \ | ||
657 | "\n -a Show all filesystems" \ | ||
658 | "\n -i Inodes" \ | ||
659 | "\n -B SIZE Blocksize" \ | ||
660 | ) \ | ||
661 | |||
662 | #define df_example_usage \ | ||
663 | "$ df\n" \ | ||
664 | "Filesystem 1K-blocks Used Available Use% Mounted on\n" \ | ||
665 | "/dev/sda3 8690864 8553540 137324 98% /\n" \ | ||
666 | "/dev/sda1 64216 36364 27852 57% /boot\n" \ | ||
667 | "$ df /dev/sda3\n" \ | ||
668 | "Filesystem 1K-blocks Used Available Use% Mounted on\n" \ | ||
669 | "/dev/sda3 8690864 8553540 137324 98% /\n" \ | ||
670 | "$ POSIXLY_CORRECT=sure df /dev/sda3\n" \ | ||
671 | "Filesystem 512B-blocks Used Available Use% Mounted on\n" \ | ||
672 | "/dev/sda3 17381728 17107080 274648 98% /\n" \ | ||
673 | "$ POSIXLY_CORRECT=yep df -P /dev/sda3\n" \ | ||
674 | "Filesystem 512-blocks Used Available Capacity Mounted on\n" \ | ||
675 | "/dev/sda3 17381728 17107080 274648 98% /\n" | ||
676 | |||
677 | #define dhcprelay_trivial_usage \ | 433 | #define dhcprelay_trivial_usage \ |
678 | "CLIENT_IFACE[,CLIENT_IFACE2]... SERVER_IFACE [SERVER_IP]" | 434 | "CLIENT_IFACE[,CLIENT_IFACE2]... SERVER_IFACE [SERVER_IP]" |
679 | #define dhcprelay_full_usage "\n\n" \ | 435 | #define dhcprelay_full_usage "\n\n" \ |
@@ -701,16 +457,6 @@ INSERT | |||
701 | "\n -U Output LINES lines of context" \ | 457 | "\n -U Output LINES lines of context" \ |
702 | "\n -w Ignore all whitespace" \ | 458 | "\n -w Ignore all whitespace" \ |
703 | 459 | ||
704 | #define dirname_trivial_usage \ | ||
705 | "FILENAME" | ||
706 | #define dirname_full_usage "\n\n" \ | ||
707 | "Strip non-directory suffix from FILENAME" | ||
708 | #define dirname_example_usage \ | ||
709 | "$ dirname /tmp/foo\n" \ | ||
710 | "/tmp\n" \ | ||
711 | "$ dirname /tmp/foo/\n" \ | ||
712 | "/tmp\n" | ||
713 | |||
714 | #define dmesg_trivial_usage \ | 460 | #define dmesg_trivial_usage \ |
715 | "[-c] [-n LEVEL] [-s SIZE]" | 461 | "[-c] [-n LEVEL] [-s SIZE]" |
716 | #define dmesg_full_usage "\n\n" \ | 462 | #define dmesg_full_usage "\n\n" \ |
@@ -736,61 +482,6 @@ INSERT | |||
736 | "\n nameserver DNSD_SERVER" \ | 482 | "\n nameserver DNSD_SERVER" \ |
737 | "\n nameserver NORNAL_DNS_SERVER" \ | 483 | "\n nameserver NORNAL_DNS_SERVER" \ |
738 | 484 | ||
739 | #define dos2unix_trivial_usage \ | ||
740 | "[-ud] [FILE]" | ||
741 | #define dos2unix_full_usage "\n\n" \ | ||
742 | "Convert FILE in-place from DOS to Unix format.\n" \ | ||
743 | "When no file is given, use stdin/stdout.\n" \ | ||
744 | "\nOptions:" \ | ||
745 | "\n -u dos2unix" \ | ||
746 | "\n -d unix2dos" \ | ||
747 | |||
748 | #define unix2dos_trivial_usage \ | ||
749 | "[-ud] [FILE]" | ||
750 | #define unix2dos_full_usage "\n\n" \ | ||
751 | "Convert FILE in-place from Unix to DOS format.\n" \ | ||
752 | "When no file is given, use stdin/stdout.\n" \ | ||
753 | "\nOptions:" \ | ||
754 | "\n -u dos2unix" \ | ||
755 | "\n -d unix2dos" \ | ||
756 | |||
757 | #define du_trivial_usage \ | ||
758 | "[-aHLdclsx" IF_FEATURE_HUMAN_READABLE("hm") "k] [FILE]..." | ||
759 | #define du_full_usage "\n\n" \ | ||
760 | "Summarize disk space used for each FILE and/or directory.\n" \ | ||
761 | "Disk space is printed in units of " \ | ||
762 | IF_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("1024") \ | ||
763 | IF_NOT_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("512") \ | ||
764 | " bytes.\n" \ | ||
765 | "\nOptions:" \ | ||
766 | "\n -a Show file sizes too" \ | ||
767 | "\n -L Follow all symlinks" \ | ||
768 | "\n -H Follow symlinks on command line" \ | ||
769 | "\n -d N Limit output to directories (and files with -a) of depth < N" \ | ||
770 | "\n -c Show grand total" \ | ||
771 | "\n -l Count sizes many times if hard linked" \ | ||
772 | "\n -s Display only a total for each argument" \ | ||
773 | "\n -x Skip directories on different filesystems" \ | ||
774 | IF_FEATURE_HUMAN_READABLE( \ | ||
775 | "\n -h Sizes in human readable format (e.g., 1K 243M 2G )" \ | ||
776 | "\n -m Sizes in megabytes" \ | ||
777 | ) \ | ||
778 | "\n -k Sizes in kilobytes" \ | ||
779 | IF_FEATURE_DU_DEFAULT_BLOCKSIZE_1K(" (default)") \ | ||
780 | |||
781 | #define du_example_usage \ | ||
782 | "$ du\n" \ | ||
783 | "16 ./CVS\n" \ | ||
784 | "12 ./kernel-patches/CVS\n" \ | ||
785 | "80 ./kernel-patches\n" \ | ||
786 | "12 ./tests/CVS\n" \ | ||
787 | "36 ./tests\n" \ | ||
788 | "12 ./scripts/CVS\n" \ | ||
789 | "16 ./scripts\n" \ | ||
790 | "12 ./docs/CVS\n" \ | ||
791 | "104 ./docs\n" \ | ||
792 | "2417 .\n" | ||
793 | |||
794 | #define dumpleases_trivial_usage \ | 485 | #define dumpleases_trivial_usage \ |
795 | "[-r|-a] [-f LEASEFILE]" | 486 | "[-r|-a] [-f LEASEFILE]" |
796 | #define dumpleases_full_usage "\n\n" \ | 487 | #define dumpleases_full_usage "\n\n" \ |
@@ -829,26 +520,6 @@ INSERT | |||
829 | "\n -L file Set badblocks list" \ | 520 | "\n -L file Set badblocks list" \ |
830 | */ | 521 | */ |
831 | 522 | ||
832 | #define echo_trivial_usage \ | ||
833 | IF_FEATURE_FANCY_ECHO("[-neE] ") "[ARG]..." | ||
834 | #define echo_full_usage "\n\n" \ | ||
835 | "Print the specified ARGs to stdout" \ | ||
836 | IF_FEATURE_FANCY_ECHO( "\n" \ | ||
837 | "\nOptions:" \ | ||
838 | "\n -n Suppress trailing newline" \ | ||
839 | "\n -e Interpret backslash escapes (i.e., \\t=tab)" \ | ||
840 | "\n -E Don't interpret backslash escapes (default)" \ | ||
841 | ) | ||
842 | #define echo_example_usage \ | ||
843 | "$ echo \"Erik is cool\"\n" \ | ||
844 | "Erik is cool\n" \ | ||
845 | IF_FEATURE_FANCY_ECHO("$ echo -e \"Erik\\nis\\ncool\"\n" \ | ||
846 | "Erik\n" \ | ||
847 | "is\n" \ | ||
848 | "cool\n" \ | ||
849 | "$ echo \"Erik\\nis\\ncool\"\n" \ | ||
850 | "Erik\\nis\\ncool\n") | ||
851 | |||
852 | #define eject_trivial_usage \ | 523 | #define eject_trivial_usage \ |
853 | "[-t] [-T] [DEVICE]" | 524 | "[-t] [-T] [DEVICE]" |
854 | #define eject_full_usage "\n\n" \ | 525 | #define eject_full_usage "\n\n" \ |
@@ -863,15 +534,6 @@ INSERT | |||
863 | #define ed_trivial_usage "" | 534 | #define ed_trivial_usage "" |
864 | #define ed_full_usage "" | 535 | #define ed_full_usage "" |
865 | 536 | ||
866 | #define env_trivial_usage \ | ||
867 | "[-iu] [-] [name=value]... [PROG ARGS]" | ||
868 | #define env_full_usage "\n\n" \ | ||
869 | "Print the current environment or run PROG after setting up\n" \ | ||
870 | "the specified environment\n" \ | ||
871 | "\nOptions:" \ | ||
872 | "\n -, -i Start with an empty environment" \ | ||
873 | "\n -u Remove variable from the environment" \ | ||
874 | |||
875 | #define ether_wake_trivial_usage \ | 537 | #define ether_wake_trivial_usage \ |
876 | "[-b] [-i iface] [-p aa:bb:cc:dd[:ee:ff]] MAC" | 538 | "[-b] [-i iface] [-p aa:bb:cc:dd[:ee:ff]] MAC" |
877 | #define ether_wake_full_usage "\n\n" \ | 539 | #define ether_wake_full_usage "\n\n" \ |
@@ -883,55 +545,6 @@ INSERT | |||
883 | "\n -i iface Interface to use (default eth0)" \ | 545 | "\n -i iface Interface to use (default eth0)" \ |
884 | "\n -p pass Append four or six byte password PW to the packet" \ | 546 | "\n -p pass Append four or six byte password PW to the packet" \ |
885 | 547 | ||
886 | #define expand_trivial_usage \ | ||
887 | "[-i] [-t N] [FILE]..." | ||
888 | #define expand_full_usage "\n\n" \ | ||
889 | "Convert tabs to spaces, writing to stdout\n" \ | ||
890 | "\nOptions:" \ | ||
891 | IF_FEATURE_EXPAND_LONG_OPTIONS( \ | ||
892 | "\n -i,--initial Don't convert tabs after non blanks" \ | ||
893 | "\n -t,--tabs=N Tabstops every N chars" \ | ||
894 | ) \ | ||
895 | IF_NOT_FEATURE_EXPAND_LONG_OPTIONS( \ | ||
896 | "\n -i Don't convert tabs after non blanks" \ | ||
897 | "\n -t Tabstops every N chars" \ | ||
898 | ) | ||
899 | |||
900 | #define expr_trivial_usage \ | ||
901 | "EXPRESSION" | ||
902 | #define expr_full_usage "\n\n" \ | ||
903 | "Print the value of EXPRESSION to stdout\n" \ | ||
904 | "\n" \ | ||
905 | "EXPRESSION may be:\n" \ | ||
906 | " ARG1 | ARG2 ARG1 if it is neither null nor 0, otherwise ARG2\n" \ | ||
907 | " ARG1 & ARG2 ARG1 if neither argument is null or 0, otherwise 0\n" \ | ||
908 | " ARG1 < ARG2 1 if ARG1 is less than ARG2, else 0. Similarly:\n" \ | ||
909 | " ARG1 <= ARG2\n" \ | ||
910 | " ARG1 = ARG2\n" \ | ||
911 | " ARG1 != ARG2\n" \ | ||
912 | " ARG1 >= ARG2\n" \ | ||
913 | " ARG1 > ARG2\n" \ | ||
914 | " ARG1 + ARG2 Sum of ARG1 and ARG2. Similarly:\n" \ | ||
915 | " ARG1 - ARG2\n" \ | ||
916 | " ARG1 * ARG2\n" \ | ||
917 | " ARG1 / ARG2\n" \ | ||
918 | " ARG1 % ARG2\n" \ | ||
919 | " STRING : REGEXP Anchored pattern match of REGEXP in STRING\n" \ | ||
920 | " match STRING REGEXP Same as STRING : REGEXP\n" \ | ||
921 | " substr STRING POS LENGTH Substring of STRING, POS counted from 1\n" \ | ||
922 | " index STRING CHARS Index in STRING where any CHARS is found, or 0\n" \ | ||
923 | " length STRING Length of STRING\n" \ | ||
924 | " quote TOKEN Interpret TOKEN as a string, even if\n" \ | ||
925 | " it is a keyword like 'match' or an\n" \ | ||
926 | " operator like '/'\n" \ | ||
927 | " (EXPRESSION) Value of EXPRESSION\n" \ | ||
928 | "\n" \ | ||
929 | "Beware that many operators need to be escaped or quoted for shells.\n" \ | ||
930 | "Comparisons are arithmetic if both ARGs are numbers, else\n" \ | ||
931 | "lexicographical. Pattern matches return the string matched between\n" \ | ||
932 | "\\( and \\) or null; if \\( and \\) are not used, they return the number\n" \ | ||
933 | "of characters matched or 0." | ||
934 | |||
935 | #define fakeidentd_trivial_usage \ | 548 | #define fakeidentd_trivial_usage \ |
936 | "[-fiw] [-b ADDR] [STRING]" | 549 | "[-fiw] [-b ADDR] [STRING]" |
937 | #define fakeidentd_full_usage "\n\n" \ | 550 | #define fakeidentd_full_usage "\n\n" \ |
@@ -943,16 +556,6 @@ INSERT | |||
943 | "\n -b ADDR Bind to specified address" \ | 556 | "\n -b ADDR Bind to specified address" \ |
944 | "\n STRING Ident answer string (default: nobody)" \ | 557 | "\n STRING Ident answer string (default: nobody)" \ |
945 | 558 | ||
946 | #define false_trivial_usage \ | ||
947 | "" | ||
948 | #define false_full_usage "\n\n" \ | ||
949 | "Return an exit code of FALSE (1)" | ||
950 | |||
951 | #define false_example_usage \ | ||
952 | "$ false\n" \ | ||
953 | "$ echo $?\n" \ | ||
954 | "1\n" | ||
955 | |||
956 | #define fbsplash_trivial_usage \ | 559 | #define fbsplash_trivial_usage \ |
957 | "-s IMGFILE [-c] [-d DEV] [-i INIFILE] [-f CMD]" | 560 | "-s IMGFILE [-c] [-d DEV] [-i INIFILE] [-f CMD]" |
958 | #define fbsplash_full_usage "\n\n" \ | 561 | #define fbsplash_full_usage "\n\n" \ |
@@ -1058,15 +661,6 @@ INSERT | |||
1058 | "\n -u Unlock FD" \ | 661 | "\n -u Unlock FD" \ |
1059 | "\n -n Fail rather than wait" \ | 662 | "\n -n Fail rather than wait" \ |
1060 | 663 | ||
1061 | #define fold_trivial_usage \ | ||
1062 | "[-bs] [-w WIDTH] [FILE]..." | ||
1063 | #define fold_full_usage "\n\n" \ | ||
1064 | "Wrap input lines in each FILE (or stdin), writing to stdout\n" \ | ||
1065 | "\nOptions:" \ | ||
1066 | "\n -b Count bytes rather than columns" \ | ||
1067 | "\n -s Break at spaces" \ | ||
1068 | "\n -w Use WIDTH columns instead of 80" \ | ||
1069 | |||
1070 | #define free_trivial_usage \ | 664 | #define free_trivial_usage \ |
1071 | "" IF_DESKTOP("[-b/k/m/g]") | 665 | "" IF_DESKTOP("[-b/k/m/g]") |
1072 | #define free_full_usage "\n\n" \ | 666 | #define free_full_usage "\n\n" \ |
@@ -1267,51 +861,6 @@ INSERT | |||
1267 | "\n -Z Disable Seagate auto-powersaving mode" \ | 861 | "\n -Z Disable Seagate auto-powersaving mode" \ |
1268 | "\n -z Reread partition table" \ | 862 | "\n -z Reread partition table" \ |
1269 | 863 | ||
1270 | #define head_trivial_usage \ | ||
1271 | "[OPTIONS] [FILE]..." | ||
1272 | #define head_full_usage "\n\n" \ | ||
1273 | "Print first 10 lines of each FILE (or stdin) to stdout.\n" \ | ||
1274 | "With more than one FILE, precede each with a filename header.\n" \ | ||
1275 | "\nOptions:" \ | ||
1276 | "\n -n N[kbm] Print first N lines" \ | ||
1277 | IF_FEATURE_FANCY_HEAD( \ | ||
1278 | "\n -c N[kbm] Print first N bytes" \ | ||
1279 | "\n -q Never print headers" \ | ||
1280 | "\n -v Always print headers" \ | ||
1281 | ) \ | ||
1282 | "\n" \ | ||
1283 | "\nN may be suffixed by k (x1024), b (x512), or m (x1024^2)." \ | ||
1284 | |||
1285 | #define head_example_usage \ | ||
1286 | "$ head -n 2 /etc/passwd\n" \ | ||
1287 | "root:x:0:0:root:/root:/bin/bash\n" \ | ||
1288 | "daemon:x:1:1:daemon:/usr/sbin:/bin/sh\n" | ||
1289 | |||
1290 | #define tail_trivial_usage \ | ||
1291 | "[OPTIONS] [FILE]..." | ||
1292 | #define tail_full_usage "\n\n" \ | ||
1293 | "Print last 10 lines of each FILE (or stdin) to stdout.\n" \ | ||
1294 | "With more than one FILE, precede each with a filename header.\n" \ | ||
1295 | "\nOptions:" \ | ||
1296 | "\n -f Print data as file grows" \ | ||
1297 | IF_FEATURE_FANCY_TAIL( \ | ||
1298 | "\n -s SECONDS Wait SECONDS between reads with -f" \ | ||
1299 | ) \ | ||
1300 | "\n -n N[kbm] Print last N lines" \ | ||
1301 | IF_FEATURE_FANCY_TAIL( \ | ||
1302 | "\n -c N[kbm] Print last N bytes" \ | ||
1303 | "\n -q Never print headers" \ | ||
1304 | "\n -v Always print headers" \ | ||
1305 | "\n" \ | ||
1306 | "\nN may be suffixed by k (x1024), b (x512), or m (x1024^2)." \ | ||
1307 | "\nIf N starts with a '+', output begins with the Nth item from the start" \ | ||
1308 | "\nof each file, not from the end." \ | ||
1309 | ) \ | ||
1310 | |||
1311 | #define tail_example_usage \ | ||
1312 | "$ tail -n 1 /etc/resolv.conf\n" \ | ||
1313 | "nameserver 10.0.0.1\n" | ||
1314 | |||
1315 | #define hexdump_trivial_usage \ | 864 | #define hexdump_trivial_usage \ |
1316 | "[-bcCdefnosvx" IF_FEATURE_HEXDUMP_REVERSE("R") "] [FILE]..." | 865 | "[-bcCdefnosvx" IF_FEATURE_HEXDUMP_REVERSE("R") "] [FILE]..." |
1317 | #define hexdump_full_usage "\n\n" \ | 866 | #define hexdump_full_usage "\n\n" \ |
@@ -1336,11 +885,6 @@ INSERT | |||
1336 | #define hd_full_usage "\n\n" \ | 885 | #define hd_full_usage "\n\n" \ |
1337 | "hd is an alias for hexdump -C" | 886 | "hd is an alias for hexdump -C" |
1338 | 887 | ||
1339 | #define hostid_trivial_usage \ | ||
1340 | "" | ||
1341 | #define hostid_full_usage "\n\n" \ | ||
1342 | "Print out a unique 32-bit identifier for the machine" | ||
1343 | |||
1344 | #define hostname_trivial_usage \ | 888 | #define hostname_trivial_usage \ |
1345 | "[OPTIONS] [HOSTNAME | -F FILE]" | 889 | "[OPTIONS] [HOSTNAME | -F FILE]" |
1346 | #define hostname_full_usage "\n\n" \ | 890 | #define hostname_full_usage "\n\n" \ |
@@ -1385,24 +929,6 @@ INSERT | |||
1385 | "\n -e STRING HTML encode STRING" \ | 929 | "\n -e STRING HTML encode STRING" \ |
1386 | "\n -d STRING URL decode STRING" \ | 930 | "\n -d STRING URL decode STRING" \ |
1387 | 931 | ||
1388 | #define id_trivial_usage \ | ||
1389 | "[OPTIONS] [USER]" | ||
1390 | #define id_full_usage "\n\n" \ | ||
1391 | "Print information about USER or the current user\n" \ | ||
1392 | "\nOptions:" \ | ||
1393 | IF_SELINUX( \ | ||
1394 | "\n -Z Security context" \ | ||
1395 | ) \ | ||
1396 | "\n -u User ID" \ | ||
1397 | "\n -g Group ID" \ | ||
1398 | "\n -G Supplementary group IDs" \ | ||
1399 | "\n -n Print names instead of numbers" \ | ||
1400 | "\n -r Print real ID instead of effective ID" \ | ||
1401 | |||
1402 | #define id_example_usage \ | ||
1403 | "$ id\n" \ | ||
1404 | "uid=1000(andersen) gid=1000(andersen)\n" | ||
1405 | |||
1406 | #define ifconfig_trivial_usage \ | 932 | #define ifconfig_trivial_usage \ |
1407 | IF_FEATURE_IFCONFIG_STATUS("[-a]") " interface [address]" | 933 | IF_FEATURE_IFCONFIG_STATUS("[-a]") " interface [address]" |
1408 | #define ifconfig_full_usage "\n\n" \ | 934 | #define ifconfig_full_usage "\n\n" \ |
@@ -1542,24 +1068,6 @@ INSERT | |||
1542 | "\ninotifyd waits for PROG to exit." \ | 1068 | "\ninotifyd waits for PROG to exit." \ |
1543 | "\nWhen x event happens for all FILEs, inotifyd exits." \ | 1069 | "\nWhen x event happens for all FILEs, inotifyd exits." \ |
1544 | 1070 | ||
1545 | /* -v, -b, -c are ignored */ | ||
1546 | #define install_trivial_usage \ | ||
1547 | "[-cdDsp] [-o USER] [-g GRP] [-m MODE] [SOURCE]... DEST" | ||
1548 | #define install_full_usage "\n\n" \ | ||
1549 | "Copy files and set attributes\n" \ | ||
1550 | "\nOptions:" \ | ||
1551 | "\n -c Just copy (default)" \ | ||
1552 | "\n -d Create directories" \ | ||
1553 | "\n -D Create leading target directories" \ | ||
1554 | "\n -s Strip symbol table" \ | ||
1555 | "\n -p Preserve date" \ | ||
1556 | "\n -o USER Set ownership" \ | ||
1557 | "\n -g GRP Set group ownership" \ | ||
1558 | "\n -m MODE Set permissions" \ | ||
1559 | IF_SELINUX( \ | ||
1560 | "\n -Z Set security context" \ | ||
1561 | ) | ||
1562 | |||
1563 | /* would need to make the " | " optional depending on more than one selected: */ | 1071 | /* would need to make the " | " optional depending on more than one selected: */ |
1564 | #define ip_trivial_usage \ | 1072 | #define ip_trivial_usage \ |
1565 | "[OPTIONS] {" \ | 1073 | "[OPTIONS] {" \ |
@@ -1732,15 +1240,6 @@ INSERT | |||
1732 | "\n -c N Only messages with level < N are printed to console" \ | 1240 | "\n -c N Only messages with level < N are printed to console" \ |
1733 | "\n -n Run in foreground" \ | 1241 | "\n -n Run in foreground" \ |
1734 | 1242 | ||
1735 | #define length_trivial_usage \ | ||
1736 | "STRING" | ||
1737 | #define length_full_usage "\n\n" \ | ||
1738 | "Print STRING's length" | ||
1739 | |||
1740 | #define length_example_usage \ | ||
1741 | "$ length Hello\n" \ | ||
1742 | "5\n" | ||
1743 | |||
1744 | #define less_trivial_usage \ | 1243 | #define less_trivial_usage \ |
1745 | "[-EMNmh~I?] [FILE]..." | 1244 | "[-EMNmh~I?] [FILE]..." |
1746 | #define less_full_usage "\n\n" \ | 1245 | #define less_full_usage "\n\n" \ |
@@ -1765,22 +1264,6 @@ INSERT | |||
1765 | " linux32 Set 32bit uname emulation\n" \ | 1264 | " linux32 Set 32bit uname emulation\n" \ |
1766 | " linux64 Set 64bit uname emulation" \ | 1265 | " linux64 Set 64bit uname emulation" \ |
1767 | 1266 | ||
1768 | #define ln_trivial_usage \ | ||
1769 | "[OPTIONS] TARGET... LINK|DIR" | ||
1770 | #define ln_full_usage "\n\n" \ | ||
1771 | "Create a link LINK or DIR/TARGET to the specified TARGET(s)\n" \ | ||
1772 | "\nOptions:" \ | ||
1773 | "\n -s Make symlinks instead of hardlinks" \ | ||
1774 | "\n -f Remove existing destinations" \ | ||
1775 | "\n -n Don't dereference symlinks - treat like normal file" \ | ||
1776 | "\n -b Make a backup of the target (if exists) before link operation" \ | ||
1777 | "\n -S suf Use suffix instead of ~ when making backup files" \ | ||
1778 | |||
1779 | #define ln_example_usage \ | ||
1780 | "$ ln -s BusyBox /tmp/ls\n" \ | ||
1781 | "$ ls -l /tmp/ls\n" \ | ||
1782 | "lrwxrwxrwx 1 root root 7 Apr 12 18:39 ls -> BusyBox*\n" | ||
1783 | |||
1784 | #define load_policy_trivial_usage NOUSAGE_STR | 1267 | #define load_policy_trivial_usage NOUSAGE_STR |
1785 | #define load_policy_full_usage "" | 1268 | #define load_policy_full_usage "" |
1786 | 1269 | ||
@@ -1805,14 +1288,6 @@ INSERT | |||
1805 | "\n -h Name of the remote host" \ | 1288 | "\n -h Name of the remote host" \ |
1806 | "\n -p Preserve environment" \ | 1289 | "\n -p Preserve environment" \ |
1807 | 1290 | ||
1808 | #define logname_trivial_usage \ | ||
1809 | "" | ||
1810 | #define logname_full_usage "\n\n" \ | ||
1811 | "Print the name of the current user" | ||
1812 | #define logname_example_usage \ | ||
1813 | "$ logname\n" \ | ||
1814 | "root\n" | ||
1815 | |||
1816 | #define logread_trivial_usage \ | 1291 | #define logread_trivial_usage \ |
1817 | "[-f]" | 1292 | "[-f]" |
1818 | #define logread_full_usage "\n\n" \ | 1293 | #define logread_full_usage "\n\n" \ |
@@ -1981,64 +1456,6 @@ INSERT | |||
1981 | "\n -p Use prefix to speed translations" \ | 1456 | "\n -p Use prefix to speed translations" \ |
1982 | "\n -V Verify file context on disk matches defaults" \ | 1457 | "\n -V Verify file context on disk matches defaults" \ |
1983 | 1458 | ||
1984 | #define md5sum_trivial_usage \ | ||
1985 | "[FILE]..." \ | ||
1986 | IF_FEATURE_MD5_SHA1_SUM_CHECK("\n or: md5sum -c [-sw] [FILE]") | ||
1987 | #define md5sum_full_usage "\n\n" \ | ||
1988 | "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " MD5 checksums" \ | ||
1989 | IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \ | ||
1990 | "\nOptions:" \ | ||
1991 | "\n -c Check sums against given list" \ | ||
1992 | "\n -s Don't output anything, status code shows success" \ | ||
1993 | "\n -w Warn about improperly formatted checksum lines" \ | ||
1994 | ) | ||
1995 | |||
1996 | #define md5sum_example_usage \ | ||
1997 | "$ md5sum < busybox\n" \ | ||
1998 | "6fd11e98b98a58f64ff3398d7b324003\n" \ | ||
1999 | "$ md5sum busybox\n" \ | ||
2000 | "6fd11e98b98a58f64ff3398d7b324003 busybox\n" \ | ||
2001 | "$ md5sum -c -\n" \ | ||
2002 | "6fd11e98b98a58f64ff3398d7b324003 busybox\n" \ | ||
2003 | "busybox: OK\n" \ | ||
2004 | "^D\n" | ||
2005 | |||
2006 | #define sha1sum_trivial_usage \ | ||
2007 | "[FILE]..." \ | ||
2008 | IF_FEATURE_MD5_SHA1_SUM_CHECK("\n or: sha1sum -c [-sw] [FILE]") | ||
2009 | #define sha1sum_full_usage "\n\n" \ | ||
2010 | "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA1 checksums" \ | ||
2011 | IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \ | ||
2012 | "\nOptions:" \ | ||
2013 | "\n -c Check sums against given list" \ | ||
2014 | "\n -s Don't output anything, status code shows success" \ | ||
2015 | "\n -w Warn about improperly formatted checksum lines" \ | ||
2016 | ) | ||
2017 | |||
2018 | #define sha256sum_trivial_usage \ | ||
2019 | "[FILE]..." \ | ||
2020 | IF_FEATURE_MD5_SHA1_SUM_CHECK("\n or: sha256sum -c [-sw] [FILE]") | ||
2021 | #define sha256sum_full_usage "\n\n" \ | ||
2022 | "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA256 checksums" \ | ||
2023 | IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \ | ||
2024 | "\nOptions:" \ | ||
2025 | "\n -c Check sums against given list" \ | ||
2026 | "\n -s Don't output anything, status code shows success" \ | ||
2027 | "\n -w Warn about improperly formatted checksum lines" \ | ||
2028 | ) | ||
2029 | |||
2030 | #define sha512sum_trivial_usage \ | ||
2031 | "[FILE]..." \ | ||
2032 | IF_FEATURE_MD5_SHA1_SUM_CHECK("\n or: sha512sum -c [-sw] [FILE]") | ||
2033 | #define sha512sum_full_usage "\n\n" \ | ||
2034 | "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA512 checksums" \ | ||
2035 | IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \ | ||
2036 | "\nOptions:" \ | ||
2037 | "\n -c Check sums against given list" \ | ||
2038 | "\n -s Don't output anything, status code shows success" \ | ||
2039 | "\n -w Warn about improperly formatted checksum lines" \ | ||
2040 | ) | ||
2041 | |||
2042 | #define mdev_trivial_usage \ | 1459 | #define mdev_trivial_usage \ |
2043 | "[-s]" | 1460 | "[-s]" |
2044 | #define mdev_full_usage "\n\n" \ | 1461 | #define mdev_full_usage "\n\n" \ |
@@ -2084,35 +1501,6 @@ INSERT | |||
2084 | "\n -s Set serial line to SPEED" \ | 1501 | "\n -s Set serial line to SPEED" \ |
2085 | "\n -X Disable special meaning of NUL and Ctrl-X from stdin" \ | 1502 | "\n -X Disable special meaning of NUL and Ctrl-X from stdin" \ |
2086 | 1503 | ||
2087 | #define mkdir_trivial_usage \ | ||
2088 | "[OPTIONS] DIRECTORY..." | ||
2089 | #define mkdir_full_usage "\n\n" \ | ||
2090 | "Create DIRECTORY\n" \ | ||
2091 | "\nOptions:" \ | ||
2092 | "\n -m MODE Mode" \ | ||
2093 | "\n -p No error if exists; make parent directories as needed" \ | ||
2094 | IF_SELINUX( \ | ||
2095 | "\n -Z Set security context" \ | ||
2096 | ) | ||
2097 | |||
2098 | #define mkdir_example_usage \ | ||
2099 | "$ mkdir /tmp/foo\n" \ | ||
2100 | "$ mkdir /tmp/foo\n" \ | ||
2101 | "/tmp/foo: File exists\n" \ | ||
2102 | "$ mkdir /tmp/foo/bar/baz\n" \ | ||
2103 | "/tmp/foo/bar/baz: No such file or directory\n" \ | ||
2104 | "$ mkdir -p /tmp/foo/bar/baz\n" | ||
2105 | |||
2106 | #define mkfifo_trivial_usage \ | ||
2107 | "[-m MODE] " IF_SELINUX("[-Z] ") "NAME" | ||
2108 | #define mkfifo_full_usage "\n\n" \ | ||
2109 | "Create named pipe\n" \ | ||
2110 | "\nOptions:" \ | ||
2111 | "\n -m MODE Mode (default a=rw)" \ | ||
2112 | IF_SELINUX( \ | ||
2113 | "\n -Z Set security context" \ | ||
2114 | ) | ||
2115 | |||
2116 | #define mkfs_ext2_trivial_usage \ | 1504 | #define mkfs_ext2_trivial_usage \ |
2117 | "[-Fn] " \ | 1505 | "[-Fn] " \ |
2118 | /* "[-c|-l filename] " */ \ | 1506 | /* "[-c|-l filename] " */ \ |
@@ -2187,24 +1575,6 @@ INSERT | |||
2187 | /* "\n -I Allow to use entire disk device (e.g. /dev/hda)" */ \ | 1575 | /* "\n -I Allow to use entire disk device (e.g. /dev/hda)" */ \ |
2188 | "\n -n LBL Volume label" \ | 1576 | "\n -n LBL Volume label" \ |
2189 | 1577 | ||
2190 | #define mknod_trivial_usage \ | ||
2191 | "[-m MODE] " IF_SELINUX("[-Z] ") "NAME TYPE MAJOR MINOR" | ||
2192 | #define mknod_full_usage "\n\n" \ | ||
2193 | "Create a special file (block, character, or pipe)\n" \ | ||
2194 | "\nOptions:" \ | ||
2195 | "\n -m MODE Creation mode (default a=rw)" \ | ||
2196 | IF_SELINUX( \ | ||
2197 | "\n -Z Set security context" \ | ||
2198 | ) \ | ||
2199 | "\nTYPE:" \ | ||
2200 | "\n b Block device" \ | ||
2201 | "\n c or u Character device" \ | ||
2202 | "\n p Named pipe (MAJOR and MINOR are ignored)" \ | ||
2203 | |||
2204 | #define mknod_example_usage \ | ||
2205 | "$ mknod /dev/fd0 b 2 0\n" \ | ||
2206 | "$ mknod -m 644 /tmp/pipe p\n" | ||
2207 | |||
2208 | #define mkswap_trivial_usage \ | 1578 | #define mkswap_trivial_usage \ |
2209 | "[-L LBL] BLOCKDEV [KBYTES]" | 1579 | "[-L LBL] BLOCKDEV [KBYTES]" |
2210 | #define mkswap_full_usage "\n\n" \ | 1580 | #define mkswap_full_usage "\n\n" \ |
@@ -2307,13 +1677,6 @@ INSERT | |||
2307 | "ras3 reset retension rewind rewoffline seek setblk setdensity\n" \ | 1677 | "ras3 reset retension rewind rewoffline seek setblk setdensity\n" \ |
2308 | "setpart tell unload unlock weof wset" \ | 1678 | "setpart tell unload unlock weof wset" \ |
2309 | 1679 | ||
2310 | #define nohup_trivial_usage \ | ||
2311 | "PROG ARGS" | ||
2312 | #define nohup_full_usage "\n\n" \ | ||
2313 | "Run PROG immune to hangups, with output to a non-tty" | ||
2314 | #define nohup_example_usage \ | ||
2315 | "$ nohup make &" | ||
2316 | |||
2317 | #define nslookup_trivial_usage \ | 1680 | #define nslookup_trivial_usage \ |
2318 | "[HOST] [SERVER]" | 1681 | "[HOST] [SERVER]" |
2319 | #define nslookup_full_usage "\n\n" \ | 1682 | #define nslookup_full_usage "\n\n" \ |
@@ -2343,12 +1706,6 @@ INSERT | |||
2343 | "\n -S PROG Run PROG after stepping time, stratum change, and every 11 mins" \ | 1706 | "\n -S PROG Run PROG after stepping time, stratum change, and every 11 mins" \ |
2344 | "\n -p PEER Obtain time from PEER (may be repeated)" \ | 1707 | "\n -p PEER Obtain time from PEER (may be repeated)" \ |
2345 | 1708 | ||
2346 | #define od_trivial_usage \ | ||
2347 | "[-aBbcDdeFfHhIiLlOovXx] " IF_DESKTOP("[-t TYPE] ") "[FILE]" | ||
2348 | #define od_full_usage "\n\n" \ | ||
2349 | "Write an unambiguous representation, octal bytes by default, of FILE\n" \ | ||
2350 | "(or stdin) to stdout" | ||
2351 | |||
2352 | /* | 1709 | /* |
2353 | #define parse_trivial_usage \ | 1710 | #define parse_trivial_usage \ |
2354 | "[-n MAXTOKENS] [-m MINTOKENS] [-d DELIMS] [-f FLAGS] FILE..." | 1711 | "[-n MAXTOKENS] [-m MINTOKENS] [-d DELIMS] [-f FLAGS] FILE..." |
@@ -2477,21 +1834,6 @@ INSERT | |||
2477 | "$ popmaildir -k ~/Maildir -- nc pop.drvv.ru 110 [<password_file]\n" \ | 1834 | "$ popmaildir -k ~/Maildir -- nc pop.drvv.ru 110 [<password_file]\n" \ |
2478 | "$ popmaildir ~/Maildir -- openssl s_client -quiet -connect pop.gmail.com:995 [<password_file]\n" | 1835 | "$ popmaildir ~/Maildir -- openssl s_client -quiet -connect pop.gmail.com:995 [<password_file]\n" |
2479 | 1836 | ||
2480 | #define printenv_trivial_usage \ | ||
2481 | "[VARIABLE]..." | ||
2482 | #define printenv_full_usage "\n\n" \ | ||
2483 | "Print environment VARIABLEs.\n" \ | ||
2484 | "If no VARIABLE specified, print all." | ||
2485 | |||
2486 | #define printf_trivial_usage \ | ||
2487 | "FORMAT [ARGUMENT]..." | ||
2488 | #define printf_full_usage "\n\n" \ | ||
2489 | "Format and print ARGUMENT(s) according to FORMAT,\n" \ | ||
2490 | "where FORMAT controls the output exactly as in C printf" | ||
2491 | #define printf_example_usage \ | ||
2492 | "$ printf \"Val=%d\\n\" 5\n" \ | ||
2493 | "Val=5\n" | ||
2494 | |||
2495 | 1837 | ||
2496 | #if ENABLE_DESKTOP | 1838 | #if ENABLE_DESKTOP |
2497 | 1839 | ||
@@ -2552,14 +1894,6 @@ INSERT | |||
2552 | "\n -t Timeout (default 5000 ms)" \ | 1894 | "\n -t Timeout (default 5000 ms)" \ |
2553 | "\n -T Minimum rtt (default 5 ms, increase for congested hosts)" \ | 1895 | "\n -T Minimum rtt (default 5 ms, increase for congested hosts)" \ |
2554 | 1896 | ||
2555 | #define pwd_trivial_usage \ | ||
2556 | "" | ||
2557 | #define pwd_full_usage "\n\n" \ | ||
2558 | "Print the full filename of the current working directory" | ||
2559 | #define pwd_example_usage \ | ||
2560 | "$ pwd\n" \ | ||
2561 | "/root\n" | ||
2562 | |||
2563 | #define raidautorun_trivial_usage \ | 1897 | #define raidautorun_trivial_usage \ |
2564 | "DEVICE" | 1898 | "DEVICE" |
2565 | #define raidautorun_full_usage "\n\n" \ | 1899 | #define raidautorun_full_usage "\n\n" \ |
@@ -2588,17 +1922,6 @@ INSERT | |||
2588 | #define readahead_full_usage "\n\n" \ | 1922 | #define readahead_full_usage "\n\n" \ |
2589 | "Preload FILEs to RAM" | 1923 | "Preload FILEs to RAM" |
2590 | 1924 | ||
2591 | #define readlink_trivial_usage \ | ||
2592 | IF_FEATURE_READLINK_FOLLOW("[-fnv] ") "FILE" | ||
2593 | #define readlink_full_usage "\n\n" \ | ||
2594 | "Display the value of a symlink" \ | ||
2595 | IF_FEATURE_READLINK_FOLLOW( "\n" \ | ||
2596 | "\nOptions:" \ | ||
2597 | "\n -f Canonicalize by following all symlinks" \ | ||
2598 | "\n -n Don't add newline" \ | ||
2599 | "\n -v Verbose" \ | ||
2600 | ) \ | ||
2601 | |||
2602 | #define readprofile_trivial_usage \ | 1925 | #define readprofile_trivial_usage \ |
2603 | "[OPTIONS]" | 1926 | "[OPTIONS]" |
2604 | #define readprofile_full_usage "\n\n" \ | 1927 | #define readprofile_full_usage "\n\n" \ |
@@ -2614,11 +1937,6 @@ INSERT | |||
2614 | "\n -r Reset all the counters (root only)" \ | 1937 | "\n -r Reset all the counters (root only)" \ |
2615 | "\n -n Disable byte order auto-detection" \ | 1938 | "\n -n Disable byte order auto-detection" \ |
2616 | 1939 | ||
2617 | #define realpath_trivial_usage \ | ||
2618 | "FILE..." | ||
2619 | #define realpath_full_usage "\n\n" \ | ||
2620 | "Return the absolute pathnames of given FILE" | ||
2621 | |||
2622 | #define reformime_trivial_usage \ | 1940 | #define reformime_trivial_usage \ |
2623 | "[OPTIONS] [FILE]..." | 1941 | "[OPTIONS] [FILE]..." |
2624 | #define reformime_full_usage "\n\n" \ | 1942 | #define reformime_full_usage "\n\n" \ |
@@ -2663,34 +1981,6 @@ INSERT | |||
2663 | "\n TYPE: all, wlan(wifi), bluetooth, uwb(ultrawideband)," \ | 1981 | "\n TYPE: all, wlan(wifi), bluetooth, uwb(ultrawideband)," \ |
2664 | "\n wimax, wwan, gps, fm" \ | 1982 | "\n wimax, wwan, gps, fm" \ |
2665 | 1983 | ||
2666 | #define rm_trivial_usage \ | ||
2667 | "[-irf] FILE..." | ||
2668 | #define rm_full_usage "\n\n" \ | ||
2669 | "Remove (unlink) FILEs\n" \ | ||
2670 | "\nOptions:" \ | ||
2671 | "\n -i Always prompt before removing" \ | ||
2672 | "\n -f Never prompt" \ | ||
2673 | "\n -R,-r Recurse" \ | ||
2674 | |||
2675 | #define rm_example_usage \ | ||
2676 | "$ rm -rf /tmp/foo\n" | ||
2677 | |||
2678 | #define rmdir_trivial_usage \ | ||
2679 | "[OPTIONS] DIRECTORY..." | ||
2680 | #define rmdir_full_usage "\n\n" \ | ||
2681 | "Remove DIRECTORY if it is empty\n" \ | ||
2682 | "\nOptions:" \ | ||
2683 | IF_FEATURE_RMDIR_LONG_OPTIONS( \ | ||
2684 | "\n -p|--parents Include parents" \ | ||
2685 | "\n --ignore-fail-on-non-empty" \ | ||
2686 | ) \ | ||
2687 | IF_NOT_FEATURE_RMDIR_LONG_OPTIONS( \ | ||
2688 | "\n -p Include parents" \ | ||
2689 | ) | ||
2690 | |||
2691 | #define rmdir_example_usage \ | ||
2692 | "# rmdir /tmp/foo\n" | ||
2693 | |||
2694 | #define route_trivial_usage \ | 1984 | #define route_trivial_usage \ |
2695 | "[{add|del|delete}]" | 1985 | "[{add|del|delete}]" |
2696 | #define route_full_usage "\n\n" \ | 1986 | #define route_full_usage "\n\n" \ |
@@ -2832,15 +2122,6 @@ INSERT | |||
2832 | #define selinuxenabled_trivial_usage NOUSAGE_STR | 2122 | #define selinuxenabled_trivial_usage NOUSAGE_STR |
2833 | #define selinuxenabled_full_usage "" | 2123 | #define selinuxenabled_full_usage "" |
2834 | 2124 | ||
2835 | #define seq_trivial_usage \ | ||
2836 | "[-w] [-s SEP] [FIRST [INC]] LAST" | ||
2837 | #define seq_full_usage "\n\n" \ | ||
2838 | "Print numbers from FIRST to LAST, in steps of INC.\n" \ | ||
2839 | "FIRST, INC default to 1.\n" \ | ||
2840 | "\nOptions:" \ | ||
2841 | "\n -w Pad to last with leading zeros" \ | ||
2842 | "\n -s SEP String separator" \ | ||
2843 | |||
2844 | #define sestatus_trivial_usage \ | 2125 | #define sestatus_trivial_usage \ |
2845 | "[-vb]" | 2126 | "[-vb]" |
2846 | #define sestatus_full_usage "\n\n" \ | 2127 | #define sestatus_full_usage "\n\n" \ |
@@ -2924,80 +2205,6 @@ INSERT | |||
2924 | "\n -L Enable 3-wire operation" \ | 2205 | "\n -L Enable 3-wire operation" \ |
2925 | "\n -F Disable RTS/CTS flow control" \ | 2206 | "\n -F Disable RTS/CTS flow control" \ |
2926 | 2207 | ||
2927 | #define sleep_trivial_usage \ | ||
2928 | IF_FEATURE_FANCY_SLEEP("[") "N" IF_FEATURE_FANCY_SLEEP("]...") | ||
2929 | #define sleep_full_usage "\n\n" \ | ||
2930 | IF_NOT_FEATURE_FANCY_SLEEP("Pause for N seconds") \ | ||
2931 | IF_FEATURE_FANCY_SLEEP( \ | ||
2932 | "Pause for a time equal to the total of the args given, where each arg can\n" \ | ||
2933 | "have an optional suffix of (s)econds, (m)inutes, (h)ours, or (d)ays") | ||
2934 | #define sleep_example_usage \ | ||
2935 | "$ sleep 2\n" \ | ||
2936 | "[2 second delay results]\n" \ | ||
2937 | IF_FEATURE_FANCY_SLEEP( \ | ||
2938 | "$ sleep 1d 3h 22m 8s\n" \ | ||
2939 | "[98528 second delay results]\n") | ||
2940 | |||
2941 | #define sort_trivial_usage \ | ||
2942 | "[-nru" \ | ||
2943 | IF_FEATURE_SORT_BIG("gMcszbdfimSTokt] [-o FILE] [-k start[.offset][opts][,end[.offset][opts]] [-t CHAR") \ | ||
2944 | "] [FILE]..." | ||
2945 | #define sort_full_usage "\n\n" \ | ||
2946 | "Sort lines of text\n" \ | ||
2947 | "\nOptions:" \ | ||
2948 | IF_FEATURE_SORT_BIG( \ | ||
2949 | "\n -b Ignore leading blanks" \ | ||
2950 | "\n -c Check whether input is sorted" \ | ||
2951 | "\n -d Dictionary order (blank or alphanumeric only)" \ | ||
2952 | "\n -f Ignore case" \ | ||
2953 | "\n -g General numerical sort" \ | ||
2954 | "\n -i Ignore unprintable characters" \ | ||
2955 | "\n -k Sort key" \ | ||
2956 | "\n -M Sort month" \ | ||
2957 | ) \ | ||
2958 | "\n -n Sort numbers" \ | ||
2959 | IF_FEATURE_SORT_BIG( \ | ||
2960 | "\n -o Output to file" \ | ||
2961 | "\n -k Sort by key" \ | ||
2962 | "\n -t CHAR Key separator" \ | ||
2963 | ) \ | ||
2964 | "\n -r Reverse sort order" \ | ||
2965 | IF_FEATURE_SORT_BIG( \ | ||
2966 | "\n -s Stable (don't sort ties alphabetically)" \ | ||
2967 | ) \ | ||
2968 | "\n -u Suppress duplicate lines" \ | ||
2969 | IF_FEATURE_SORT_BIG( \ | ||
2970 | "\n -z Lines are terminated by NUL, not newline" \ | ||
2971 | "\n -mST Ignored for GNU compatibility") \ | ||
2972 | |||
2973 | #define sort_example_usage \ | ||
2974 | "$ echo -e \"e\\nf\\nb\\nd\\nc\\na\" | sort\n" \ | ||
2975 | "a\n" \ | ||
2976 | "b\n" \ | ||
2977 | "c\n" \ | ||
2978 | "d\n" \ | ||
2979 | "e\n" \ | ||
2980 | "f\n" \ | ||
2981 | IF_FEATURE_SORT_BIG( \ | ||
2982 | "$ echo -e \"c 3\\nb 2\\nd 2\" | $SORT -k 2,2n -k 1,1r\n" \ | ||
2983 | "d 2\n" \ | ||
2984 | "b 2\n" \ | ||
2985 | "c 3\n" \ | ||
2986 | ) \ | ||
2987 | "" | ||
2988 | |||
2989 | #define split_trivial_usage \ | ||
2990 | "[OPTIONS] [INPUT [PREFIX]]" | ||
2991 | #define split_full_usage "\n\n" \ | ||
2992 | "Options:" \ | ||
2993 | "\n -b N[k|m] Split by N (kilo|mega)bytes" \ | ||
2994 | "\n -l N Split by N lines" \ | ||
2995 | "\n -a N Use N letters as suffix" \ | ||
2996 | |||
2997 | #define split_example_usage \ | ||
2998 | "$ split TODO foo\n" \ | ||
2999 | "$ cat TODO | split -a 2 -l 2 TODO_\n" | ||
3000 | |||
3001 | #define start_stop_daemon_trivial_usage \ | 2208 | #define start_stop_daemon_trivial_usage \ |
3002 | "[OPTIONS] [-S|-K] ... [-- ARGS...]" | 2209 | "[OPTIONS] [-S|-K] ... [-- ARGS...]" |
3003 | #define start_stop_daemon_full_usage "\n\n" \ | 2210 | #define start_stop_daemon_full_usage "\n\n" \ |
@@ -3061,66 +2268,6 @@ INSERT | |||
3061 | "\n -q Quiet" \ | 2268 | "\n -q Quiet" \ |
3062 | ) \ | 2269 | ) \ |
3063 | 2270 | ||
3064 | #define stat_trivial_usage \ | ||
3065 | "[OPTIONS] FILE..." | ||
3066 | #define stat_full_usage "\n\n" \ | ||
3067 | "Display file (default) or filesystem status\n" \ | ||
3068 | "\nOptions:" \ | ||
3069 | IF_FEATURE_STAT_FORMAT( \ | ||
3070 | "\n -c fmt Use the specified format" \ | ||
3071 | ) \ | ||
3072 | "\n -f Display filesystem status" \ | ||
3073 | "\n -L Follow links" \ | ||
3074 | "\n -t Display info in terse form" \ | ||
3075 | IF_SELINUX( \ | ||
3076 | "\n -Z Print security context" \ | ||
3077 | ) \ | ||
3078 | IF_FEATURE_STAT_FORMAT( \ | ||
3079 | "\n\nValid format sequences for files:\n" \ | ||
3080 | " %a Access rights in octal\n" \ | ||
3081 | " %A Access rights in human readable form\n" \ | ||
3082 | " %b Number of blocks allocated (see %B)\n" \ | ||
3083 | " %B The size in bytes of each block reported by %b\n" \ | ||
3084 | " %d Device number in decimal\n" \ | ||
3085 | " %D Device number in hex\n" \ | ||
3086 | " %f Raw mode in hex\n" \ | ||
3087 | " %F File type\n" \ | ||
3088 | " %g Group ID of owner\n" \ | ||
3089 | " %G Group name of owner\n" \ | ||
3090 | " %h Number of hard links\n" \ | ||
3091 | " %i Inode number\n" \ | ||
3092 | " %n File name\n" \ | ||
3093 | " %N File name, with -> TARGET if symlink\n" \ | ||
3094 | " %o I/O block size\n" \ | ||
3095 | " %s Total size, in bytes\n" \ | ||
3096 | " %t Major device type in hex\n" \ | ||
3097 | " %T Minor device type in hex\n" \ | ||
3098 | " %u User ID of owner\n" \ | ||
3099 | " %U User name of owner\n" \ | ||
3100 | " %x Time of last access\n" \ | ||
3101 | " %X Time of last access as seconds since Epoch\n" \ | ||
3102 | " %y Time of last modification\n" \ | ||
3103 | " %Y Time of last modification as seconds since Epoch\n" \ | ||
3104 | " %z Time of last change\n" \ | ||
3105 | " %Z Time of last change as seconds since Epoch\n" \ | ||
3106 | "\nValid format sequences for file systems:\n" \ | ||
3107 | " %a Free blocks available to non-superuser\n" \ | ||
3108 | " %b Total data blocks in file system\n" \ | ||
3109 | " %c Total file nodes in file system\n" \ | ||
3110 | " %d Free file nodes in file system\n" \ | ||
3111 | " %f Free blocks in file system\n" \ | ||
3112 | IF_SELINUX( \ | ||
3113 | " %C Security context in selinux\n" \ | ||
3114 | ) \ | ||
3115 | " %i File System ID in hex\n" \ | ||
3116 | " %l Maximum length of filenames\n" \ | ||
3117 | " %n File name\n" \ | ||
3118 | " %s Block size (for faster transfer)\n" \ | ||
3119 | " %S Fundamental block size (for block counts)\n" \ | ||
3120 | " %t Type in hex\n" \ | ||
3121 | " %T Type in human readable form" \ | ||
3122 | ) \ | ||
3123 | |||
3124 | #define strings_trivial_usage \ | 2271 | #define strings_trivial_usage \ |
3125 | "[-afo] [-n LEN] [FILE]..." | 2272 | "[-afo] [-n LEN] [FILE]..." |
3126 | #define strings_full_usage "\n\n" \ | 2273 | #define strings_full_usage "\n\n" \ |
@@ -3131,17 +2278,6 @@ INSERT | |||
3131 | "\n -n LEN At least LEN characters form a string (default 4)" \ | 2278 | "\n -n LEN At least LEN characters form a string (default 4)" \ |
3132 | "\n -o Precede strings with decimal offsets" \ | 2279 | "\n -o Precede strings with decimal offsets" \ |
3133 | 2280 | ||
3134 | #define stty_trivial_usage \ | ||
3135 | "[-a|g] [-F DEVICE] [SETTING]..." | ||
3136 | #define stty_full_usage "\n\n" \ | ||
3137 | "Without arguments, prints baud rate, line discipline,\n" \ | ||
3138 | "and deviations from stty sane\n" \ | ||
3139 | "\nOptions:" \ | ||
3140 | "\n -F DEVICE Open device instead of stdin" \ | ||
3141 | "\n -a Print all current settings in human-readable form" \ | ||
3142 | "\n -g Print in stty-readable form" \ | ||
3143 | "\n [SETTING] See manpage" \ | ||
3144 | |||
3145 | #define sulogin_trivial_usage \ | 2281 | #define sulogin_trivial_usage \ |
3146 | "[-t N] [TTY]" | 2282 | "[-t N] [TTY]" |
3147 | #define sulogin_full_usage "\n\n" \ | 2283 | #define sulogin_full_usage "\n\n" \ |
@@ -3149,14 +2285,6 @@ INSERT | |||
3149 | "\nOptions:" \ | 2285 | "\nOptions:" \ |
3150 | "\n -t N Timeout" \ | 2286 | "\n -t N Timeout" \ |
3151 | 2287 | ||
3152 | #define sum_trivial_usage \ | ||
3153 | "[-rs] [FILE]..." | ||
3154 | #define sum_full_usage "\n\n" \ | ||
3155 | "Checksum and count the blocks in a file\n" \ | ||
3156 | "\nOptions:" \ | ||
3157 | "\n -r Use BSD sum algorithm (1K blocks)" \ | ||
3158 | "\n -s Use System V sum algorithm (512byte blocks)" \ | ||
3159 | |||
3160 | #define sv_trivial_usage \ | 2288 | #define sv_trivial_usage \ |
3161 | "[-v] [-w SEC] CMD SERVICE_DIR..." | 2289 | "[-v] [-w SEC] CMD SERVICE_DIR..." |
3162 | #define sv_full_usage "\n\n" \ | 2290 | #define sv_full_usage "\n\n" \ |
@@ -3199,18 +2327,6 @@ INSERT | |||
3199 | "\nOptions:" \ | 2327 | "\nOptions:" \ |
3200 | "\n -c DEV Reopen stdio to DEV after switch" \ | 2328 | "\n -c DEV Reopen stdio to DEV after switch" \ |
3201 | 2329 | ||
3202 | #define sync_trivial_usage \ | ||
3203 | "" | ||
3204 | #define sync_full_usage "\n\n" \ | ||
3205 | "Write all buffered blocks to disk" | ||
3206 | |||
3207 | #define fsync_trivial_usage \ | ||
3208 | "[-d] FILE..." | ||
3209 | #define fsync_full_usage "\n\n" \ | ||
3210 | "Write files' buffered blocks to disk\n" \ | ||
3211 | "\nOptions:" \ | ||
3212 | "\n -d Avoid syncing metadata" | ||
3213 | |||
3214 | #define sysctl_trivial_usage \ | 2330 | #define sysctl_trivial_usage \ |
3215 | "[OPTIONS] [VALUE]..." | 2331 | "[OPTIONS] [VALUE]..." |
3216 | #define sysctl_full_usage "\n\n" \ | 2332 | #define sysctl_full_usage "\n\n" \ |
@@ -3257,11 +2373,6 @@ INSERT | |||
3257 | "$ syslogd -R masterlog:514\n" \ | 2373 | "$ syslogd -R masterlog:514\n" \ |
3258 | "$ syslogd -R 192.168.1.1:601\n" | 2374 | "$ syslogd -R 192.168.1.1:601\n" |
3259 | 2375 | ||
3260 | #define tac_trivial_usage \ | ||
3261 | "[FILE]..." | ||
3262 | #define tac_full_usage "\n\n" \ | ||
3263 | "Concatenate FILEs and print them in reverse" | ||
3264 | |||
3265 | #define taskset_trivial_usage \ | 2376 | #define taskset_trivial_usage \ |
3266 | "[-p] [MASK] [PID | PROG ARGS]" | 2377 | "[-p] [MASK] [PID | PROG ARGS]" |
3267 | #define taskset_full_usage "\n\n" \ | 2378 | #define taskset_full_usage "\n\n" \ |
@@ -3280,19 +2391,6 @@ INSERT | |||
3280 | "$ taskset -p 1\n" \ | 2391 | "$ taskset -p 1\n" \ |
3281 | "pid 1's current affinity mask: 3\n" | 2392 | "pid 1's current affinity mask: 3\n" |
3282 | 2393 | ||
3283 | #define tee_trivial_usage \ | ||
3284 | "[-ai] [FILE]..." | ||
3285 | #define tee_full_usage "\n\n" \ | ||
3286 | "Copy stdin to each FILE, and also to stdout\n" \ | ||
3287 | "\nOptions:" \ | ||
3288 | "\n -a Append to the given FILEs, don't overwrite" \ | ||
3289 | "\n -i Ignore interrupt signals (SIGINT)" \ | ||
3290 | |||
3291 | #define tee_example_usage \ | ||
3292 | "$ echo \"Hello\" | tee /tmp/foo\n" \ | ||
3293 | "$ cat /tmp/foo\n" \ | ||
3294 | "Hello\n" | ||
3295 | |||
3296 | #if ENABLE_FEATURE_TELNET_AUTOLOGIN | 2394 | #if ENABLE_FEATURE_TELNET_AUTOLOGIN |
3297 | #define telnet_trivial_usage \ | 2395 | #define telnet_trivial_usage \ |
3298 | "[-a] [-l USER] HOST [PORT]" | 2396 | "[-a] [-l USER] HOST [PORT]" |
@@ -3330,28 +2428,6 @@ INSERT | |||
3330 | ) \ | 2428 | ) \ |
3331 | ) | 2429 | ) |
3332 | 2430 | ||
3333 | /* "test --help" does not print help (POSIX compat), only "[ --help" does. | ||
3334 | * We display "<applet> EXPRESSION ]" here (not "<applet> EXPRESSION") | ||
3335 | * Unfortunately, it screws up generated BusyBox.html. TODO. */ | ||
3336 | #define test_trivial_usage \ | ||
3337 | "EXPRESSION ]" | ||
3338 | #define test_full_usage "\n\n" \ | ||
3339 | "Check file types, compare values etc. Return a 0/1 exit code\n" \ | ||
3340 | "depending on logical value of EXPRESSION" | ||
3341 | #define test_example_usage \ | ||
3342 | "$ test 1 -eq 2\n" \ | ||
3343 | "$ echo $?\n" \ | ||
3344 | "1\n" \ | ||
3345 | "$ test 1 -eq 1\n" \ | ||
3346 | "$ echo $?\n" \ | ||
3347 | "0\n" \ | ||
3348 | "$ [ -d /etc ]\n" \ | ||
3349 | "$ echo $?\n" \ | ||
3350 | "0\n" \ | ||
3351 | "$ [ -d /junk ]\n" \ | ||
3352 | "$ echo $?\n" \ | ||
3353 | "1\n" | ||
3354 | |||
3355 | #define tc_trivial_usage \ | 2431 | #define tc_trivial_usage \ |
3356 | /*"[OPTIONS] "*/"OBJECT CMD [dev STRING]" | 2432 | /*"[OPTIONS] "*/"OBJECT CMD [dev STRING]" |
3357 | #define tc_full_usage "\n\n" \ | 2433 | #define tc_full_usage "\n\n" \ |
@@ -3454,19 +2530,6 @@ INSERT | |||
3454 | "Runs PROG. Sends SIG to it if it is not gone in SECS seconds.\n" \ | 2530 | "Runs PROG. Sends SIG to it if it is not gone in SECS seconds.\n" \ |
3455 | "Defaults: SECS: 10, SIG: TERM." \ | 2531 | "Defaults: SECS: 10, SIG: TERM." \ |
3456 | 2532 | ||
3457 | #define tr_trivial_usage \ | ||
3458 | "[-cds] STRING1 [STRING2]" | ||
3459 | #define tr_full_usage "\n\n" \ | ||
3460 | "Translate, squeeze, or delete characters from stdin, writing to stdout\n" \ | ||
3461 | "\nOptions:" \ | ||
3462 | "\n -c Take complement of STRING1" \ | ||
3463 | "\n -d Delete input characters coded STRING1" \ | ||
3464 | "\n -s Squeeze multiple output characters of STRING2 into one character" \ | ||
3465 | |||
3466 | #define tr_example_usage \ | ||
3467 | "$ echo \"gdkkn vnqkc\" | tr [a-y] [b-z]\n" \ | ||
3468 | "hello world\n" | ||
3469 | |||
3470 | #define traceroute_trivial_usage \ | 2533 | #define traceroute_trivial_usage \ |
3471 | "[-"IF_TRACEROUTE6("46")"FIldnrv] [-f 1ST_TTL] [-m MAXTTL] [-p PORT] [-q PROBES]\n" \ | 2534 | "[-"IF_TRACEROUTE6("46")"FIldnrv] [-f 1ST_TTL] [-m MAXTTL] [-p PORT] [-q PROBES]\n" \ |
3472 | " [-s SRC_IP] [-t TOS] [-w WAIT_SEC] [-g GATEWAY] [-i IFACE]\n" \ | 2535 | " [-s SRC_IP] [-t TOS] [-w WAIT_SEC] [-g GATEWAY] [-i IFACE]\n" \ |
@@ -3512,27 +2575,6 @@ INSERT | |||
3512 | "\n -t Type-of-service in probe packets (default 0)" \ | 2575 | "\n -t Type-of-service in probe packets (default 0)" \ |
3513 | "\n -w Time in seconds to wait for a response (default 3)" \ | 2576 | "\n -w Time in seconds to wait for a response (default 3)" \ |
3514 | 2577 | ||
3515 | #define true_trivial_usage \ | ||
3516 | "" | ||
3517 | #define true_full_usage "\n\n" \ | ||
3518 | "Return an exit code of TRUE (0)" | ||
3519 | #define true_example_usage \ | ||
3520 | "$ true\n" \ | ||
3521 | "$ echo $?\n" \ | ||
3522 | "0\n" | ||
3523 | |||
3524 | #define tty_trivial_usage \ | ||
3525 | "" | ||
3526 | #define tty_full_usage "\n\n" \ | ||
3527 | "Print file name of stdin's terminal" \ | ||
3528 | IF_INCLUDE_SUSv2( "\n" \ | ||
3529 | "\nOptions:" \ | ||
3530 | "\n -s Print nothing, only return exit status" \ | ||
3531 | ) | ||
3532 | #define tty_example_usage \ | ||
3533 | "$ tty\n" \ | ||
3534 | "/dev/tty2\n" | ||
3535 | |||
3536 | #define ttysize_trivial_usage \ | 2578 | #define ttysize_trivial_usage \ |
3537 | "[w] [h]" | 2579 | "[w] [h]" |
3538 | #define ttysize_full_usage "\n\n" \ | 2580 | #define ttysize_full_usage "\n\n" \ |
@@ -3587,57 +2629,6 @@ INSERT | |||
3587 | #define umount_example_usage \ | 2629 | #define umount_example_usage \ |
3588 | "$ umount /dev/hdc1\n" | 2630 | "$ umount /dev/hdc1\n" |
3589 | 2631 | ||
3590 | #define uname_trivial_usage \ | ||
3591 | "[-amnrspv]" | ||
3592 | #define uname_full_usage "\n\n" \ | ||
3593 | "Print system information\n" \ | ||
3594 | "\nOptions:" \ | ||
3595 | "\n -a Print all" \ | ||
3596 | "\n -m The machine (hardware) type" \ | ||
3597 | "\n -n Hostname" \ | ||
3598 | "\n -r OS release" \ | ||
3599 | "\n -s OS name (default)" \ | ||
3600 | "\n -p Processor type" \ | ||
3601 | "\n -v OS version" \ | ||
3602 | |||
3603 | #define uname_example_usage \ | ||
3604 | "$ uname -a\n" \ | ||
3605 | "Linux debian 2.4.23 #2 Tue Dec 23 17:09:10 MST 2003 i686 GNU/Linux\n" | ||
3606 | |||
3607 | #define unexpand_trivial_usage \ | ||
3608 | "[-fa][-t N] [FILE]..." | ||
3609 | #define unexpand_full_usage "\n\n" \ | ||
3610 | "Convert spaces to tabs, writing to stdout\n" \ | ||
3611 | "\nOptions:" \ | ||
3612 | IF_FEATURE_UNEXPAND_LONG_OPTIONS( \ | ||
3613 | "\n -a,--all Convert all blanks" \ | ||
3614 | "\n -f,--first-only Convert only leading blanks" \ | ||
3615 | "\n -t,--tabs=N Tabstops every N chars" \ | ||
3616 | ) \ | ||
3617 | IF_NOT_FEATURE_UNEXPAND_LONG_OPTIONS( \ | ||
3618 | "\n -a Convert all blanks" \ | ||
3619 | "\n -f Convert only leading blanks" \ | ||
3620 | "\n -t N Tabstops every N chars" \ | ||
3621 | ) | ||
3622 | |||
3623 | #define uniq_trivial_usage \ | ||
3624 | "[-cdu][-f,s,w N] [INPUT [OUTPUT]]" | ||
3625 | #define uniq_full_usage "\n\n" \ | ||
3626 | "Discard duplicate lines\n" \ | ||
3627 | "\nOptions:" \ | ||
3628 | "\n -c Prefix lines by the number of occurrences" \ | ||
3629 | "\n -d Only print duplicate lines" \ | ||
3630 | "\n -u Only print unique lines" \ | ||
3631 | "\n -f N Skip first N fields" \ | ||
3632 | "\n -s N Skip first N chars (after any skipped fields)" \ | ||
3633 | "\n -w N Compare N characters in line" \ | ||
3634 | |||
3635 | #define uniq_example_usage \ | ||
3636 | "$ echo -e \"a\\na\\nb\\nc\\nc\\na\" | sort | uniq\n" \ | ||
3637 | "a\n" \ | ||
3638 | "b\n" \ | ||
3639 | "c\n" | ||
3640 | |||
3641 | #define uptime_trivial_usage \ | 2632 | #define uptime_trivial_usage \ |
3642 | "" | 2633 | "" |
3643 | #define uptime_full_usage "\n\n" \ | 2634 | #define uptime_full_usage "\n\n" \ |
@@ -3647,40 +2638,6 @@ INSERT | |||
3647 | "$ uptime\n" \ | 2638 | "$ uptime\n" \ |
3648 | " 1:55pm up 2:30, load average: 0.09, 0.04, 0.00\n" | 2639 | " 1:55pm up 2:30, load average: 0.09, 0.04, 0.00\n" |
3649 | 2640 | ||
3650 | #define usleep_trivial_usage \ | ||
3651 | "N" | ||
3652 | #define usleep_full_usage "\n\n" \ | ||
3653 | "Pause for N microseconds" | ||
3654 | |||
3655 | #define usleep_example_usage \ | ||
3656 | "$ usleep 1000000\n" \ | ||
3657 | "[pauses for 1 second]\n" | ||
3658 | |||
3659 | #define uudecode_trivial_usage \ | ||
3660 | "[-o OUTFILE] [INFILE]" | ||
3661 | #define uudecode_full_usage "\n\n" \ | ||
3662 | "Uudecode a file\n" \ | ||
3663 | "Finds outfile name in uuencoded source unless -o is given" | ||
3664 | |||
3665 | #define uudecode_example_usage \ | ||
3666 | "$ uudecode -o busybox busybox.uu\n" \ | ||
3667 | "$ ls -l busybox\n" \ | ||
3668 | "-rwxr-xr-x 1 ams ams 245264 Jun 7 21:35 busybox\n" | ||
3669 | |||
3670 | #define uuencode_trivial_usage \ | ||
3671 | "[-m] [INFILE] STORED_FILENAME" | ||
3672 | #define uuencode_full_usage "\n\n" \ | ||
3673 | "Uuencode a file to stdout\n" \ | ||
3674 | "\nOptions:" \ | ||
3675 | "\n -m Use base64 encoding per RFC1521" \ | ||
3676 | |||
3677 | #define uuencode_example_usage \ | ||
3678 | "$ uuencode busybox busybox\n" \ | ||
3679 | "begin 755 busybox\n" \ | ||
3680 | "<encoded file snipped>\n" \ | ||
3681 | "$ uudecode busybox busybox > busybox.uu\n" \ | ||
3682 | "$\n" | ||
3683 | |||
3684 | #define vconfig_trivial_usage \ | 2641 | #define vconfig_trivial_usage \ |
3685 | "COMMAND [OPTIONS]" | 2642 | "COMMAND [OPTIONS]" |
3686 | #define vconfig_full_usage "\n\n" \ | 2643 | #define vconfig_full_usage "\n\n" \ |
@@ -3759,18 +2716,6 @@ INSERT | |||
3759 | "$ which login\n" \ | 2716 | "$ which login\n" \ |
3760 | "/bin/login\n" | 2717 | "/bin/login\n" |
3761 | 2718 | ||
3762 | #define who_trivial_usage \ | ||
3763 | "[-a]" | ||
3764 | #define who_full_usage "\n\n" \ | ||
3765 | "Show who is logged on\n" \ | ||
3766 | "\nOptions:" \ | ||
3767 | "\n -a Show all" \ | ||
3768 | |||
3769 | #define whoami_trivial_usage \ | ||
3770 | "" | ||
3771 | #define whoami_full_usage "\n\n" \ | ||
3772 | "Print the user name associated with the current effective user id" | ||
3773 | |||
3774 | #define zcip_trivial_usage \ | 2719 | #define zcip_trivial_usage \ |
3775 | "[OPTIONS] IFACE SCRIPT" | 2720 | "[OPTIONS] IFACE SCRIPT" |
3776 | #define zcip_full_usage "\n\n" \ | 2721 | #define zcip_full_usage "\n\n" \ |