* The busybox shell, lash, is really too weak for serious use, although it is
possible to run many simple systems with it. BusyBox 0.49 was supposed to
- have a new shell, updated to understand full Bourne grammer. Well, that
+ have a new shell, updated to understand full Bourne grammar. Well, that
simply didn't happen in time for the release. A rewrite is in progress
that will result in a new shell that understands the full Bourne grammar.
This new shell is being championed by Larry Doolittle
du.c probably ought to have an -x switch like GNU du does...
+-----------------------
+
+xargs could use a -l option
+
------------------------------------------------------------------
#define echo_example_usage \
"$ echo "Erik is cool"\n" \
"Erik is cool\n" \
- "$ echo -e "Erik\nis\ncool"\n" \
+ "$ echo -e "Erik\\nis\\ncool"\n" \
"Erik\n" \
"is\n" \
"cool\n" \
"the current directory; default EXPRESSION is '-print'\n" \
"\nEXPRESSION may consist of:\n" \
"\t-follow\t\tDereference symbolic links.\n" \
- "\t-name PATTERN\tFile name (leading directories removed) matches PATTERN." \
+ "\t-name PATTERN\tFile name (leading directories removed) matches PATTERN.\n" \
"\t-print\t\tPrint (default and assumed).\n" \
USAGE_FIND_TYPE( \
"\n\t-type X\t\tFiletype matches X (where X is one of: f,d,l,b,c,...)" \
#define length_full_usage \
"Prints out the length of the specified STRING."
#define length_example_usage \
- "$ length "Hello"\n" \
+ "$ length Hello\n" \
"5\n"
#define ln_trivial_usage \
"Formats and prints ARGUMENT(s) according to FORMAT,\n" \
"Where FORMAT controls the output exactly as in C printf."
#define printf_example_usage \
- "$ printf "Val=%d\n" 5\n" \
+ "$ printf "Val=%d\\n" 5\n" \
"Val=5\n"
#define ps_trivial_usage \
#define sort_full_usage \
"Sorts lines of text in the specified files"
#define sort_example_usage \
- "$ echo -e "e\nf\nb\nd\nc\na" | sort\n" \
+ "$ echo -e \"e\\nf\\nb\\nd\\nc\\na\" | sort\n" \
"a\n" \
"b\n" \
"c\n" \
USAGE_TFTP_PUT( \
"\tput\tPut local file SOURCE to server DEST.\n" \
) \
- "\nWhen nameing a server, use the syntax \"server:file\"."
+ "\nWhen naming a server, use the syntax \"server:file\"."
#define touch_trivial_usage \
"[-c] file [file ...]"
"[flags] filesystem|directory"
#define umount_full_usage \
"Unmount file systems\n" \
- "\nFlags:\n" "\t-a:\tUnmount all file systems" \
- USAGE_MTAB(" in /etc/mtab\n\t-n:\tDon't erase /etc/mtab entries") \
- "\n\t-r:\tTry to remount devices as read-only if mount is busy" \
- USAGE_MOUNT_FORCE("\n\t-f:\tForce filesystem umount (i.e. unreachable NFS server)") \
- USAGE_MOUNT_LOOP("\n\t-l:\tDo not free loop device (if a loop device has been used)")
+ "\nFlags:\n" "\t-a\tUnmount all file systems" \
+ USAGE_MTAB(" in /etc/mtab\n\t-n\tDon't erase /etc/mtab entries") \
+ "\n\t-r\tTry to remount devices as read-only if mount is busy" \
+ USAGE_MOUNT_FORCE("\n\t-f\tForce filesystem umount (i.e. unreachable NFS server)") \
+ USAGE_MOUNT_LOOP("\n\t-l\tDo not free loop device (if a loop device has been used)")
#define umount_example_usage \
"$ umount /dev/hdc1 \n"
"\t-d\tonly print duplicate lines\n" \
"\t-u\tonly print unique lines"
#define uniq_example_usage \
- "$ echo -e "a\na\nb\nc\nc\na" | sort | uniq\n" \
+ "$ echo -e \"a\\na\\nb\\nc\\nc\\na\" | sort | uniq\n" \
"a\n" \
"b\n" \
"c\n"
}
my $full = join("\n", @f1);
- # prepare notes if they exists
+ # prepare notes if they exist
my $notes = (defined $usage->{notes})
? "$usage->{notes}\n\n"
: "";
- # prepare example if one exists
+ # prepare examples if they exist
my $example = (defined $usage->{example})
?
"Example:\n\n" .
# {
# trivial => "...",
# full => "...",
+# notes => "...",
# example => "...",
# }
my %docs;
=head1 SYNOPSIS
-autodocifier.pl usage.h > something
+autodocifier.pl [OPTION]... [FILE]...
+
+Example:
+
+ ( cat docs/busybox_header.pod; \
+ docs/autodocifier.pl usage.h; \
+ cat docs/busybox_footer.pod ) > docs/busybox.pod
=head1 DESCRIPTION
slightly different formats -- F<usage.h>, F<docs/busybox.pod>, and
F<docs/busybox.sgml>. This is tedious, so Perl has come to the rescue.
-This script was based on a script by Erik Andersen (andersen@lineo.com).
+This script was based on a script by Erik Andersen <andersen@lineo.com>
+which was in turn based on a script by Mark Whitley <markw@lineo.com>
=head1 OPTIONS
#define length_full_usage \
"Prints out the length of the specified STRING."
#define length_example_usage \
- "$ length "Hello"\n" \
+ "$ length Hello\n" \
"5\n"
Each entry is a cpp macro that defines a string. The macros are
=item B<notes>
This is documentation that is intended to go in the POD or SGML, but
-not be output when a B<-h> is given to a command. To see an example
+not be printed when a B<-h> is given to a command. To see an example
of notes being used, see init_notes_usage. I<OPTIONAL>
=item B<example>
This should be an example of how the command is acutally used.
-I<OPTIONAL>
+This will not be printed when a B<-h> is given to a command -- it
+is inteded only for the POD or SGML documentation. I<OPTIONAL>
=back
=cut
-# $Id: autodocifier.pl,v 1.20 2001/04/10 00:00:05 kraai Exp $
+# $Id: autodocifier.pl,v 1.21 2001/04/17 17:09:34 beppu Exp $
=item B<dpkg_deb>
-dpkg_deb [B<-cexX>] file directory
+dpkg_deb [B<-cefItxX>] file [argument]
Perform actions on debian packages (.debs)
Options:
- -c List contents of filesystem tree (verbose)
- -l List contents of filesystem tree (.list format)
- -e Extract control files to directory
+ -c List contents of filesystem tree
+ -e Extract control files to [argument] directory
+ -f Display control field name starting with [argument]
+ -I Display the control filenamed [argument]
+ -t Extract filesystem tree to stdout in tar format
-x Exctract packages filesystem tree to directory
-X Verbose extract
$ echo "Erik is cool"
Erik is cool
- $ echo -e "Erik
- is
- cool"
+ $ echo -e "Erik\nis\ncool"
Erik
is
cool
EXPRESSION may consist of:
-follow Dereference symbolic links.
- -name PATTERN File name (leading directories removed) matches PATTERN. -print Print (default and assumed).
+ -name PATTERN File name (leading directories removed) matches PATTERN.
+ -print Print (default and assumed).
-type X Filetype matches X (where X is one of: f,d,l,b,c,...)
-perm PERMS Permissions match any of (+NNN); all of (-NNN);
Example:
- $ printf "Val=%d
- " 5
+ $ printf "Val=%d\n" 5
Val=5
-------------------------------
Example:
- $ echo -e "e
- f
- b
- d
- c
- a" | sort
+ $ echo -e "e\nf\nb\nd\nc\na" | sort
a
b
c
get Get file from server SOURCE and store to local DEST.
put Put local file SOURCE to server DEST.
-When nameing a server, use the syntax "server:file".
+When naming a server, use the syntax "server:file".
-------------------------------
Flags:
- -a: Unmount all file systems in /etc/mtab
- -n: Don't erase /etc/mtab entries
- -r: Try to remount devices as read-only if mount is busy
- -f: Force filesystem umount (i.e. unreachable NFS server)
- -l: Do not free loop device (if a loop device has been used)
+ -a Unmount all file systems in /etc/mtab
+ -n Don't erase /etc/mtab entries
+ -r Try to remount devices as read-only if mount is busy
+ -f Force filesystem umount (i.e. unreachable NFS server)
+ -l Do not free loop device (if a loop device has been used)
Example:
Example:
- $ echo -e "a
- a
- b
- c
- c
- a" | sort | uniq
+ $ echo -e "a\na\nb\nc\nc\na" | sort | uniq
a
b
c
=cut
-# $Id: busybox.pod,v 1.100 2001/04/10 18:17:05 andersen Exp $
+# $Id: busybox.pod,v 1.101 2001/04/17 17:09:34 beppu Exp $
=for html <br>
-Edward Betts <edward@debian.org>
+John Beppu <beppu@lineo.com>
- expr, hostid, logname, tty, wc, whoami, yes
-
-=for html <br>
+ du, head, nslookup, sort, tee, uniq (so Kraai could rewrite them ;-),
+ documentation
-John Beppu <beppu@lineo.com>
+=for html <br>
- du, head, nslookup, sort, tee, uniq
+Edward Betts <edward@debian.org>
+ expr, hostid, logname, tty, wc, whoami, yes
+
=for html <br>
Brian Candler <B.Candler@pobox.com>
=for html <br>
+Larry Doolittle <ldoolitt@recycle.lbl.gov>
+
+ various fixes, shell rewrite
+
+=for html <br>
+
Karl M. Hegbloom <karlheg@debian.org>
cp_mv.c, the test suite, various fixes to utility.c, &c.
=for html <br>
+Sterling Huxley <sterling@europa.com>
+
+ vi (!!!)
+
+=for html <br>
+
Daniel Jacobowitz <dan@debian.org>
mktemp.c
=cut
-# $Id: busybox_footer.pod,v 1.3 2001/04/09 23:27:51 kraai Exp $
+# $Id: busybox_footer.pod,v 1.4 2001/04/17 17:09:34 beppu Exp $
#define echo_example_usage \
"$ echo "Erik is cool"\n" \
"Erik is cool\n" \
- "$ echo -e "Erik\nis\ncool"\n" \
+ "$ echo -e "Erik\\nis\\ncool"\n" \
"Erik\n" \
"is\n" \
"cool\n" \
"the current directory; default EXPRESSION is '-print'\n" \
"\nEXPRESSION may consist of:\n" \
"\t-follow\t\tDereference symbolic links.\n" \
- "\t-name PATTERN\tFile name (leading directories removed) matches PATTERN." \
+ "\t-name PATTERN\tFile name (leading directories removed) matches PATTERN.\n" \
"\t-print\t\tPrint (default and assumed).\n" \
USAGE_FIND_TYPE( \
"\n\t-type X\t\tFiletype matches X (where X is one of: f,d,l,b,c,...)" \
#define length_full_usage \
"Prints out the length of the specified STRING."
#define length_example_usage \
- "$ length "Hello"\n" \
+ "$ length Hello\n" \
"5\n"
#define ln_trivial_usage \
"Formats and prints ARGUMENT(s) according to FORMAT,\n" \
"Where FORMAT controls the output exactly as in C printf."
#define printf_example_usage \
- "$ printf "Val=%d\n" 5\n" \
+ "$ printf "Val=%d\\n" 5\n" \
"Val=5\n"
#define ps_trivial_usage \
#define sort_full_usage \
"Sorts lines of text in the specified files"
#define sort_example_usage \
- "$ echo -e "e\nf\nb\nd\nc\na" | sort\n" \
+ "$ echo -e \"e\\nf\\nb\\nd\\nc\\na\" | sort\n" \
"a\n" \
"b\n" \
"c\n" \
USAGE_TFTP_PUT( \
"\tput\tPut local file SOURCE to server DEST.\n" \
) \
- "\nWhen nameing a server, use the syntax \"server:file\"."
+ "\nWhen naming a server, use the syntax \"server:file\"."
#define touch_trivial_usage \
"[-c] file [file ...]"
"[flags] filesystem|directory"
#define umount_full_usage \
"Unmount file systems\n" \
- "\nFlags:\n" "\t-a:\tUnmount all file systems" \
- USAGE_MTAB(" in /etc/mtab\n\t-n:\tDon't erase /etc/mtab entries") \
- "\n\t-r:\tTry to remount devices as read-only if mount is busy" \
- USAGE_MOUNT_FORCE("\n\t-f:\tForce filesystem umount (i.e. unreachable NFS server)") \
- USAGE_MOUNT_LOOP("\n\t-l:\tDo not free loop device (if a loop device has been used)")
+ "\nFlags:\n" "\t-a\tUnmount all file systems" \
+ USAGE_MTAB(" in /etc/mtab\n\t-n\tDon't erase /etc/mtab entries") \
+ "\n\t-r\tTry to remount devices as read-only if mount is busy" \
+ USAGE_MOUNT_FORCE("\n\t-f\tForce filesystem umount (i.e. unreachable NFS server)") \
+ USAGE_MOUNT_LOOP("\n\t-l\tDo not free loop device (if a loop device has been used)")
#define umount_example_usage \
"$ umount /dev/hdc1 \n"
"\t-d\tonly print duplicate lines\n" \
"\t-u\tonly print unique lines"
#define uniq_example_usage \
- "$ echo -e "a\na\nb\nc\nc\na" | sort | uniq\n" \
+ "$ echo -e \"a\\na\\nb\\nc\\nc\\na\" | sort | uniq\n" \
"a\n" \
"b\n" \
"c\n"
#define echo_example_usage \
"$ echo "Erik is cool"\n" \
"Erik is cool\n" \
- "$ echo -e "Erik\nis\ncool"\n" \
+ "$ echo -e "Erik\\nis\\ncool"\n" \
"Erik\n" \
"is\n" \
"cool\n" \
"the current directory; default EXPRESSION is '-print'\n" \
"\nEXPRESSION may consist of:\n" \
"\t-follow\t\tDereference symbolic links.\n" \
- "\t-name PATTERN\tFile name (leading directories removed) matches PATTERN." \
+ "\t-name PATTERN\tFile name (leading directories removed) matches PATTERN.\n" \
"\t-print\t\tPrint (default and assumed).\n" \
USAGE_FIND_TYPE( \
"\n\t-type X\t\tFiletype matches X (where X is one of: f,d,l,b,c,...)" \
#define length_full_usage \
"Prints out the length of the specified STRING."
#define length_example_usage \
- "$ length "Hello"\n" \
+ "$ length Hello\n" \
"5\n"
#define ln_trivial_usage \
"Formats and prints ARGUMENT(s) according to FORMAT,\n" \
"Where FORMAT controls the output exactly as in C printf."
#define printf_example_usage \
- "$ printf "Val=%d\n" 5\n" \
+ "$ printf "Val=%d\\n" 5\n" \
"Val=5\n"
#define ps_trivial_usage \
#define sort_full_usage \
"Sorts lines of text in the specified files"
#define sort_example_usage \
- "$ echo -e "e\nf\nb\nd\nc\na" | sort\n" \
+ "$ echo -e \"e\\nf\\nb\\nd\\nc\\na\" | sort\n" \
"a\n" \
"b\n" \
"c\n" \
USAGE_TFTP_PUT( \
"\tput\tPut local file SOURCE to server DEST.\n" \
) \
- "\nWhen nameing a server, use the syntax \"server:file\"."
+ "\nWhen naming a server, use the syntax \"server:file\"."
#define touch_trivial_usage \
"[-c] file [file ...]"
"[flags] filesystem|directory"
#define umount_full_usage \
"Unmount file systems\n" \
- "\nFlags:\n" "\t-a:\tUnmount all file systems" \
- USAGE_MTAB(" in /etc/mtab\n\t-n:\tDon't erase /etc/mtab entries") \
- "\n\t-r:\tTry to remount devices as read-only if mount is busy" \
- USAGE_MOUNT_FORCE("\n\t-f:\tForce filesystem umount (i.e. unreachable NFS server)") \
- USAGE_MOUNT_LOOP("\n\t-l:\tDo not free loop device (if a loop device has been used)")
+ "\nFlags:\n" "\t-a\tUnmount all file systems" \
+ USAGE_MTAB(" in /etc/mtab\n\t-n\tDon't erase /etc/mtab entries") \
+ "\n\t-r\tTry to remount devices as read-only if mount is busy" \
+ USAGE_MOUNT_FORCE("\n\t-f\tForce filesystem umount (i.e. unreachable NFS server)") \
+ USAGE_MOUNT_LOOP("\n\t-l\tDo not free loop device (if a loop device has been used)")
#define umount_example_usage \
"$ umount /dev/hdc1 \n"
"\t-d\tonly print duplicate lines\n" \
"\t-u\tonly print unique lines"
#define uniq_example_usage \
- "$ echo -e "a\na\nb\nc\nc\na" | sort | uniq\n" \
+ "$ echo -e \"a\\na\\nb\\nc\\nc\\na\" | sort | uniq\n" \
"a\n" \
"b\n" \
"c\n"