Fix double quote handling.
This commit is contained in:
parent
2f2da90fd4
commit
4e853560f5
@ -27,8 +27,8 @@ sub beautify {
|
||||
my @line = split("\n", $text);
|
||||
$text = join('',
|
||||
map {
|
||||
s/^\s*//;
|
||||
s/"//g;
|
||||
s/^\s*"//;
|
||||
s/"\s*$//;
|
||||
s/%/%%/g;
|
||||
s/\$/\\\$/g;
|
||||
eval qq[ sprintf(qq{$_}) ]
|
||||
@ -275,4 +275,4 @@ John BEPPU <beppu@lineo.com>
|
||||
|
||||
=cut
|
||||
|
||||
# $Id: autodocifier.pl,v 1.19 2001/04/05 20:03:33 beppu Exp $
|
||||
# $Id: autodocifier.pl,v 1.20 2001/04/10 00:00:05 kraai Exp $
|
||||
|
104
docs/busybox.pod
104
docs/busybox.pod
@ -275,9 +275,9 @@ Options:
|
||||
|
||||
Example:
|
||||
|
||||
$ echo Hello world | cut -f 1 -d ' '
|
||||
$ echo "Hello world" | cut -f 1 -d ' '
|
||||
Hello
|
||||
$ echo Hello world | cut -f 2 -d ' '
|
||||
$ echo "Hello world" | cut -f 2 -d ' '
|
||||
world
|
||||
|
||||
-------------------------------
|
||||
@ -536,17 +536,17 @@ Options:
|
||||
|
||||
Example:
|
||||
|
||||
$ echo Erik is cool
|
||||
$ echo "Erik is cool"
|
||||
Erik is cool
|
||||
$ echo -e Erik
|
||||
$ echo -e "Erik
|
||||
is
|
||||
cool
|
||||
cool"
|
||||
Erik
|
||||
is
|
||||
cool
|
||||
$ echo Erik
|
||||
$ echo "Erik
|
||||
is
|
||||
cool
|
||||
cool"
|
||||
Erik
|
||||
is
|
||||
cool
|
||||
@ -630,7 +630,7 @@ Show and modify frame buffer settings
|
||||
Example:
|
||||
|
||||
$ fbset
|
||||
mode 1024x768-76
|
||||
mode "1024x768-76"
|
||||
# D: 78.653 MHz, H: 59.949 kHz, V: 75.694 Hz
|
||||
geometry 1024 768 1024 768 16
|
||||
timings 12714 128 32 16 4 128 4
|
||||
@ -687,7 +687,6 @@ Example:
|
||||
Swap: 128516 8404 120112
|
||||
Total: 386144 257128 129016
|
||||
|
||||
|
||||
-------------------------------
|
||||
|
||||
=item B<freeramdisk>
|
||||
@ -715,7 +714,7 @@ Options:
|
||||
-a Perform automatic repairs
|
||||
-v verbose
|
||||
-s Outputs super-block information
|
||||
-m Activates MINIX-like mode not cleared warnings
|
||||
-m Activates MINIX-like "mode not cleared" warnings
|
||||
-f Force file system check.
|
||||
|
||||
-------------------------------
|
||||
@ -741,20 +740,20 @@ Example:
|
||||
$ cat getopt.test
|
||||
#!/bin/sh
|
||||
GETOPT=`getopt -o ab:c:: --long a-long,b-long:,c-long:: \
|
||||
-n 'example.busybox' -- $@`
|
||||
-n 'example.busybox' -- "$@"`
|
||||
if [ $? != 0 ] ; then exit 1 ; fi
|
||||
eval set -- $GETOPT
|
||||
eval set -- "$GETOPT"
|
||||
while true ; do
|
||||
case $1 in
|
||||
-a|--a-long) echo Option a ; shift ;;
|
||||
-b|--b-long) echo Option b, argument `$2' ; shift 2 ;;
|
||||
-a|--a-long) echo "Option a" ; shift ;;
|
||||
-b|--b-long) echo "Option b, argument `$2'" ; shift 2 ;;
|
||||
-c|--c-long)
|
||||
case $2 in
|
||||
\) echo Option c, no argument; shift 2 ;;
|
||||
*) echo Option c, argument `$2' ; shift 2 ;;
|
||||
case "$2" in
|
||||
"") echo "Option c, no argument"; shift 2 ;;
|
||||
*) echo "Option c, argument `$2'" ; shift 2 ;;
|
||||
esac ;;
|
||||
--) shift ; break ;;
|
||||
*) echo Internal error! ; exit 1 ;;
|
||||
*) echo "Internal error!" ; exit 1 ;;
|
||||
esac
|
||||
done
|
||||
|
||||
@ -960,7 +959,7 @@ If you choose to use an /etc/inittab file, the inittab entry format is as follow
|
||||
WARNING: This field has a non-traditional meaning for BusyBox init!
|
||||
The id field is used by BusyBox init to specify the controlling tty for
|
||||
the specified process to run on. The contents of this field are
|
||||
appended to /dev/ and used as-is. There is no need for this field to
|
||||
appended to "/dev/" and used as-is. There is no need for this field to
|
||||
be unique, although if it isn't you may have strange results. If this
|
||||
field is left blank, the controlling tty is set to the console. Also
|
||||
note that if BusyBox detects that a serial console is in use, then only
|
||||
@ -1003,7 +1002,7 @@ If you choose to use an /etc/inittab file, the inittab entry format is as follow
|
||||
it. Unlike sysvinit, BusyBox init does not stop processes from
|
||||
respawning out of control. The 'askfirst' actions acts just like
|
||||
respawn, except that before running the specified process it
|
||||
displays the line Please press Enter to activate this console.
|
||||
displays the line "Please press Enter to activate this console."
|
||||
and then waits for the user to press enter before starting the
|
||||
specified process.
|
||||
|
||||
@ -1023,9 +1022,9 @@ Example /etc/inittab file:
|
||||
|
||||
# /bin/sh invocations on selected ttys
|
||||
#
|
||||
# Start an askfirst shell on the console (whatever that may be)
|
||||
# Start an "askfirst" shell on the console (whatever that may be)
|
||||
::askfirst:-/bin/sh
|
||||
# Start an askfirst shell on /dev/tty2-4
|
||||
# Start an "askfirst" shell on /dev/tty2-4
|
||||
tty2::askfirst:-/bin/sh
|
||||
tty3::askfirst:-/bin/sh
|
||||
tty4::askfirst:-/bin/sh
|
||||
@ -1105,7 +1104,6 @@ Example:
|
||||
|
||||
$ killall apache
|
||||
|
||||
|
||||
-------------------------------
|
||||
|
||||
=item B<klogd>
|
||||
@ -1127,7 +1125,7 @@ Prints out the length of the specified STRING.
|
||||
|
||||
Example:
|
||||
|
||||
$ length Hello
|
||||
$ length "Hello"
|
||||
5
|
||||
|
||||
-------------------------------
|
||||
@ -1152,7 +1150,6 @@ Example:
|
||||
$ ls -l /tmp/ls
|
||||
lrwxrwxrwx 1 root root 7 Apr 12 18:39 ls -> BusyBox*
|
||||
|
||||
|
||||
-------------------------------
|
||||
|
||||
=item B<loadacm>
|
||||
@ -1165,7 +1162,6 @@ Example:
|
||||
|
||||
$ loadacm < /etc/i18n/acmname
|
||||
|
||||
|
||||
-------------------------------
|
||||
|
||||
=item B<loadfont>
|
||||
@ -1178,7 +1174,6 @@ Example:
|
||||
|
||||
$ loadfont < /etc/i18n/fontname
|
||||
|
||||
|
||||
-------------------------------
|
||||
|
||||
=item B<loadkmap>
|
||||
@ -1191,7 +1186,6 @@ Example:
|
||||
|
||||
$ loadkmap < /etc/i18n/lang-keymap
|
||||
|
||||
|
||||
-------------------------------
|
||||
|
||||
=item B<logger>
|
||||
@ -1209,8 +1203,7 @@ Options:
|
||||
|
||||
Example:
|
||||
|
||||
$ logger hello
|
||||
|
||||
$ logger "hello"
|
||||
|
||||
-------------------------------
|
||||
|
||||
@ -1225,7 +1218,6 @@ Example:
|
||||
$ logname
|
||||
root
|
||||
|
||||
|
||||
-------------------------------
|
||||
|
||||
=item B<logread>
|
||||
@ -1309,7 +1301,6 @@ Example:
|
||||
$ makedevs /dev/hda b 3 0 0 8 s
|
||||
[creates hda,hda1-hda8]
|
||||
|
||||
|
||||
-------------------------------
|
||||
|
||||
=item B<md5sum>
|
||||
@ -1365,7 +1356,6 @@ Example:
|
||||
/tmp/foo/bar/baz: No such file or directory
|
||||
$ mkdir -p /tmp/foo/bar/baz
|
||||
|
||||
|
||||
-------------------------------
|
||||
|
||||
=item B<mkfifo>
|
||||
@ -1417,7 +1407,6 @@ Example:
|
||||
$ mknod /dev/fd0 b 2 0
|
||||
$ mknod -m 644 /tmp/pipe p
|
||||
|
||||
|
||||
-------------------------------
|
||||
|
||||
=item B<mkswap>
|
||||
@ -1450,7 +1439,6 @@ Example:
|
||||
$ ls -la /tmp/temp.mWiLjM
|
||||
-rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM
|
||||
|
||||
|
||||
-------------------------------
|
||||
|
||||
=item B<more>
|
||||
@ -1463,7 +1451,6 @@ Example:
|
||||
|
||||
$ dmesg | more
|
||||
|
||||
|
||||
-------------------------------
|
||||
|
||||
=item B<mount>
|
||||
@ -1475,14 +1462,14 @@ Mount a filesystem
|
||||
Flags:
|
||||
|
||||
-a: Mount all filesystems in fstab.
|
||||
-f: Fake Add entry to mount table but don't mount it.
|
||||
-f: "Fake" Add entry to mount table but don't mount it.
|
||||
-n: Don't write a mount table entry.
|
||||
-o option: One of many filesystem options, listed below.
|
||||
-r: Mount the filesystem read-only.
|
||||
-t fs-type: Specify the filesystem type.
|
||||
-w: Mount for reading and writing (default).
|
||||
|
||||
Options for use with the B<-o> flag:
|
||||
Options for use with the "B<-o>" flag:
|
||||
|
||||
async/sync: Writes are asynchronous / synchronous.
|
||||
atime/noatime: Enable / disable updates to inode access times.
|
||||
@ -1505,7 +1492,6 @@ Example:
|
||||
$ mount /dev/fd0 /mnt -t msdos -o ro
|
||||
$ mount /tmp/diskimage /opt -t ext2 -o loop
|
||||
|
||||
|
||||
-------------------------------
|
||||
|
||||
=item B<mt>
|
||||
@ -1534,7 +1520,6 @@ Example:
|
||||
|
||||
$ mv /tmp/foo /bin/bar
|
||||
|
||||
|
||||
-------------------------------
|
||||
|
||||
=item B<nc>
|
||||
@ -1554,7 +1539,6 @@ Example:
|
||||
quit
|
||||
221 foobar closing connection
|
||||
|
||||
|
||||
-------------------------------
|
||||
|
||||
=item B<nslookup>
|
||||
@ -1572,7 +1556,6 @@ Example:
|
||||
Name: debian
|
||||
Address: 127.0.0.1
|
||||
|
||||
|
||||
-------------------------------
|
||||
|
||||
=item B<ping>
|
||||
@ -1598,7 +1581,6 @@ Example:
|
||||
1 packets transmitted, 1 packets received, 0% packet loss
|
||||
round-trip min/avg/max = 20.1/20.1/20.1 ms
|
||||
|
||||
|
||||
-------------------------------
|
||||
|
||||
=item B<pivot_root>
|
||||
@ -1627,11 +1609,10 @@ Where FORMAT controls the output exactly as in C printf.
|
||||
|
||||
Example:
|
||||
|
||||
$ printf Val=%d
|
||||
5
|
||||
$ printf "Val=%d
|
||||
" 5
|
||||
Val=5
|
||||
|
||||
|
||||
-------------------------------
|
||||
|
||||
=item B<ps>
|
||||
@ -1798,7 +1779,7 @@ files; if no input files are specified, then the standard input is read.
|
||||
|
||||
Example:
|
||||
|
||||
$ echo foo | sed -e 's/f[a-zA-Z]o/bar/g'
|
||||
$ echo "foo" | sed -e 's/f[a-zA-Z]o/bar/g'
|
||||
bar
|
||||
|
||||
-------------------------------
|
||||
@ -1831,7 +1812,7 @@ This command does not yet have proper documentation.
|
||||
Use lash just as you would use any other shell. It properly handles pipes,
|
||||
redirects, job control, can be used as the shell for scripts, and has a
|
||||
sufficient set of builtins to do what is needed. It does not (yet) support
|
||||
Bourne Shell syntax. If you need things like if-then-else, while, and such
|
||||
Bourne Shell syntax. If you need things like "if-then-else", "while", and such
|
||||
use ash or bash. If you just need a very simple and extremely small shell,
|
||||
this will do the job.
|
||||
|
||||
@ -1858,12 +1839,12 @@ Sorts lines of text in the specified files
|
||||
|
||||
Example:
|
||||
|
||||
$ echo -e e
|
||||
$ echo -e "e
|
||||
f
|
||||
b
|
||||
d
|
||||
c
|
||||
a | sort
|
||||
a" | sort
|
||||
a
|
||||
b
|
||||
c
|
||||
@ -1985,7 +1966,7 @@ Main operation mode:
|
||||
|
||||
File selection:
|
||||
|
||||
f name of tarfile or - for stdin
|
||||
f name of tarfile or "-" for stdin
|
||||
O extract to stdout
|
||||
exclude file to exclude
|
||||
X file with names to exclude
|
||||
@ -2013,7 +1994,7 @@ Options:
|
||||
|
||||
Example:
|
||||
|
||||
$ echo Hello | tee /tmp/foo
|
||||
$ echo "Hello" | tee /tmp/foo
|
||||
$ cat /tmp/foo
|
||||
Hello
|
||||
|
||||
@ -2057,14 +2038,14 @@ Example:
|
||||
|
||||
tftp command SOURCE DEST
|
||||
|
||||
Transfers a file from/to a tftp server using octet mode.
|
||||
Transfers a file from/to a tftp server using "octet" mode.
|
||||
|
||||
Commands:
|
||||
|
||||
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 nameing a server, use the syntax "server:file".
|
||||
|
||||
-------------------------------
|
||||
|
||||
@ -2086,7 +2067,6 @@ Example:
|
||||
$ ls -l /tmp/foo
|
||||
-rw-rw-r-- 1 andersen andersen 0 Apr 15 01:11 /tmp/foo
|
||||
|
||||
|
||||
-------------------------------
|
||||
|
||||
=item B<tr>
|
||||
@ -2104,10 +2084,9 @@ Options:
|
||||
|
||||
Example:
|
||||
|
||||
$ echo gdkkn vnqkc | tr [a-y] [b-z]
|
||||
$ echo "gdkkn vnqkc" | tr [a-y] [b-z]
|
||||
hello world
|
||||
|
||||
|
||||
-------------------------------
|
||||
|
||||
=item B<true>
|
||||
@ -2182,7 +2161,6 @@ Example:
|
||||
$ uname -a
|
||||
Linux debian 2.2.15pre13 #5 Tue Mar 14 16:03:50 MST 2000 i686 unknown
|
||||
|
||||
|
||||
-------------------------------
|
||||
|
||||
=item B<uniq>
|
||||
@ -2200,12 +2178,12 @@ Options:
|
||||
|
||||
Example:
|
||||
|
||||
$ echo -e a
|
||||
$ echo -e "a
|
||||
a
|
||||
b
|
||||
c
|
||||
c
|
||||
a | sort | uniq
|
||||
a" | sort | uniq
|
||||
a
|
||||
b
|
||||
c
|
||||
@ -2245,7 +2223,6 @@ Example:
|
||||
$ uptime
|
||||
1:55pm up 2:30, load average: 0.09, 0.04, 0.00
|
||||
|
||||
|
||||
-------------------------------
|
||||
|
||||
=item B<usleep>
|
||||
@ -2277,7 +2254,6 @@ Example:
|
||||
$ ls -l busybox
|
||||
-rwxr-xr-x 1 ams ams 245264 Jun 7 21:35 busybox
|
||||
|
||||
|
||||
-------------------------------
|
||||
|
||||
=item B<uuencode>
|
||||
@ -2339,7 +2315,6 @@ Example:
|
||||
$ wc /etc/passwd
|
||||
31 46 1365 /etc/passwd
|
||||
|
||||
|
||||
-------------------------------
|
||||
|
||||
=item B<wget>
|
||||
@ -2388,7 +2363,6 @@ Example:
|
||||
$ ls | xargs gzip
|
||||
$ find . -name '*.c' -print | xargs rm
|
||||
|
||||
|
||||
-------------------------------
|
||||
|
||||
=item B<yes>
|
||||
@ -2562,4 +2536,4 @@ Enrique Zanardi <ezanardi@ull.es>
|
||||
|
||||
=cut
|
||||
|
||||
# $Id: busybox.pod,v 1.98 2001/04/09 23:27:51 kraai Exp $
|
||||
# $Id: busybox.pod,v 1.99 2001/04/10 00:00:05 kraai Exp $
|
||||
|
Loading…
Reference in New Issue
Block a user