commit bash-20080306 snapshot

This commit is contained in:
Chet Ramey
2011-12-07 09:19:53 -05:00
parent e882163b50
commit 29d25b5400
50 changed files with 6022 additions and 4368 deletions
+25
View File
@@ -15322,3 +15322,28 @@ lib/readline/rltty.c
- set readline_echoing_p = 1 if tcgetattr fails and sets errno to
EINVAL, as Linux does when the fd is a pipe. Reported by Mike
Frysinger <vapier@gentoo.org>
3/6
---
{MANIFEST,Makefile.in},lib/sh/{casemod,uconvert,ufuncs}.c
- new library sources from bash-4.0-devel triee
lib/sh/spell.c
- moved cdspell() here from builtins/cd.def, renamed dirspell()
externs.h
- new declarations for extern functions from new library files
- new extern declaration for lib/sh/spell.c:dirspell()
builtins/cd.def
- call extern library function dirspell(); remove static cdspell()
builtins/read.def
- when read times out, make sure input_string is null-terminated before
assigning any partial input read to the named variables
3/10
----
lib/glob/xmbsrtowcs.c
- cut the number of memory allocations in xdupmbstowcs by not keeping
track of the indices if the caller hasn't asked for it
+26
View File
@@ -15315,3 +15315,29 @@ builtins/shopt.def
execute_cmd.c
- in execute_cond_node, restore bash-3.1 behavior of quoted rhs of
regexp matches if shell_compatibility_level == 31
2/28
----
lib/readline/rltty.c
- set readline_echoing_p = 1 if tcgetattr fails and sets errno to
EINVAL, as Linux does when the fd is a pipe. Reported by Mike
Frysinger <vapier@gentoo.org>
3/6
---
{MANIFEST,Makefile.in},lib/sh/{casemod,uconvert,ufuncs}.c
- new library sources from bash-4.0-devel triee
lib/sh/spell.c
- moved cdspell() here from builtins/cd.def, renamed dirspell()
externs.h
- new declarations for extern functions from new library files
- new extern declaration for lib/sh/spell.c:dirspell()
builtins/cd.def
- call extern library function dirspell(); remove static cdspell()
builtins/read.def
- when read times out, make sure input_string is null-terminated before
assigning any partial input read to the named variables
+3
View File
@@ -374,6 +374,7 @@ lib/readline/examples/rl.c f
lib/readline/examples/rlcat.c f
lib/readline/examples/Inputrc f
lib/sh/Makefile.in f
lib/sh/casemod.c f
lib/sh/clktck.c f
lib/sh/clock.c f
lib/sh/eaccess.c f
@@ -422,6 +423,8 @@ lib/sh/strtrans.c f
lib/sh/times.c f
lib/sh/timeval.c f
lib/sh/tmpfile.c f
lib/sh/uconvert.c f
lib/sh/ufuncs.c f
lib/sh/vprint.c f
lib/sh/wcsdup.c f
lib/sh/winsize.c f
+1
View File
@@ -387,6 +387,7 @@ lib/sh/inet_aton.c f
lib/sh/itos.c f
lib/sh/mailstat.c f
lib/sh/makepath.c f
lib/sh/mbscmp.c f
lib/sh/memset.c f
lib/sh/mktime.c f
lib/sh/netconn.c f
+3 -1
View File
@@ -211,7 +211,9 @@ SHLIB_SOURCE = ${SH_LIBSRC}/clktck.c ${SH_LIBSRC}/getcwd.c \
${SH_LIBSRC}/strnlen.c ${SH_LIBSRC}/winsize.c \
${SH_LIBSRC}/eaccess.c ${SH_LIBSRC}/wcsdup.c \
${SH_LIBSRC}/zmapfd.c ${SH_LIBSRC}/fpurge.c \
${SH_LIBSRC}/zgetline.c ${SH_LIBSRC}/mbscmp.c
${SH_LIBSRC}/zgetline.c ${SH_LIBSRC}/mbscmp.c \
${SH_LIBSRC}/casemod.c ${SH_LIBSRC}/uconvert.c \
${SH_LIBSRC}/ufuncs.c
SHLIB_LIB = -lsh
SHLIB_LIBNAME = libsh.a
+1 -1
View File
@@ -211,7 +211,7 @@ SHLIB_SOURCE = ${SH_LIBSRC}/clktck.c ${SH_LIBSRC}/getcwd.c \
${SH_LIBSRC}/strnlen.c ${SH_LIBSRC}/winsize.c \
${SH_LIBSRC}/eaccess.c ${SH_LIBSRC}/wcsdup.c \
${SH_LIBSRC}/zmapfd.c ${SH_LIBSRC}/fpurge.c \
${SH_LIBSRC}/zgetline.c
${SH_LIBSRC}/zgetline.c ${SH_LIBSRC}/mbscmp.c
SHLIB_LIB = -lsh
SHLIB_LIBNAME = libsh.a
+4 -4
View File
@@ -25,7 +25,7 @@ $BUILTIN caller
$FUNCTION caller_builtin
$DEPENDS_ON DEBUGGER
$SHORT_DOC caller [expr]
Returns the context of the current subroutine call.
Returns the context of the current subroutine call.
Without EXPR, returns "$line $filename". With EXPR, returns
"$line $subroutine $filename"; this extra information can be used to
@@ -129,9 +129,9 @@ caller_builtin (list)
static char *caller_doc[] = {
N_("Returns the context of the current subroutine call.\n\
\n\
Without EXPR, returns \"$line $filename\". With EXPR,\n\
returns \"$line $subroutine $filename\"; this extra information\n\
can be used used to provide a stack trace.\n\
Without EXPR, returns "$line $filename". With EXPR, returns\n\
"$line $subroutine $filename"; this extra information can be used to\n\
provide a stack trace.\n\
\n\
The value of EXPR indicates how many call frames to go back before the\n\
current one; the top frame is frame 0."),
+4 -5
View File
@@ -1,7 +1,7 @@
This file is caller.def, from which is created caller.c. It implements the
builtin "caller" in Bash.
Copyright (C) 2002-2003 Rocky Bernstein for Free Software Foundation, Inc.
Copyright (C) 2002-2008 Rocky Bernstein for Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -25,12 +25,11 @@ $BUILTIN caller
$FUNCTION caller_builtin
$DEPENDS_ON DEBUGGER
$SHORT_DOC caller [expr]
Returns the context of the current subroutine call.
Without EXPR, returns "$line $filename". With EXPR,
returns "$line $subroutine $filename"; this extra information
can be used to provide a stack trace.
Without EXPR, returns "$line $filename". With EXPR, returns
"$line $subroutine $filename"; this extra information can be used to
provide a stack trace.
The value of EXPR indicates how many call frames to go back before the
current one; the top frame is frame 0.
+1 -28
View File
@@ -63,8 +63,6 @@ static void setpwd __P((char *));
static char *resetpwd __P((char *));
static int change_to_directory __P((char *, int));
static char *cdspell __P((char *));
/* Change this to 1 to get cd spelling correction by default. */
int cdspelling = 0;
@@ -309,7 +307,7 @@ cd_builtin (list)
typo. This is similar to the UNIX 8th and 9th Edition shells. */
if (lflag & LCD_DOSPELL)
{
temp = cdspell (dirname);
temp = dirspell (dirname);
if (temp && change_to_directory (temp, no_symlinks))
{
printf ("%s\n", temp);
@@ -505,28 +503,3 @@ change_to_directory (newdir, nolinks)
free (tdir);
return r;
}
/* Code for cd spelling correction. Original patch submitted by
Neil Russel (caret@c-side.com). */
static char *
cdspell (dirname)
char *dirname;
{
int n;
char *guess;
n = (strlen (dirname) * 3 + 1) / 2 + 1;
guess = (char *)xmalloc (n);
switch (spname (dirname, guess))
{
case -1:
default:
free (guess);
return (char *)NULL;
case 0:
case 1:
return guess;
}
}
+1 -2
View File
@@ -85,8 +85,7 @@ If the directory is not found, and the shell option `cdable_vars' is set,
the word is assumed to be a variable name. If that variable has a value,
its value is used for DIR.
Options, if specified, are interpreted as follows:
Options:
-L force symbolic links to be followed
-P use the physical directory structure without following symbolic
links
+1 -1
View File
@@ -290,7 +290,7 @@ fc_builtin (list)
line was actually added (HISTIGNORE may have caused it to not be),
so we check hist_last_line_added. */
/* "When not listing, the fc command that caused the editing shall not be
/* "When not listing, the fc command that caused the editing shall not be
entered into the history list." */
if (listing == 0 && hist_last_line_added)
delete_last_history ();
-1
View File
@@ -31,7 +31,6 @@ string, which means the most recent command beginning with that
string.
Options:
-e ENAME select which editor to use. Default is FCEDIT, then EDITOR,
then vi
-l list lines instead of editing
+2 -2
View File
@@ -1,7 +1,7 @@
/* mkbuiltins.c - Create builtins.c, builtext.h, and builtdoc.c from
a single source file called builtins.def. */
/* Copyright (C) 1987-2007 Free Software Foundation, Inc.
/* Copyright (C) 1987-2008 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -1092,7 +1092,7 @@ char *structfile_header[] = {
"/* This file is manufactured by ./mkbuiltins, and should not be",
" edited by hand. See the source to mkbuiltins for details. */",
"",
"/* Copyright (C) 1987-2007 Free Software Foundation, Inc.",
"/* Copyright (C) 1987-2008 Free Software Foundation, Inc.",
"",
" This file is part of GNU Bash, the Bourne Again SHell.",
"",
-3
View File
@@ -811,10 +811,7 @@ builtin_handler (self, defs, arg)
if (is_assignment_builtin (name))
new->flags |= BUILTIN_FLAG_ASSIGNMENT;
if (is_posix_builtin (name))
{
fprintf(stderr, "%s: added BUILTIN_FLAG_POSIX_BUILTIN\n", name);
new->flags |= BUILTIN_FLAG_POSIX_BUILTIN;
}
array_add ((char *)new, defs->builtins);
building_builtin = 1;
+39 -35
View File
@@ -31,7 +31,7 @@ directory. With no arguments, exchanges the top two directories.
Options:
-n Suppresses the normal change of directory when adding
directorie to the stack, so only the stack is manipulated.
directories to the stack, so only the stack is manipulated.
Arguments:
+N Rotates the stack so that the Nth directory (counting
@@ -668,19 +668,20 @@ N_("Display the list of currently remembered directories. Directories\n\
find their way onto the list with the `pushd' command; you can get\n\
back up through the list with the `popd' command.\n\
\n\
The -c flag clears the directory stack by deleting all of the elements.\n\
The -l flag specifies that `dirs' should not print shorthand versions\n\
of directories which are relative to your home directory. This means\n\
that `~/bin' might be displayed as `/homes/bfox/bin'. The -p flag\n\
causes `dirs' to print the directory stack with one entry per line.\n\
The -v flag does the same thing, prefixing each directory name with its\n\
position in the stack.\n\
Options:\n\
-c clear the directory stack by deleting all of the elements\n\
-l do not print tilde-prefixed versions of directories relative\n\
to your home directory\n\
-p print the directory stack with one entry per line\n\
-v print the directory stack with one entry per line prefixed\n\
with its position in the stack\n\
\n\
+N Displays the Nth entry counting from the left of the list shown by\n\
dirs when invoked without options, starting with zero.\n\
Arguments:\n\
+N Displays the Nth entry counting from the left of the list shown by\n\
dirs when invoked without options, starting with zero.\n\
\n\
-N Displays the Nth entry counting from the right of the list shown by\n\
dirs when invoked without options, starting with zero."),
-N Displays the Nth entry counting from the right of the list shown by\n\
dirs when invoked without options, starting with zero."),
(char *)NULL
};
@@ -689,41 +690,44 @@ N_("Adds a directory to the top of the directory stack, or rotates\n\
the stack, making the new top of the stack the current working\n\
directory. With no arguments, exchanges the top two directories.\n\
\n\
-n Suppresses the normal change of directory when adding directories\n\
to the stack, so only the stack is manipulated.\n\
Options:\n\
-n Suppresses the normal change of directory when adding\n\
directories to the stack, so only the stack is manipulated.\n\
\n\
+N Rotates the stack so that the Nth directory (counting\n\
from the left of the list shown by `dirs', starting with\n\
zero) is at the top.\n\
Arguments:\n\
+N Rotates the stack so that the Nth directory (counting\n\
from the left of the list shown by `dirs', starting with\n\
zero) is at the top.\n\
\n\
-N Rotates the stack so that the Nth directory (counting\n\
from the right of the list shown by `dirs', starting with\n\
zero) is at the top.\n\
-N Rotates the stack so that the Nth directory (counting\n\
from the right of the list shown by `dirs', starting with\n\
zero) is at the top.\n\
\n\
dir Adds DIR to the directory stack at the top, making it the\n\
new current working directory.\n\
dir Adds DIR to the directory stack at the top, making it the\n\
new current working directory.\n\
\n\
You can see the directory stack with the `dirs' command."),
The `dirs' builtin displays the directory stack."),
(char *)NULL
};
char * const popd_doc[] = {
N_("Removes entries from the directory stack. With no arguments,\n\
removes the top directory from the stack, and cd's to the new\n\
top directory.\n\
N_("Removes entries from the directory stack. With no arguments, removes\n\
the top directory from the stack, and changes to the new top directory.\n\
\n\
-n Suppresses the normal change of directory when removing directories\n\
from the stack, so only the stack is manipulated.\n\
Options:\n\
-n Suppresses the normal change of directory when removing\n\
directories from the stack, so only the stack is manipulated.\n\
\n\
+N Removes the Nth entry counting from the left of the list\n\
shown by `dirs', starting with zero. For example: `popd +0'\n\
removes the first directory, `popd +1' the second.\n\
Arguments:\n\
+N Removes the Nth entry counting from the left of the list\n\
shown by `dirs', starting with zero. For example: `popd +0'\n\
removes the first directory, `popd +1' the second.\n\
\n\
-N Removes the Nth entry counting from the right of the list\n\
shown by `dirs', starting with zero. For example: `popd -0'\n\
removes the last directory, `popd -1' the next to last.\n\
-N Removes the Nth entry counting from the right of the list\n\
shown by `dirs', starting with zero. For example: `popd -0'\n\
removes the last directory, `popd -1' the next to last.\n\
\n\
You can see the directory stack with the `dirs' command."),
The `dirs' builtin displays the directory stack."),
(char *)NULL
};
+26 -29
View File
@@ -30,12 +30,10 @@ the stack, making the new top of the stack the current working
directory. With no arguments, exchanges the top two directories.
Options:
-n Suppresses the normal change of directory when adding
directorie to the stack, so only the stack is manipulated.
directories to the stack, so only the stack is manipulated.
Arguments:
+N Rotates the stack so that the Nth directory (counting
from the left of the list shown by `dirs', starting with
zero) is at the top.
@@ -58,12 +56,10 @@ Removes entries from the directory stack. With no arguments, removes
the top directory from the stack, and changes to the new top directory.
Options:
-n Suppresses the normal change of directory when removing
directories from the stack, so only the stack is manipulated.
Arguments:
+N Removes the Nth entry counting from the left of the list
shown by `dirs', starting with zero. For example: `popd +0'
removes the first directory, `popd +1' the second.
@@ -84,7 +80,6 @@ find their way onto the list with the `pushd' command; you can get
back up through the list with the `popd' command.
Options:
-c clear the directory stack by deleting all of the elements
-l do not print tilde-prefixed versions of directories relative
to your home directory
@@ -93,7 +88,6 @@ Options:
with its position in the stack
Arguments:
+N Displays the Nth entry counting from the left of the list shown by
dirs when invoked without options, starting with zero.
@@ -674,19 +668,20 @@ N_("Display the list of currently remembered directories. Directories\n\
find their way onto the list with the `pushd' command; you can get\n\
back up through the list with the `popd' command.\n\
\n\
The -c flag clears the directory stack by deleting all of the elements.\n\
The -l flag specifies that `dirs' should not print shorthand versions\n\
of directories which are relative to your home directory. This means\n\
that `~/bin' might be displayed as `/homes/bfox/bin'. The -p flag\n\
causes `dirs' to print the directory stack with one entry per line.\n\
The -v flag does the same thing, prefixing each directory name with its\n\
position in the stack.\n\
Options:\n\
-c clear the directory stack by deleting all of the elements\n\
-l do not print tilde-prefixed versions of directories relative\n\
to your home directory\n\
-p print the directory stack with one entry per line\n\
-v print the directory stack with one entry per line prefixed\n\
with its position in the stack\n\
\n\
+N Displays the Nth entry counting from the left of the list shown by\n\
dirs when invoked without options, starting with zero.\n\
Arguments:\n\
+N Displays the Nth entry counting from the left of the list shown by\n\
dirs when invoked without options, starting with zero.\n\
\n\
-N Displays the Nth entry counting from the right of the list shown by\n\
dirs when invoked without options, starting with zero."),
-N Displays the Nth entry counting from the right of the list shown by\n\
dirs when invoked without options, starting with zero."),
(char *)NULL
};
@@ -695,21 +690,23 @@ N_("Adds a directory to the top of the directory stack, or rotates\n\
the stack, making the new top of the stack the current working\n\
directory. With no arguments, exchanges the top two directories.\n\
\n\
-n Suppresses the normal change of directory when adding directories\n\
to the stack, so only the stack is manipulated.\n\
Options:\n\
-n Suppresses the normal change of directory when adding\n\
directories to the stack, so only the stack is manipulated.\n\
\n\
+N Rotates the stack so that the Nth directory (counting\n\
from the left of the list shown by `dirs', starting with\n\
zero) is at the top.\n\
Arguments:\n\
+N Rotates the stack so that the Nth directory (counting\n\
from the left of the list shown by `dirs', starting with\n\
zero) is at the top.\n\
\n\
-N Rotates the stack so that the Nth directory (counting\n\
from the right of the list shown by `dirs', starting with\n\
zero) is at the top.\n\
-N Rotates the stack so that the Nth directory (counting\n\
from the right of the list shown by `dirs', starting with\n\
zero) is at the top.\n\
\n\
dir Adds DIR to the directory stack at the top, making it the\n\
new current working directory.\n\
dir Adds DIR to the directory stack at the top, making it the\n\
new current working directory.\n\
\n\
You can see the directory stack with the `dirs' command."),
The `dirs' builtin displays the directory stack."),
(char *)NULL
};
+2
View File
@@ -286,6 +286,7 @@ read_builtin (list)
skip_ctlesc |= *e == CTLESC, skip_ctlnul |= *e == CTLNUL;
input_string = (char *)xmalloc (size = 112); /* XXX was 128 */
input_string[0] = '\0';
/* $TMOUT, if set, is the default timeout for read. */
if (have_timeout == 0 && (e = get_string_value ("TMOUT")))
@@ -351,6 +352,7 @@ read_builtin (list)
run_unwind_frame ("read_builtin");
return (EXECUTION_FAILURE);
#else
input_string[i] = '\0'; /* make sure it's terminated */
retval = EXECUTION_FAILURE;
goto assign_vars;
#endif
+13 -10
View File
@@ -35,20 +35,20 @@ If no NAMEs are supplied, the line read is stored in the REPLY variable.
Options:
-a array assign the words read to sequential indices of the array
variable ARRAY, starting at zero
variable ARRAY, starting at zero
-d delim continue until the first character of DELIM is read, rather
than newline
-e use Readline to obtain the line in an interactive shell
than newline
-e use Readline to obtain the line in an interactive shell
-n nchars return after reading NCHARS characters rather than waiting
for a newline
for a newline
-p prompt output the string PROMPT without a trailing newline before
attempting to read
-r do not allow backslashes to escape any characters
-s do not echo input coming from a terminal
attempting to read
-r do not allow backslashes to escape any characters
-s do not echo input coming from a terminal
-t timeout time out and return failure if a complete line of input is
not read withint TIMEOUT seconds. The value of the TMOUT
variable is the default timeout.
-u fd read from file descriptor FD instead of the standard input
not read withint TIMEOUT seconds. The value of the TMOUT
variable is the default timeout.
-u fd read from file descriptor FD instead of the standard input
The return code is zero, unless end-of-file is encountered, read times out,
or an invalid file descriptor is supplied as the argument to -u.
@@ -286,6 +286,7 @@ read_builtin (list)
skip_ctlesc |= *e == CTLESC, skip_ctlnul |= *e == CTLNUL;
input_string = (char *)xmalloc (size = 112); /* XXX was 128 */
input_string[0] = '\0';
/* $TMOUT, if set, is the default timeout for read. */
if (have_timeout == 0 && (e = get_string_value ("TMOUT")))
@@ -351,6 +352,8 @@ read_builtin (list)
run_unwind_frame ("read_builtin");
return (EXECUTION_FAILURE);
#else
itrace("read: timeout: i = %d", i);
input_string[i] = '\0'; /* make sure it's terminated */
retval = EXECUTION_FAILURE;
goto assign_vars;
#endif
+439 -11
View File
@@ -1,13 +1,441 @@
*** ../bash-3.2-patched/version.c 2005-05-16 11:58:34.000000000 -0400
--- version.c 2007-11-23 16:03:40.000000000 -0500
*** ../bash-3.2-patched/builtins/read.def 2007-08-25 13:47:07.000000000 -0400
--- builtins/read.def 2008-02-09 16:34:39.000000000 -0500
***************
*** 80,83 ****
printf ("GNU bash, version %s (%s)\n", shell_version_string (), MACHTYPE);
if (extended)
! printf (_("Copyright (C) 2005 Free Software Foundation, Inc.\n"));
}
--- 80,83 ----
printf ("GNU bash, version %s (%s)\n", shell_version_string (), MACHTYPE);
if (extended)
! printf (_("Copyright (C) 2007 Free Software Foundation, Inc.\n"));
*** 1,7 ****
This file is read.def, from which is created read.c.
It implements the builtin "read" in Bash.
! Copyright (C) 1987-2005 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
--- 1,7 ----
This file is read.def, from which is created read.c.
It implements the builtin "read" in Bash.
! Copyright (C) 1987-2008 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
***************
*** 23,50 ****
$BUILTIN read
$FUNCTION read_builtin
! $SHORT_DOC read [-ers] [-u fd] [-t timeout] [-p prompt] [-a array] [-n nchars] [-d delim] [name ...]
! One line is read from the standard input, or from file descriptor FD if the
! -u option is supplied, and the first word is assigned to the first NAME,
! the second word to the second NAME, and so on, with leftover words assigned
! to the last NAME. Only the characters found in $IFS are recognized as word
! delimiters. If no NAMEs are supplied, the line read is stored in the REPLY
! variable. If the -r option is given, this signifies `raw' input, and
! backslash escaping is disabled. The -d option causes read to continue
! until the first character of DELIM is read, rather than newline. If the -p
! option is supplied, the string PROMPT is output without a trailing newline
! before attempting to read. If -a is supplied, the words read are assigned
! to sequential indices of ARRAY, starting at zero. If -e is supplied and
! the shell is interactive, readline is used to obtain the line. If -n is
! supplied with a non-zero NCHARS argument, read returns after NCHARS
! characters have been read. The -s option causes input coming from a
! terminal to not be echoed.
!
! The -t option causes read to time out and return failure if a complete line
! of input is not read within TIMEOUT seconds. If the TMOUT variable is set,
! its value is the default timeout. The return code is zero, unless end-of-file
! is encountered, read times out, or an invalid file descriptor is supplied as
! the argument to -u.
$END
#include <config.h>
--- 23,57 ----
$BUILTIN read
$FUNCTION read_builtin
! $SHORT_DOC read [-ers] [-a array] [-d delim] [-n nchars] [-p prompt] [-t timeout] [-u fd] [name ...]
! Reads a single line from the standard input, or from file descriptor FD
! if the -u option is supplied. The line is split into fields as with word
! splitting, and the first word is assigned to the first NAME, the second
! word to the second NAME, and so on, with any leftover words assigned to
! the last NAME. Only the characters found in $IFS are recognized as word
! delimiters.
!
! If no NAMEs are supplied, the line read is stored in the REPLY variable.
!
! Options:
! -a array assign the words read to sequential indices of the array
! variable ARRAY, starting at zero
! -d delim continue until the first character of DELIM is read, rather
! than newline
! -e use Readline to obtain the line in an interactive shell
! -n nchars return after reading NCHARS characters rather than waiting
! for a newline
! -p prompt output the string PROMPT without a trailing newline before
! attempting to read
! -r do not allow backslashes to escape any characters
! -s do not echo input coming from a terminal
! -t timeout time out and return failure if a complete line of input is
! not read withint TIMEOUT seconds. The value of the TMOUT
! variable is the default timeout.
! -u fd read from file descriptor FD instead of the standard input
!
! The return code is zero, unless end-of-file is encountered, read times out,
! or an invalid file descriptor is supplied as the argument to -u.
$END
#include <config.h>
***************
*** 87,92 ****
--- 94,105 ----
extern int errno;
#endif
+ struct ttsave
+ {
+ int fd;
+ TTYSTRUCT *attrs;
+ };
+
#if defined (READLINE)
static void reset_attempted_completion_function __P((char *));
static char *edit_line __P((char *));
***************
*** 94,99 ****
--- 107,116 ----
static void reset_eol_delim __P((char *));
#endif
static SHELL_VAR *bind_read_variable __P((char *, char *));
+ #if defined (HANDLE_MULTIBYTE)
+ static int read_mbchar __P((int, char *, int, int, int));
+ #endif
+ static void ttyrestore __P((struct ttsave *));
static sighandler sigalrm __P((int));
static void reset_alarm __P((void));
***************
*** 134,142 ****
intmax_t intval;
char c;
char *input_string, *orig_input_string, *ifs_chars, *prompt, *arrayname;
! char *e, *t, *t1, *ps2;
struct stat tsb;
SHELL_VAR *var;
#if defined (ARRAY_VARS)
WORD_LIST *alist;
#endif
--- 151,161 ----
intmax_t intval;
char c;
char *input_string, *orig_input_string, *ifs_chars, *prompt, *arrayname;
! char *e, *t, *t1, *ps2, *tofree;
struct stat tsb;
SHELL_VAR *var;
+ TTYSTRUCT ttattrs, ttset;
+ struct ttsave termsave;
#if defined (ARRAY_VARS)
WORD_LIST *alist;
#endif
***************
*** 263,268 ****
--- 282,289 ----
ifs_chars = getifs ();
if (ifs_chars == 0) /* XXX - shouldn't happen */
ifs_chars = "";
+ for (skip_ctlesc = skip_ctlnul = 0, e = ifs_chars; *e; e++)
+ skip_ctlesc |= *e == CTLESC, skip_ctlnul |= *e == CTLNUL;
input_string = (char *)xmalloc (size = 112); /* XXX was 128 */
***************
*** 326,333 ****
--- 347,359 ----
code = setjmp (alrmbuf);
if (code)
{
+ #if 0
run_unwind_frame ("read_builtin");
return (EXECUTION_FAILURE);
+ #else
+ retval = EXECUTION_FAILURE;
+ goto assign_vars;
+ #endif
}
old_alrm = set_signal_handler (SIGALRM, sigalrm);
add_unwind_protect (reset_alarm, (char *)NULL);
***************
*** 361,379 ****
#endif
if (input_is_tty)
{
! ttsave ();
if (silent)
! ttcbreak ();
else
! ttonechar ();
! add_unwind_protect ((Function *)ttrestore, (char *)NULL);
}
}
else if (silent) /* turn off echo but leave term in canonical mode */
{
! ttsave ();
! ttnoecho ();
! add_unwind_protect ((Function *)ttrestore, (char *)NULL);
}
/* This *must* be the top unwind-protect on the stack, so the manipulation
--- 387,416 ----
#endif
if (input_is_tty)
{
! /* ttsave() */
! termsave.fd = fd;
! ttgetattr (fd, &ttattrs);
! termsave.attrs = &ttattrs;
!
! ttset = ttattrs;
if (silent)
! ttfd_cbreak (fd, &ttset); /* ttcbreak () */
else
! ttfd_onechar (fd, &ttset); /* ttonechar () */
! add_unwind_protect ((Function *)ttyrestore, (char *)&termsave);
}
}
else if (silent) /* turn off echo but leave term in canonical mode */
{
! /* ttsave (); */
! termsave.fd = fd;
! ttgetattr (fd, &ttattrs);
! termsave.attrs = &ttattrs;
!
! ttset = ttattrs;
! ttfd_noecho (fd, &ttset); /* ttnoecho (); */
!
! add_unwind_protect ((Function *)ttyrestore, (char *)&termsave);
}
/* This *must* be the top unwind-protect on the stack, so the manipulation
***************
*** 439,445 ****
}
#endif
! if (i + 2 >= size)
{
input_string = (char *)xrealloc (input_string, size += 128);
remove_unwind_protect ();
--- 476,482 ----
}
#endif
! if (i + 4 >= size) /* XXX was i + 2; use i + 4 for multibyte/read_mbchar */
{
input_string = (char *)xrealloc (input_string, size += 128);
remove_unwind_protect ();
***************
*** 462,479 ****
continue;
}
if (c == '\\' && raw == 0)
{
pass_next++;
! saw_escape++;
! input_string[i++] = CTLESC;
continue;
}
if ((unsigned char)c == delim)
break;
! if (c == CTLESC || c == CTLNUL)
{
saw_escape++;
input_string[i++] = CTLESC;
--- 499,520 ----
continue;
}
+ /* This may cause problems if IFS contains CTLESC */
if (c == '\\' && raw == 0)
{
pass_next++;
! if (skip_ctlesc == 0)
! {
! saw_escape++;
! input_string[i++] = CTLESC;
! }
continue;
}
if ((unsigned char)c == delim)
break;
! if ((skip_ctlesc == 0 && c == CTLESC) || (skip_ctlnul == 0 && c == CTLNUL))
{
saw_escape++;
input_string[i++] = CTLESC;
***************
*** 481,486 ****
--- 522,536 ----
add_char:
input_string[i++] = c;
+
+ #if defined (HANDLE_MULTIBYTE)
+ if (nchars > 0 && MB_CUR_MAX > 1)
+ {
+ input_string[i] = '\0'; /* for simplicity and debugging */
+ i += read_mbchar (fd, input_string, i, c, unbuffered_read);
+ }
+ #endif
+
nr++;
if (nchars > 0 && nr >= nchars)
***************
*** 513,522 ****
else
#endif
if (input_is_tty)
! ttrestore ();
}
else if (silent)
! ttrestore ();
if (unbuffered_read == 0)
zsyncfd (fd);
--- 563,572 ----
else
#endif
if (input_is_tty)
! ttyrestore (&termsave);
}
else if (silent)
! ttyrestore (&termsave);
if (unbuffered_read == 0)
zsyncfd (fd);
***************
*** 527,532 ****
--- 577,584 ----
retval = eof ? EXECUTION_FAILURE : EXECUTION_SUCCESS;
+ assign_vars:
+
#if defined (ARRAY_VARS)
/* If -a was given, take the string read, break it into a list of words,
an assign them to `arrayname' in turn. */
***************
*** 603,609 ****
for (t = input_string; ifs_chars && *ifs_chars && spctabnl(*t) && isifs(*t); t++)
;
input_string = t;
-
for (; list->next; list = list->next)
{
varname = list->word->word;
--- 655,660 ----
***************
*** 674,685 ****
#else
/* Check whether or not the number of fields is exactly the same as the
number of variables. */
if (*input_string)
{
t1 = input_string;
t = get_word_from_string (&input_string, ifs_chars, &e);
if (*input_string == 0)
! input_string = t;
else
input_string = strip_trailing_ifs_whitespace (t1, ifs_chars, saw_escape);
}
--- 725,737 ----
#else
/* Check whether or not the number of fields is exactly the same as the
number of variables. */
+ tofree = NULL;
if (*input_string)
{
t1 = input_string;
t = get_word_from_string (&input_string, ifs_chars, &e);
if (*input_string == 0)
! tofree = input_string = t;
else
input_string = strip_trailing_ifs_whitespace (t1, ifs_chars, saw_escape);
}
***************
*** 694,699 ****
--- 746,753 ----
else
var = bind_read_variable (list->word->word, input_string);
stupidly_hack_special_variables (list->word->word);
+ FREE (tofree);
+
if (var)
VUNSETATTR (var, att_invisible);
xfree (orig_input_string);
***************
*** 715,720 ****
--- 769,830 ----
#endif /* !ARRAY_VARS */
}
+ #if defined (HANDLE_MULTIBYTE)
+ static int
+ read_mbchar (fd, string, ind, ch, unbuffered)
+ int fd;
+ char *string;
+ int ind, ch, unbuffered;
+ {
+ char mbchar[MB_LEN_MAX + 1];
+ int i, n, r;
+ char c;
+ size_t ret;
+ mbstate_t ps, ps_back;
+ wchar_t wc;
+
+ memset (&ps, '\0', sizeof (mbstate_t));
+ memset (&ps_back, '\0', sizeof (mbstate_t));
+
+ mbchar[0] = ch;
+ i = 1;
+ for (n = 0; n <= MB_LEN_MAX; n++)
+ {
+ ps_back = ps;
+ ret = mbrtowc (&wc, mbchar, i, &ps);
+ if (ret == (size_t)-2)
+ {
+ ps = ps_back;
+ if (unbuffered)
+ r = zread (fd, &c, 1);
+ else
+ r = zreadc (fd, &c);
+ if (r < 0)
+ goto mbchar_return;
+ mbchar[i++] = c;
+ continue;
+ }
+ else if (ret == (size_t)-1 || ret == (size_t)0 || ret > (size_t)0)
+ break;
+ }
+
+ mbchar_return:
+ if (i > 1) /* read a multibyte char */
+ /* mbchar[0] is already string[ind-1] */
+ for (r = 1; r < i; r++)
+ string[ind+r-1] = mbchar[r];
+ return i - 1;
+ }
+ #endif
+
+
+ static void
+ ttyrestore (ttp)
+ struct ttsave *ttp;
+ {
+ ttsetattr (ttp->fd, ttp->attrs);
+ }
+
#if defined (READLINE)
static rl_completion_func_t *old_attempted_completion_function = 0;
+1161 -1150
View File
File diff suppressed because it is too large Load Diff
+5 -5
View File
@@ -1249,13 +1249,13 @@ Expands to the full file name used to invoke this instance of
.BR bash .
.TP
.B BASHPID
Expands to the process id of the current bash process.
Expands to the process id of the current \fBbash\fP process.
This differs from \fB$$\fP under certain circumstances, such as subshells
that do not require bash to be re-initialized.
that do not require \fBbash\fP to be re-initialized.
.TP
.B BASH_ARGC
An array variable whose values are the number of parameters in each
frame of the current bash execution call stack.
frame of the current \fBbash\fP execution call stack.
The number of
parameters to the current subroutine (shell function or script executed
with \fB.\fP or \fBsource\fP) is at the top of the stack.
@@ -1269,7 +1269,7 @@ option to the
builtin below)
.TP
.B BASH_ARGV
An array variable containing all of the parameters in the current bash
An array variable containing all of the parameters in the current \fBbash\fP
execution call stack. The final parameter of the last subroutine call
is at the top of the stack; the first parameter of the initial call is
at the bottom. When a subroutine is executed, the parameters supplied
@@ -8068,7 +8068,7 @@ table exists before trying to execute it. If a hashed command no
longer exists, a normal path search is performed.
.TP 8
.B checkjobs
If set, bash lists the status of any stopped and running jobs before
If set, \fBbash\fP lists the status of any stopped and running jobs before
exiting an interactive shell. If any jobs are running, this causes
the exit to be deferred until a second exit is attempted without an
intervening command (see \fBJOB CONTROL\fP above). The shell always
+24 -5
View File
@@ -3,7 +3,7 @@
</HEAD>
<BODY><TABLE WIDTH=100%>
<TR>
<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2007 December 5<TH ALIGN=RIGHT width=33%>BASH(1)
<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2008 February 22<TH ALIGN=RIGHT width=33%>BASH(1)
</TR>
</TABLE>
<BR><A HREF="#index">Index</A>
@@ -42,7 +42,7 @@ bash - GNU Bourne-Again SHell
<H3>COPYRIGHT</H3>
Bash is Copyright &#169; 1989-2007 by the Free Software Foundation, Inc.
Bash is Copyright &#169; 1989-2008 by the Free Software Foundation, Inc.
<A NAME="lbAE">&nbsp;</A>
<H3>DESCRIPTION</H3>
@@ -1549,7 +1549,7 @@ Expands to the number of positional parameters in decimal.
<DT><B>?</B>
<DD>
Expands to the status of the most recently executed foreground
Expands to the exit status of the most recently executed foreground
pipeline.
<DT><B>-</B>
@@ -5103,6 +5103,17 @@ command in its environment.
<A NAME="lbBZ">&nbsp;</A>
<H3>EXIT STATUS</H3>
<P>
The exit status of an executed command is the value returned by the
<I>waitpid</I> system call or equivalent function. Exit statuses
fall between 0 and 255, though, as explained below, the shell may
use values above 125 specially. Exit statuses from shell builtins and
compound commands are also limited to this range. Under certain
circumstances, the shell will use special values to indicate specific
failure modes.
<P>
For the shell's purposes, a command which exits with a
zero exit status has succeeded. An exit status of zero
indicates success. A non-zero exit status indicates failure.
@@ -10382,6 +10393,14 @@ If set,
attempts to save all lines of a multiple-line
command in the same history entry. This allows
easy re-editing of multi-line commands.
<DT><B>compat31</B>
<DD>
If set,
<B>bash</B>
changes its behavior to that of version 3.1 with respect to quoted
arguments to the conditional command's =~ operator.
<DT><B>dotglob</B>
<DD>
@@ -11552,7 +11571,7 @@ Array variables may not (yet) be exported.
<HR>
<TABLE WIDTH=100%>
<TR>
<TH ALIGN=LEFT width=33%>GNU Bash-3.2<TH ALIGN=CENTER width=33%>2007 December 5<TH ALIGN=RIGHT width=33%>BASH(1)
<TH ALIGN=LEFT width=33%>GNU Bash-3.2<TH ALIGN=CENTER width=33%>2008 February 22<TH ALIGN=RIGHT width=33%>BASH(1)
</TR>
</TABLE>
<HR>
@@ -11656,6 +11675,6 @@ Array variables may not (yet) be exported.
</DL>
<HR>
This document was created by man2html from bash.1.<BR>
Time: 10 January 2008 17:41:32 EST
Time: 04 March 2008 08:38:15 EST
</BODY>
</HTML>
BIN
View File
Binary file not shown.
+2243 -2224
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -131,7 +131,7 @@
@xrdef{Exit Status-pg}{31}
@xrdef{Exit Status-snt}{Section@tie 3.7.5}
@xrdef{Signals-title}{Signals}
@xrdef{Signals-pg}{31}
@xrdef{Signals-pg}{32}
@xrdef{Signals-snt}{Section@tie 3.7.6}
@xrdef{Shell Scripts-title}{Shell Scripts}
@xrdef{Shell Scripts-pg}{32}
+1 -1
View File
@@ -68,7 +68,7 @@
\entry{execution environment}{30}{execution environment}
\entry{environment}{31}{environment}
\entry{exit status}{31}{exit status}
\entry{signal handling}{31}{signal handling}
\entry{signal handling}{32}{signal handling}
\entry{shell script}{32}{shell script}
\entry{special builtin}{57}{special builtin}
\entry{login shell}{71}{login shell}
+1 -1
View File
@@ -117,7 +117,7 @@
\entry {shell variable}{15}
\entry {shell, interactive}{73}
\entry {signal}{4}
\entry {signal handling}{31}
\entry {signal handling}{32}
\entry {special builtin}{4, 57}
\entry {startup files}{71}
\entry {suspending jobs}{87}
BIN
View File
Binary file not shown.
+21 -6
View File
@@ -1,6 +1,6 @@
<HTML>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- Created on January, 10 2008 by texi2html 1.64 -->
<!-- Created on March, 4 2008 by texi2html 1.64 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
@@ -33,10 +33,10 @@ Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
<H1>Bash Reference Manual</H1></P><P>
This text is a brief description of the features that are present in
the Bash shell (version 3.2, 14 December 2007).
the Bash shell (version 3.2, 22 February 2008).
</P><P>
This is Edition 3.2, last updated 14 December 2007,
This is Edition 3.2, last updated 22 February 2008,
of <CITE>The GNU Bash Reference Manual</CITE>,
for <CODE>Bash</CODE>, Version 3.2.
</P><P>
@@ -3378,6 +3378,15 @@ command in its environment.
<!--docid::SEC53::-->
<P>
The exit status of an executed command is the value returned by the
<VAR>waitpid</VAR> system call or equivalent function. Exit statuses
fall between 0 and 255, though, as explained below, the shell may
use values above 125 specially. Exit statuses from shell builtins and
compound commands are also limited to this range. Under certain
circumstances, the shell will use special values to indicate specific
failure modes.
</P><P>
For the shell's purposes, a command which exits with a
zero exit status has succeeded.
A non-zero exit status indicates failure.
@@ -4482,7 +4491,7 @@ parent.
<DT><CODE>printf</CODE>
<DD><A NAME="IDX101"></A>
<TABLE><tr><td>&nbsp;</td><td class=example><pre><CODE>printf</CODE> [-v <VAR>var</VAR>] <VAR>format</VAR> [<VAR>arguments</VAR>]
<TABLE><tr><td>&nbsp;</td><td class=example><pre>printf [-v <VAR>var</VAR>] <VAR>format</VAR> [<VAR>arguments</VAR>]
</pre></td></tr></table>Write the formatted <VAR>arguments</VAR> to the standard output under the
control of the <VAR>format</VAR>.
The <VAR>format</VAR> is a character string which contains three types of objects:
@@ -5242,6 +5251,12 @@ command in the same history entry. This allows
easy re-editing of multi-line commands.
<P>
<DT><CODE>compat31</CODE>
<DD>If set, Bash
changes its behavior to that of version 3.1 with respect to quoted
arguments to the conditional command's =~ operator.
<P>
<DT><CODE>dotglob</CODE>
<DD>If set, Bash includes filenames beginning with a `.' in
the results of filename expansion.
@@ -15257,7 +15272,7 @@ to permit their use in free software.
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H1>About this document</H1>
This document was generated by <I>Chet Ramey</I> on <I>January, 10 2008</I>
This document was generated by <I>Chet Ramey</I> on <I>March, 4 2008</I>
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>
<P></P>
@@ -15419,7 +15434,7 @@ the following structure:
<BR>
<FONT SIZE="-1">
This document was generated
by <I>Chet Ramey</I> on <I>January, 10 2008</I>
by <I>Chet Ramey</I> on <I>March, 4 2008</I>
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>
+149 -136
View File
@@ -2,9 +2,9 @@ This is bashref.info, produced by makeinfo version 4.8 from
/Users/chet/src/bash/src/doc/bashref.texi.
This text is a brief description of the features that are present in
the Bash shell (version 3.2, 14 December 2007).
the Bash shell (version 3.2, 22 February 2008).
This is Edition 3.2, last updated 14 December 2007, of `The GNU Bash
This is Edition 3.2, last updated 22 February 2008, of `The GNU Bash
Reference Manual', for `Bash', Version 3.2.
Copyright (C) 1988-2007 Free Software Foundation, Inc.
@@ -21,9 +21,10 @@ preserved on all copies.
below. A copy of the license is included in the section entitled
"GNU Free Documentation License".
(a) The FSF's Back-Cover Text is: "You are free to copy and modify
this GNU Manual. Buying copies from GNU Press supports the FSF in
developing GNU and promoting software freedom."
(a) The FSF's Back-Cover Text is: "You have the freedom to copy
and modify this GNU manual. Buying copies from the FSF supports
it in developing GNU and promoting software freedom."
INFO-DIR-SECTION Basics
START-INFO-DIR-ENTRY
@@ -37,9 +38,9 @@ Bash Features
*************
This text is a brief description of the features that are present in
the Bash shell (version 3.2, 14 December 2007).
the Bash shell (version 3.2, 22 February 2008).
This is Edition 3.2, last updated 14 December 2007, of `The GNU Bash
This is Edition 3.2, last updated 22 February 2008, of `The GNU Bash
Reference Manual', for `Bash', Version 3.2.
Bash contains features that appear in other popular shells, and some
@@ -2121,8 +2122,15 @@ File: bashref.info, Node: Exit Status, Next: Signals, Prev: Environment, Up:
3.7.5 Exit Status
-----------------
For the shell's purposes, a command which exits with a zero exit status
has succeeded. A non-zero exit status indicates failure. This
The exit status of an executed command is the value returned by the
WAITPID system call or equivalent function. Exit statuses fall between
0 and 255, though, as explained below, the shell may use values above
125 specially. Exit statuses from shell builtins and compound commands
are also limited to this range. Under certain circumstances, the shell
will use special values to indicate specific failure modes.
For the shell's purposes, a command which exits with a zero exit
status has succeeded. A non-zero exit status indicates failure. This
seemingly counter-intuitive scheme is used so there is one well-defined
way to indicate success and a variety of ways to indicate various
failure modes. When a command terminates on a fatal signal whose
@@ -2932,7 +2940,7 @@ POSIX standard.
Exit a login shell, returning a status of N to the shell's parent.
`printf'
`printf' [-v VAR] FORMAT [ARGUMENTS]
printf [-v VAR] FORMAT [ARGUMENTS]
Write the formatted ARGUMENTS to the standard output under the
control of the FORMAT. The FORMAT is a character string which
contains three types of objects: plain characters, which are
@@ -3498,6 +3506,11 @@ This builtin allows you to change additional shell optional behavior.
command in the same history entry. This allows easy
re-editing of multi-line commands.
`compat31'
If set, Bash changes its behavior to that of version 3.1 with
respect to quoted arguments to the conditional command's =~
operator.
`dotglob'
If set, Bash includes filenames beginning with a `.' in the
results of filename expansion.
@@ -9613,131 +9626,131 @@ D.5 Concept Index

Tag Table:
Node: Top1348
Node: Introduction3187
Node: What is Bash?3415
Node: What is a shell?4528
Node: Definitions7068
Node: Basic Shell Features9837
Node: Shell Syntax11056
Node: Shell Operation12086
Node: Quoting13380
Node: Escape Character14683
Node: Single Quotes15168
Node: Double Quotes15516
Node: ANSI-C Quoting16641
Node: Locale Translation17597
Node: Comments18493
Node: Shell Commands19111
Node: Simple Commands19877
Node: Pipelines20508
Node: Lists22383
Node: Compound Commands24014
Node: Looping Constructs24798
Node: Conditional Constructs27245
Node: Command Grouping34805
Node: Shell Functions36284
Node: Shell Parameters40745
Node: Positional Parameters43075
Node: Special Parameters43975
Node: Shell Expansions46939
Node: Brace Expansion48864
Node: Tilde Expansion51190
Node: Shell Parameter Expansion53541
Node: Command Substitution61241
Node: Arithmetic Expansion62574
Node: Process Substitution63424
Node: Word Splitting64474
Node: Filename Expansion66097
Node: Pattern Matching68237
Node: Quote Removal71555
Node: Redirections71850
Node: Executing Commands79580
Node: Simple Command Expansion80250
Node: Command Search and Execution82180
Node: Command Execution Environment84186
Node: Environment86985
Node: Exit Status88645
Node: Signals89849
Node: Shell Scripts91817
Node: Shell Builtin Commands94335
Node: Bourne Shell Builtins96012
Node: Bash Builtins113242
Node: Modifying Shell Behavior133374
Node: The Set Builtin133719
Node: The Shopt Builtin142567
Node: Special Builtins152797
Node: Shell Variables153776
Node: Bourne Shell Variables154216
Node: Bash Variables156197
Node: Bash Features177569
Node: Invoking Bash178452
Node: Bash Startup Files184261
Node: Interactive Shells189230
Node: What is an Interactive Shell?189640
Node: Is this Shell Interactive?190289
Node: Interactive Shell Behavior191104
Node: Bash Conditional Expressions194384
Node: Shell Arithmetic197963
Node: Aliases200709
Node: Arrays203281
Node: The Directory Stack206630
Node: Directory Stack Builtins207344
Node: Printing a Prompt210236
Node: The Restricted Shell212950
Node: Bash POSIX Mode214782
Node: Job Control222541
Node: Job Control Basics223001
Node: Job Control Builtins227510
Node: Job Control Variables231837
Node: Command Line Editing232995
Node: Introduction and Notation233990
Node: Readline Interaction235612
Node: Readline Bare Essentials236803
Node: Readline Movement Commands238592
Node: Readline Killing Commands239557
Node: Readline Arguments241477
Node: Searching242521
Node: Readline Init File244707
Node: Readline Init File Syntax245854
Node: Conditional Init Constructs258229
Node: Sample Init File260762
Node: Bindable Readline Commands263879
Node: Commands For Moving265086
Node: Commands For History265947
Node: Commands For Text269102
Node: Commands For Killing271775
Node: Numeric Arguments273917
Node: Commands For Completion275056
Node: Keyboard Macros278649
Node: Miscellaneous Commands279220
Node: Readline vi Mode284531
Node: Programmable Completion285445
Node: Programmable Completion Builtins291263
Node: Using History Interactively298859
Node: Bash History Facilities299543
Node: Bash History Builtins302457
Node: History Interaction306314
Node: Event Designators309019
Node: Word Designators310034
Node: Modifiers311673
Node: Installing Bash313077
Node: Basic Installation314214
Node: Compilers and Options316906
Node: Compiling For Multiple Architectures317647
Node: Installation Names319311
Node: Specifying the System Type320129
Node: Sharing Defaults320845
Node: Operation Controls321518
Node: Optional Features322476
Node: Reporting Bugs331407
Node: Major Differences From The Bourne Shell332601
Node: GNU Free Documentation License349281
Node: Indexes371742
Node: Builtin Index372196
Node: Reserved Word Index378729
Node: Variable Index381177
Node: Function Index392341
Node: Concept Index399073
Node: Top1350
Node: Introduction3189
Node: What is Bash?3417
Node: What is a shell?4530
Node: Definitions7070
Node: Basic Shell Features9839
Node: Shell Syntax11058
Node: Shell Operation12088
Node: Quoting13382
Node: Escape Character14685
Node: Single Quotes15170
Node: Double Quotes15518
Node: ANSI-C Quoting16643
Node: Locale Translation17599
Node: Comments18495
Node: Shell Commands19113
Node: Simple Commands19879
Node: Pipelines20510
Node: Lists22385
Node: Compound Commands24016
Node: Looping Constructs24800
Node: Conditional Constructs27247
Node: Command Grouping34807
Node: Shell Functions36286
Node: Shell Parameters40747
Node: Positional Parameters43077
Node: Special Parameters43977
Node: Shell Expansions46941
Node: Brace Expansion48866
Node: Tilde Expansion51192
Node: Shell Parameter Expansion53543
Node: Command Substitution61243
Node: Arithmetic Expansion62576
Node: Process Substitution63426
Node: Word Splitting64476
Node: Filename Expansion66099
Node: Pattern Matching68239
Node: Quote Removal71557
Node: Redirections71852
Node: Executing Commands79582
Node: Simple Command Expansion80252
Node: Command Search and Execution82182
Node: Command Execution Environment84188
Node: Environment86987
Node: Exit Status88647
Node: Signals90268
Node: Shell Scripts92236
Node: Shell Builtin Commands94754
Node: Bourne Shell Builtins96431
Node: Bash Builtins113661
Node: Modifying Shell Behavior133791
Node: The Set Builtin134136
Node: The Shopt Builtin142984
Node: Special Builtins153392
Node: Shell Variables154371
Node: Bourne Shell Variables154811
Node: Bash Variables156792
Node: Bash Features178164
Node: Invoking Bash179047
Node: Bash Startup Files184856
Node: Interactive Shells189825
Node: What is an Interactive Shell?190235
Node: Is this Shell Interactive?190884
Node: Interactive Shell Behavior191699
Node: Bash Conditional Expressions194979
Node: Shell Arithmetic198558
Node: Aliases201304
Node: Arrays203876
Node: The Directory Stack207225
Node: Directory Stack Builtins207939
Node: Printing a Prompt210831
Node: The Restricted Shell213545
Node: Bash POSIX Mode215377
Node: Job Control223136
Node: Job Control Basics223596
Node: Job Control Builtins228105
Node: Job Control Variables232432
Node: Command Line Editing233590
Node: Introduction and Notation234585
Node: Readline Interaction236207
Node: Readline Bare Essentials237398
Node: Readline Movement Commands239187
Node: Readline Killing Commands240152
Node: Readline Arguments242072
Node: Searching243116
Node: Readline Init File245302
Node: Readline Init File Syntax246449
Node: Conditional Init Constructs258824
Node: Sample Init File261357
Node: Bindable Readline Commands264474
Node: Commands For Moving265681
Node: Commands For History266542
Node: Commands For Text269697
Node: Commands For Killing272370
Node: Numeric Arguments274512
Node: Commands For Completion275651
Node: Keyboard Macros279244
Node: Miscellaneous Commands279815
Node: Readline vi Mode285126
Node: Programmable Completion286040
Node: Programmable Completion Builtins291858
Node: Using History Interactively299454
Node: Bash History Facilities300138
Node: Bash History Builtins303052
Node: History Interaction306909
Node: Event Designators309614
Node: Word Designators310629
Node: Modifiers312268
Node: Installing Bash313672
Node: Basic Installation314809
Node: Compilers and Options317501
Node: Compiling For Multiple Architectures318242
Node: Installation Names319906
Node: Specifying the System Type320724
Node: Sharing Defaults321440
Node: Operation Controls322113
Node: Optional Features323071
Node: Reporting Bugs332002
Node: Major Differences From The Bourne Shell333196
Node: GNU Free Documentation License349876
Node: Indexes372337
Node: Builtin Index372791
Node: Reserved Word Index379324
Node: Variable Index381772
Node: Function Index392936
Node: Concept Index399668

End Tag Table
+13 -13
View File
@@ -1,4 +1,4 @@
This is TeX, Version 3.141592 (Web2C 7.5.4) (format=tex 2006.11.28) 10 JAN 2008 17:41
This is TeX, Version 3.141592 (Web2C 7.5.4) (format=tex 2006.11.28) 4 MAR 2008 08:38
**/Users/chet/src/bash/src/doc/bashref.texi
(/Users/chet/src/bash/src/doc/bashref.texi (./texinfo.tex
Loading texinfo [version 2003-02-03.16]: Basics,
@@ -158,7 +158,7 @@ localization,
[1]
Chapter 2 [2] [3] Chapter 3 [4] [5] [6] [7] [8] [9] [10]
Overfull \hbox (43.33539pt too wide) in paragraph at lines 839--839
Overfull \hbox (43.33539pt too wide) in paragraph at lines 840--840
[]@texttt case @textttsl word @texttt in [ [(] @textttsl pat-tern @texttt [| @
textttsl pat-tern@texttt ][]) @textttsl command-list @texttt ;;][] esac[][]
@@ -173,7 +173,7 @@ textttsl pat-tern@texttt ][]) @textttsl command-list @texttt ;;][] esac[][]
[11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25]
[26] [27] [28] [29] [30] [31] [32] Chapter 4 [33] [34] [35] [36] [37] [38]
[39] [40] [41]
Underfull \hbox (badness 5231) in paragraph at lines 3127--3140
Underfull \hbox (badness 5231) in paragraph at lines 3136--3149
@texttt emacs-meta[]@textrm , @texttt emacs-ctlx[]@textrm , @texttt vi[]@textr
m , @texttt vi-move[]@textrm , @texttt vi-command[]@textrm , and
@@ -186,7 +186,7 @@ m , @texttt vi-move[]@textrm , @texttt vi-command[]@textrm , and
.etc.
[42] [43] [44] [45]
Overfull \hbox (43.33536pt too wide) in paragraph at lines 3470--3470
Overfull \hbox (43.33536pt too wide) in paragraph at lines 3479--3479
[]@texttt read [-ers] [-a @textttsl aname@texttt ] [-d @textttsl de-lim@texttt
] [-n @textttsl nchars@texttt ] [-p @textttsl prompt@texttt ] [-t @textttsl ti
me-
@@ -200,7 +200,7 @@ me-
.etc.
[46] [47] [48] [49] [50] [51] [52] [53]
Underfull \hbox (badness 2573) in paragraph at lines 4097--4101
Underfull \hbox (badness 2573) in paragraph at lines 4111--4115
[] []@textrm Error trac-ing is en-abled: com-mand sub-sti-tu-tion, shell
@hbox(7.60416+2.12917)x433.62, glue set 2.95305
@@ -217,7 +217,7 @@ Underfull \hbox (badness 2573) in paragraph at lines 4097--4101
[54] [55] [56] Chapter 5 [57] [58] [59] [60] [61] [62] [63] [64] [65] [66]
Chapter 6 [67] [68]
Overfull \hbox (51.96864pt too wide) in paragraph at lines 4914--4914
Overfull \hbox (51.96864pt too wide) in paragraph at lines 4928--4928
[]@texttt bash [long-opt] [-ir] [-abefhkmnptuvxdBCDHP] [-o @textttsl op-tion@t
exttt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
@@ -230,7 +230,7 @@ exttt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
.etc.
Overfull \hbox (76.23077pt too wide) in paragraph at lines 4915--4915
Overfull \hbox (76.23077pt too wide) in paragraph at lines 4929--4929
[]@texttt bash [long-opt] [-abefhkmnptuvxdBCDHP] [-o @textttsl op-tion@texttt
] [-O @textttsl shopt_option@texttt ] -c @textttsl string @texttt [@textttsl ar
-
@@ -244,7 +244,7 @@ Overfull \hbox (76.23077pt too wide) in paragraph at lines 4915--4915
.etc.
Overfull \hbox (34.72258pt too wide) in paragraph at lines 4916--4916
Overfull \hbox (34.72258pt too wide) in paragraph at lines 4930--4930
[]@texttt bash [long-opt] -s [-abefhkmnptuvxdBCDHP] [-o @textttsl op-tion@text
tt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
@@ -257,7 +257,7 @@ tt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
.etc.
[69] [70]
Underfull \hbox (badness 2245) in paragraph at lines 5090--5092
Underfull \hbox (badness 2245) in paragraph at lines 5104--5106
[]@textrm When a lo-gin shell ex-its, Bash reads and ex-e-cutes com-mands from
the file
@@ -270,7 +270,7 @@ the file
.etc.
[71] [72] [73] [74] [75] [76] [77] [78] [79] [80] [81] [82] [83] [84]
Underfull \hbox (badness 2521) in paragraph at lines 6206--6209
Underfull \hbox (badness 2521) in paragraph at lines 6220--6223
@textrm `@texttt --enable-strict-posix-default[]@textrm '[] to @texttt configur
e[] @textrm when build-ing (see Sec-tion 10.8
@@ -337,7 +337,7 @@ Underfull \hbox (badness 2753) in paragraph at lines 1768--1771
[115]) (/Users/chet/src/bash/src/lib/readline/doc/hsuser.texi Chapter 9
[116] [117] [118] [119] [120]) Chapter 10 [121] [122] [123] [124] [125]
Underfull \hbox (badness 2772) in paragraph at lines 6802--6806
Underfull \hbox (badness 2772) in paragraph at lines 6816--6820
[]@textrm Enable sup-port for large files (@texttt http://www.sas.com/standard
s/large_
@@ -374,10 +374,10 @@ Overfull \vbox (45.46959pt too high) has occurred while \output is active
Here is how much of TeX's memory you used:
1732 strings out of 97980
23635 string characters out of 1221004
55301 words of memory out of 1000000
55303 words of memory out of 1000000
2583 multiletter control sequences out of 10000+50000
31953 words of font info for 111 fonts, out of 500000 for 2000
19 hyphenation exceptions out of 1000
15i,8n,11p,269b,471s stack positions out of 1500i,500n,5000p,200000b,5000s
Output written on bashref.dvi (160 pages, 612328 bytes).
Output written on bashref.dvi (160 pages, 613080 bytes).
+223 -209
View File
@@ -11,7 +11,7 @@
%DVIPSWebPage: (www.radicaleye.com)
%DVIPSCommandLine: dvips -D 600 -t letter -o bashref.ps bashref.dvi
%DVIPSParameters: dpi=600
%DVIPSSource: TeX output 2008.01.10:1741
%DVIPSSource: TeX output 2008.03.04:0838
%%BeginProcSet: tex.pro 0 0
%!
/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S
@@ -4537,19 +4537,19 @@ letter
TeXDict begin 1 0 bop 150 1318 a Fu(Bash)64 b(Reference)j(Man)-5
b(ual)p 150 1385 3600 34 v 2361 1481 a Ft(Reference)31
b(Do)s(cumen)m(tation)i(for)d(Bash)2428 1589 y(Edition)h(3.2,)g(for)f
Fs(Bash)g Ft(V)-8 b(ersion)31 b(3.2.)3145 1697 y(Decem)m(b)s(er)g(2007)
150 4935 y Fr(Chet)45 b(Ramey)-11 b(,)46 b(Case)g(W)-11
b(estern)46 b(Reserv)l(e)g(Univ)l(ersit)l(y)150 5068
y(Brian)f(F)-11 b(o)l(x,)45 b(F)-11 b(ree)45 b(Soft)l(w)l(are)h(F)-11
b(oundation)p 150 5141 3600 17 v eop end
Fs(Bash)g Ft(V)-8 b(ersion)31 b(3.2.)3180 1697 y(F)-8
b(ebruary)30 b(2008)150 4935 y Fr(Chet)45 b(Ramey)-11
b(,)46 b(Case)g(W)-11 b(estern)46 b(Reserv)l(e)g(Univ)l(ersit)l(y)150
5068 y(Brian)f(F)-11 b(o)l(x,)45 b(F)-11 b(ree)45 b(Soft)l(w)l(are)h(F)
-11 b(oundation)p 150 5141 3600 17 v eop end
%%Page: 2 2
TeXDict begin 2 1 bop 150 2889 a Ft(This)35 b(text)h(is)g(a)g(brief)f
(description)h(of)f(the)h(features)g(that)g(are)g(presen)m(t)g(in)f
(the)h(Bash)f(shell)h(\(v)m(ersion)150 2999 y(3.2,)c(14)f(Decem)m(b)s
(er)g(2007\).)150 3133 y(This)f(is)g(Edition)h(3.2,)h(last)g(up)s
(dated)d(14)i(Decem)m(b)s(er)h(2007,)h(of)d Fq(The)g(GNU)i(Bash)e
(Reference)i(Man)m(ual)p Ft(,)150 3243 y(for)e Fs(Bash)p
Ft(,)g(V)-8 b(ersion)31 b(3.2.)150 3377 y(Cop)m(yrigh)m(t)602
(the)h(Bash)f(shell)h(\(v)m(ersion)150 2999 y(3.2,)c(22)f(F)-8
b(ebruary)30 b(2008\).)150 3133 y(This)g(is)h(Edition)g(3.2,)h(last)g
(up)s(dated)e(22)h(F)-8 b(ebruary)31 b(2008,)i(of)e Fq(The)g(GNU)g
(Bash)g(Reference)h(Man)m(ual)p Ft(,)150 3243 y(for)e
Fs(Bash)p Ft(,)g(V)-8 b(ersion)31 b(3.2.)150 3377 y(Cop)m(yrigh)m(t)602
3374 y(c)577 3377 y Fp(\015)f Ft(1988{2007)35 b(F)-8
b(ree)31 b(Soft)m(w)m(are)h(F)-8 b(oundation,)31 b(Inc.)150
3512 y(P)m(ermission)h(is)h(gran)m(ted)g(to)f(mak)m(e)i(and)d
@@ -4568,12 +4568,12 @@ b(texts)e(b)s(eing)g(\\A)g(GNU)g(Man)m(ual",)h(and)e(with)g(the)h(Bac)m
(k-Co)m(v)m(er)390 4194 y(T)-8 b(exts)33 b(as)g(in)f(\(a\))h(b)s(elo)m
(w.)47 b(A)33 b(cop)m(y)g(of)f(the)h(license)g(is)g(included)e(in)h
(the)h(section)g(en)m(titled)390 4304 y(\\GNU)e(F)-8
b(ree)32 b(Do)s(cumen)m(tation)g(License".)390 4438 y(\(a\))c(The)e
(FSF's)h(Bac)m(k-Co)m(v)m(er)j(T)-8 b(ext)28 b(is:)39
b(\\Y)-8 b(ou)27 b(are)g(free)g(to)h(cop)m(y)f(and)g(mo)s(dify)f(this)g
(GNU)390 4548 y(Man)m(ual.)41 b(Buying)30 b(copies)g(from)f(GNU)h
(Press)e(supp)s(orts)g(the)h(FSF)h(in)f(dev)m(eloping)h(GNU)390
4658 y(and)g(promoting)g(soft)m(w)m(are)i(freedom.")150
b(ree)32 b(Do)s(cumen)m(tation)g(License".)390 4438 y(\(a\))e(The)e
(FSF's)h(Bac)m(k-Co)m(v)m(er)j(T)-8 b(ext)30 b(is:)40
b(\\Y)-8 b(ou)30 b(ha)m(v)m(e)g(the)f(freedom)f(to)i(cop)m(y)g(and)e
(mo)s(dify)390 4548 y(this)f(GNU)i(man)m(ual.)40 b(Buying)27
b(copies)i(from)e(the)h(FSF)f(supp)s(orts)f(it)i(in)g(dev)m(eloping)g
(GNU)390 4658 y(and)i(promoting)g(soft)m(w)m(are)i(freedom.")150
4902 y(Published)d(b)m(y)h(the)h(F)-8 b(ree)31 b(Soft)m(w)m(are)h(F)-8
b(oundation)150 5011 y(59)31 b(T)-8 b(emple)31 b(Place,)h(Suite)e(330,)
150 5121 y(Boston,)i(MA)e(02111-1307)150 5230 y(USA)p
@@ -7120,194 +7120,205 @@ b(the)h(\014le)f(descriptors)g(of)h(the)f(calling)i(shell)f(as)f(mo)s
%%Page: 31 37
TeXDict begin 31 36 bop 150 -116 a Ft(Chapter)30 b(3:)41
b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(31)150 299
y Fk(3.7.4)63 b(En)m(vironmen)m(t)275 546 y Ft(When)31
y Fk(3.7.4)63 b(En)m(vironmen)m(t)275 547 y Ft(When)31
b(a)g(program)h(is)f(in)m(v)m(ok)m(ed)i(it)f(is)f(giv)m(en)h(an)g(arra)
m(y)g(of)f(strings)g(called)i(the)e Fq(en)m(vironmen)m(t)p
Ft(.)45 b(This)150 656 y(is)30 b(a)h(list)g(of)g(name-v)-5
b(alue)31 b(pairs,)f(of)h(the)f(form)g Fs(name=value)p
Ft(.)275 793 y(Bash)39 b(pro)m(vides)g(sev)m(eral)i(w)m(a)m(ys)g(to)f
Ft(.)275 795 y(Bash)39 b(pro)m(vides)g(sev)m(eral)i(w)m(a)m(ys)g(to)f
(manipulate)f(the)h(en)m(vironmen)m(t.)69 b(On)38 b(in)m(v)m(o)s
(cation,)44 b(the)c(shell)150 903 y(scans)g(its)h(o)m(wn)f(en)m
(cation,)44 b(the)c(shell)150 904 y(scans)g(its)h(o)m(wn)f(en)m
(vironmen)m(t)h(and)f(creates)i(a)f(parameter)f(for)g(eac)m(h)i(name)e
(found,)i(automatically)150 1012 y(marking)26 b(it)g(for)g
(found,)i(automatically)150 1014 y(marking)26 b(it)g(for)g
Fq(exp)s(ort)h Ft(to)g(c)m(hild)f(pro)s(cesses.)39 b(Executed)26
b(commands)g(inherit)g(the)g(en)m(vironmen)m(t.)39 b(The)150
1122 y Fs(export)c Ft(and)i(`)p Fs(declare)29 b(-x)p
1123 y Fs(export)c Ft(and)i(`)p Fs(declare)29 b(-x)p
Ft(')36 b(commands)h(allo)m(w)i(parameters)e(and)g(functions)g(to)h(b)s
(e)e(added)h(to)h(and)150 1231 y(deleted)21 b(from)f(the)h(en)m
(e)e(added)h(to)h(and)150 1233 y(deleted)21 b(from)f(the)h(en)m
(vironmen)m(t.)38 b(If)20 b(the)h(v)-5 b(alue)21 b(of)g(a)g(parameter)g
(in)f(the)g(en)m(vironmen)m(t)i(is)e(mo)s(di\014ed,)i(the)150
1341 y(new)31 b(v)-5 b(alue)32 b(b)s(ecomes)f(part)h(of)f(the)h(en)m
1343 y(new)31 b(v)-5 b(alue)32 b(b)s(ecomes)f(part)h(of)f(the)h(en)m
(vironmen)m(t,)g(replacing)h(the)e(old.)44 b(The)31 b(en)m(vironmen)m
(t)h(inherited)150 1451 y(b)m(y)f(an)m(y)g(executed)h(command)f
(t)h(inherited)150 1452 y(b)m(y)f(an)m(y)g(executed)h(command)f
(consists)g(of)g(the)g(shell's)h(initial)g(en)m(vironmen)m(t,)g(whose)f
(v)-5 b(alues)31 b(ma)m(y)h(b)s(e)150 1560 y(mo)s(di\014ed)26
(v)-5 b(alues)31 b(ma)m(y)h(b)s(e)150 1562 y(mo)s(di\014ed)26
b(in)g(the)h(shell,)h(less)f(an)m(y)g(pairs)f(remo)m(v)m(ed)i(b)m(y)f
(the)g Fs(unset)e Ft(and)h(`)p Fs(export)j(-n)p Ft(')e(commands,)g
(plus)150 1670 y(an)m(y)k(additions)f(via)h(the)g Fs(export)d
Ft(and)i(`)p Fs(declare)f(-x)p Ft(')h(commands.)275 1807
(plus)150 1671 y(an)m(y)k(additions)f(via)h(the)g Fs(export)d
Ft(and)i(`)p Fs(declare)f(-x)p Ft(')h(commands.)275 1810
y(The)j(en)m(vironmen)m(t)i(for)f(an)m(y)g(simple)h(command)f(or)g
(function)g(ma)m(y)g(b)s(e)g(augmen)m(ted)h(temp)s(orarily)150
1917 y(b)m(y)c(pre\014xing)e(it)i(with)g(parameter)g(assignmen)m(ts,)h
1919 y(b)m(y)c(pre\014xing)e(it)i(with)g(parameter)g(assignmen)m(ts,)h
(as)e(describ)s(ed)g(in)g(Section)i(3.4)g([Shell)e(P)m(arameters],)150
2026 y(page)g(15.)41 b(These)29 b(assignmen)m(t)i(statemen)m(ts)g
2029 y(page)g(15.)41 b(These)29 b(assignmen)m(t)i(statemen)m(ts)g
(a\013ect)f(only)g(the)f(en)m(vironmen)m(t)h(seen)g(b)m(y)f(that)h
(command.)275 2164 y(If)d(the)h(`)p Fs(-k)p Ft(')g(option)g(is)g(set)g
(command.)275 2167 y(If)d(the)h(`)p Fs(-k)p Ft(')g(option)g(is)g(set)g
(\(see)h(Section)f(4.3.1)i([The)e(Set)g(Builtin],)h(page)f(49\),)i
(then)e(all)g(parameter)150 2273 y(assignmen)m(ts)i(are)g(placed)h(in)e
(then)e(all)g(parameter)150 2277 y(assignmen)m(ts)i(are)g(placed)h(in)e
(the)h(en)m(vironmen)m(t)g(for)g(a)g(command,)f(not)h(just)f(those)i
(that)f(precede)g(the)150 2383 y(command)g(name.)275
2521 y(When)f(Bash)h(in)m(v)m(ok)m(es)i(an)e(external)g(command,)g(the)
(that)f(precede)g(the)150 2386 y(command)g(name.)275
2525 y(When)f(Bash)h(in)m(v)m(ok)m(es)i(an)e(external)g(command,)g(the)
g(v)-5 b(ariable)31 b(`)p Fs($_)p Ft(')f(is)g(set)g(to)h(the)f(full)f
(path)h(name)150 2630 y(of)h(the)f(command)g(and)g(passed)g(to)h(that)g
(command)f(in)g(its)h(en)m(vironmen)m(t.)150 2860 y Fk(3.7.5)63
b(Exit)40 b(Status)275 3107 y Ft(F)-8 b(or)32 b(the)g(shell's)g(purp)s
(path)h(name)150 2634 y(of)h(the)f(command)g(and)g(passed)g(to)h(that)g
(command)f(in)g(its)h(en)m(vironmen)m(t.)150 2866 y Fk(3.7.5)63
b(Exit)40 b(Status)275 3114 y Ft(The)24 b(exit)i(status)f(of)g(an)g
(executed)h(command)e(is)h(the)h(v)-5 b(alue)25 b(returned)f(b)m(y)h
(the)g Fq(w)m(aitpid)k Ft(system)c(call)150 3224 y(or)e(equiv)-5
b(alen)m(t)25 b(function.)38 b(Exit)24 b(statuses)g(fall)f(b)s(et)m(w)m
(een)h(0)g(and)f(255,)j(though,)f(as)e(explained)h(b)s(elo)m(w,)h(the)
150 3333 y(shell)35 b(ma)m(y)g(use)f(v)-5 b(alues)35
b(ab)s(o)m(v)m(e)g(125)h(sp)s(ecially)-8 b(.)54 b(Exit)35
b(statuses)g(from)f(shell)h(builtins)f(and)f(comp)s(ound)150
3443 y(commands)j(are)g(also)h(limited)g(to)g(this)f(range.)58
b(Under)36 b(certain)h(circumstances,)h(the)e(shell)h(will)f(use)150
3552 y(sp)s(ecial)31 b(v)-5 b(alues)31 b(to)g(indicate)g(sp)s(eci\014c)
f(failure)h(mo)s(des.)275 3691 y(F)-8 b(or)32 b(the)g(shell's)g(purp)s
(oses,)e(a)j(command)e(whic)m(h)h(exits)g(with)g(a)g(zero)g(exit)h
(status)f(has)f(succeeded.)150 3217 y(A)e(non-zero)h(exit)g(status)g
(status)f(has)f(succeeded.)150 3800 y(A)e(non-zero)h(exit)g(status)g
(indicates)g(failure.)40 b(This)28 b(seemingly)i(coun)m(ter-in)m
(tuitiv)m(e)i(sc)m(heme)e(is)f(used)g(so)150 3327 y(there)34
(tuitiv)m(e)i(sc)m(heme)e(is)f(used)g(so)150 3910 y(there)34
b(is)g(one)g(w)m(ell-de\014ned)g(w)m(a)m(y)g(to)h(indicate)g(success)f
(and)f(a)h(v)-5 b(ariet)m(y)35 b(of)f(w)m(a)m(ys)h(to)f(indicate)h(v)-5
b(arious)150 3436 y(failure)38 b(mo)s(des.)62 b(When)38
b(arious)150 4020 y(failure)38 b(mo)s(des.)62 b(When)38
b(a)g(command)f(terminates)i(on)e(a)i(fatal)g(signal)f(whose)g(n)m(um)m
(b)s(er)e(is)i Fq(N)p Ft(,)g(Bash)150 3546 y(uses)30
(b)s(er)e(is)i Fq(N)p Ft(,)g(Bash)150 4129 y(uses)30
b(the)g(v)-5 b(alue)31 b(128)p Fs(+)p Fq(N)42 b Ft(as)30
b(the)h(exit)g(status.)275 3683 y(If)k(a)h(command)g(is)g(not)g(found,)
b(the)h(exit)g(status.)275 4267 y(If)k(a)h(command)g(is)g(not)g(found,)
g(the)g(c)m(hild)h(pro)s(cess)e(created)i(to)g(execute)g(it)g(returns)d
(a)j(status)f(of)150 3793 y(127.)42 b(If)30 b(a)h(command)f(is)g(found)
(a)j(status)f(of)150 4377 y(127.)42 b(If)30 b(a)h(command)f(is)g(found)
f(but)h(is)g(not)h(executable,)h(the)f(return)e(status)i(is)f(126.)275
3930 y(If)i(a)i(command)f(fails)g(b)s(ecause)g(of)h(an)f(error)f
4515 y(If)i(a)i(command)f(fails)g(b)s(ecause)g(of)h(an)f(error)f
(during)g(expansion)h(or)g(redirection,)i(the)f(exit)g(status)150
4040 y(is)c(greater)i(than)e(zero.)275 4177 y(The)38
4625 y(is)c(greater)i(than)e(zero.)275 4763 y(The)38
b(exit)h(status)g(is)g(used)f(b)m(y)g(the)h(Bash)g(conditional)h
(commands)e(\(see)h(Section)h(3.2.4.2)h([Con-)150 4287
(commands)e(\(see)h(Section)h(3.2.4.2)h([Con-)150 4873
y(ditional)i(Constructs],)h(page)f(10\))g(and)e(some)i(of)f(the)g(list)
g(constructs)g(\(see)h(Section)f(3.2.3)i([Lists],)150
4397 y(page)31 b(9\).)275 4534 y(All)40 b(of)g(the)h(Bash)f(builtins)f
4982 y(page)31 b(9\).)275 5121 y(All)40 b(of)g(the)h(Bash)f(builtins)f
(return)g(an)h(exit)h(status)g(of)f(zero)h(if)f(they)g(succeed)g(and)g
(a)g(non-zero)150 4644 y(status)34 b(on)f(failure,)i(so)f(they)g(ma)m
(a)g(non-zero)150 5230 y(status)34 b(on)f(failure,)i(so)f(they)g(ma)m
(y)g(b)s(e)f(used)g(b)m(y)g(the)h(conditional)h(and)e(list)h
(constructs.)50 b(All)35 b(builtins)150 4753 y(return)29
b(an)i(exit)g(status)g(of)f(2)h(to)g(indicate)g(incorrect)h(usage.)150
4983 y Fk(3.7.6)63 b(Signals)275 5230 y Ft(When)27 b(Bash)h(is)h(in)m
(teractiv)m(e,)i(in)d(the)g(absence)h(of)f(an)m(y)g(traps,)h(it)f
(ignores)h Fs(SIGTERM)d Ft(\(so)i(that)h(`)p Fs(kill)150
5340 y(0)p Ft(')k(do)s(es)g(not)g(kill)g(an)g(in)m(teractiv)m(e)j
(shell\),)f(and)d Fs(SIGINT)f Ft(is)i(caugh)m(t)h(and)f(handled)f(\(so)
h(that)h(the)f Fs(wait)p eop end
(constructs.)50 b(All)35 b(builtins)150 5340 y(return)29
b(an)i(exit)g(status)g(of)f(2)h(to)g(indicate)g(incorrect)h(usage.)p
eop end
%%Page: 32 38
TeXDict begin 32 37 bop 150 -116 a Ft(32)2572 b(Bash)31
b(Reference)g(Man)m(ual)150 299 y(builtin)24 b(is)h(in)m
(terruptible\).)39 b(When)24 b(Bash)g(receiv)m(es)j(a)d
Fs(SIGINT)p Ft(,)h(it)g(breaks)f(out)h(of)f(an)m(y)h(executing)h(lo)s
(ops.)150 408 y(In)31 b(all)h(cases,)h(Bash)f(ignores)g
Fs(SIGQUIT)p Ft(.)42 b(If)32 b(job)f(con)m(trol)i(is)e(in)h(e\013ect)h
(\(see)f(Chapter)f(7)h([Job)g(Con)m(trol],)150 518 y(page)f(87\),)h
(Bash)e(ignores)h Fs(SIGTTIN)p Ft(,)e Fs(SIGTTOU)p Ft(,)g(and)g
Fs(SIGTSTP)p Ft(.)275 654 y(Non-builtin)i(commands)g(started)g(b)m(y)g
(Bash)h(ha)m(v)m(e)g(signal)g(handlers)e(set)i(to)g(the)g(v)-5
b(alues)31 b(inherited)150 763 y(b)m(y)37 b(the)h(shell)g(from)f(its)h
(paren)m(t.)62 b(When)38 b(job)f(con)m(trol)i(is)e(not)h(in)f
(e\013ect,)k(async)m(hronous)c(commands)150 873 y(ignore)f
Fs(SIGINT)e Ft(and)h Fs(SIGQUIT)e Ft(in)j(addition)f(to)i(these)f
(inherited)f(handlers.)55 b(Commands)35 b(run)f(as)i(a)150
983 y(result)27 b(of)h(command)f(substitution)h(ignore)g(the)g(k)m(eyb)
s(oard-generated)g(job)g(con)m(trol)h(signals)f Fs(SIGTTIN)p
Ft(,)150 1092 y Fs(SIGTTOU)p Ft(,)h(and)g Fs(SIGTSTP)p
Ft(.)275 1228 y(The)h(shell)i(exits)g(b)m(y)f(default)g(up)s(on)f
b(Reference)g(Man)m(ual)150 299 y Fk(3.7.6)63 b(Signals)275
555 y Ft(When)27 b(Bash)h(is)h(in)m(teractiv)m(e,)i(in)d(the)g(absence)
h(of)f(an)m(y)g(traps,)h(it)f(ignores)h Fs(SIGTERM)d
Ft(\(so)i(that)h(`)p Fs(kill)150 665 y(0)p Ft(')k(do)s(es)g(not)g(kill)
g(an)g(in)m(teractiv)m(e)j(shell\),)f(and)d Fs(SIGINT)f
Ft(is)i(caugh)m(t)h(and)f(handled)f(\(so)h(that)h(the)f
Fs(wait)150 774 y Ft(builtin)24 b(is)h(in)m(terruptible\).)39
b(When)24 b(Bash)g(receiv)m(es)j(a)d Fs(SIGINT)p Ft(,)h(it)g(breaks)f
(out)h(of)f(an)m(y)h(executing)h(lo)s(ops.)150 884 y(In)31
b(all)h(cases,)h(Bash)f(ignores)g Fs(SIGQUIT)p Ft(.)42
b(If)32 b(job)f(con)m(trol)i(is)e(in)h(e\013ect)h(\(see)f(Chapter)f(7)h
([Job)g(Con)m(trol],)150 993 y(page)f(87\),)h(Bash)e(ignores)h
Fs(SIGTTIN)p Ft(,)e Fs(SIGTTOU)p Ft(,)g(and)g Fs(SIGTSTP)p
Ft(.)275 1140 y(Non-builtin)i(commands)g(started)g(b)m(y)g(Bash)h(ha)m
(v)m(e)g(signal)g(handlers)e(set)i(to)g(the)g(v)-5 b(alues)31
b(inherited)150 1250 y(b)m(y)37 b(the)h(shell)g(from)f(its)h(paren)m
(t.)62 b(When)38 b(job)f(con)m(trol)i(is)e(not)h(in)f(e\013ect,)k
(async)m(hronous)c(commands)150 1359 y(ignore)f Fs(SIGINT)e
Ft(and)h Fs(SIGQUIT)e Ft(in)j(addition)f(to)i(these)f(inherited)f
(handlers.)55 b(Commands)35 b(run)f(as)i(a)150 1469 y(result)27
b(of)h(command)f(substitution)h(ignore)g(the)g(k)m(eyb)s
(oard-generated)g(job)g(con)m(trol)h(signals)f Fs(SIGTTIN)p
Ft(,)150 1578 y Fs(SIGTTOU)p Ft(,)h(and)g Fs(SIGTSTP)p
Ft(.)275 1725 y(The)h(shell)i(exits)g(b)m(y)f(default)g(up)s(on)f
(receipt)i(of)f(a)h Fs(SIGHUP)p Ft(.)42 b(Before)32 b(exiting,)h(an)e
(in)m(teractiv)m(e)j(shell)150 1337 y(resends)41 b(the)i
(in)m(teractiv)m(e)j(shell)150 1835 y(resends)41 b(the)i
Fs(SIGHUP)e Ft(to)i(all)g(jobs,)i(running)c(or)h(stopp)s(ed.)76
b(Stopp)s(ed)41 b(jobs)h(are)h(sen)m(t)g Fs(SIGCONT)d
Ft(to)150 1447 y(ensure)32 b(that)h(they)g(receiv)m(e)i(the)e
Ft(to)150 1944 y(ensure)32 b(that)h(they)g(receiv)m(e)i(the)e
Fs(SIGHUP)p Ft(.)47 b(T)-8 b(o)33 b(prev)m(en)m(t)g(the)g(shell)g(from)
g(sending)f(the)h Fs(SIGHUP)e Ft(signal)150 1557 y(to)i(a)g(particular)
g(sending)f(the)h Fs(SIGHUP)e Ft(signal)150 2054 y(to)i(a)g(particular)
g(job,)g(it)g(should)f(b)s(e)g(remo)m(v)m(ed)h(from)g(the)f(jobs)g
(table)i(with)e(the)h Fs(disown)e Ft(builtin)h(\(see)150
1666 y(Section)f(7.2)g([Job)f(Con)m(trol)h(Builtins],)g(page)g(88\))h
2163 y(Section)f(7.2)g([Job)f(Con)m(trol)h(Builtins],)g(page)g(88\))h
(or)e(mark)m(ed)g(to)h(not)f(receiv)m(e)i Fs(SIGHUP)d
Ft(using)h Fs(disown)150 1776 y(-h)p Ft(.)275 1912 y(If)38
Ft(using)h Fs(disown)150 2273 y(-h)p Ft(.)275 2419 y(If)38
b(the)h Fs(huponexit)e Ft(shell)i(option)g(has)g(b)s(een)f(set)i(with)f
Fs(shopt)e Ft(\(see)j(Section)g(4.3.2)h([The)e(Shopt)150
2021 y(Builtin],)31 b(page)g(53\),)h(Bash)f(sends)e(a)i
2529 y(Builtin],)31 b(page)g(53\),)h(Bash)f(sends)e(a)i
Fs(SIGHUP)e Ft(to)i(all)g(jobs)f(when)f(an)i(in)m(teractiv)m(e)i(login)
e(shell)g(exits.)275 2157 y(If)38 b(Bash)h(is)g(w)m(aiting)h(for)f(a)g
e(shell)g(exits.)275 2676 y(If)38 b(Bash)h(is)g(w)m(aiting)h(for)f(a)g
(command)f(to)i(complete)g(and)e(receiv)m(es)j(a)e(signal)h(for)e(whic)
m(h)h(a)g(trap)150 2266 y(has)c(b)s(een)f(set,)i(the)f(trap)g(will)g
m(h)h(a)g(trap)150 2785 y(has)c(b)s(een)f(set,)i(the)f(trap)g(will)g
(not)g(b)s(e)f(executed)i(un)m(til)f(the)g(command)f(completes.)55
b(When)35 b(Bash)g(is)150 2376 y(w)m(aiting)j(for)f(an)g(async)m
b(When)35 b(Bash)g(is)150 2895 y(w)m(aiting)j(for)f(an)g(async)m
(hronous)g(command)g(via)h(the)f Fs(wait)f Ft(builtin,)i(the)g
(reception)g(of)f(a)g(signal)h(for)150 2486 y(whic)m(h)d(a)g(trap)g
(reception)g(of)f(a)g(signal)h(for)150 3004 y(whic)m(h)d(a)g(trap)g
(has)g(b)s(een)f(set)h(will)h(cause)f(the)g Fs(wait)f
Ft(builtin)h(to)g(return)f(immediately)i(with)f(an)g(exit)150
2595 y(status)c(greater)g(than)f(128,)i(immediately)g(after)f(whic)m(h)
f(the)h(trap)f(is)g(executed.)150 2856 y Fr(3.8)68 b(Shell)45
b(Scripts)275 3101 y Ft(A)c(shell)h(script)g(is)g(a)g(text)h(\014le)f
3114 y(status)c(greater)g(than)f(128,)i(immediately)g(after)f(whic)m(h)
f(the)h(trap)f(is)g(executed.)150 3402 y Fr(3.8)68 b(Shell)45
b(Scripts)275 3658 y Ft(A)c(shell)h(script)g(is)g(a)g(text)h(\014le)f
(con)m(taining)h(shell)f(commands.)75 b(When)41 b(suc)m(h)h(a)g(\014le)
g(is)g(used)f(as)150 3211 y(the)33 b(\014rst)f(non-option)h(argumen)m
g(is)g(used)f(as)150 3767 y(the)33 b(\014rst)f(non-option)h(argumen)m
(t)h(when)e(in)m(v)m(oking)i(Bash,)g(and)e(neither)h(the)g(`)p
Fs(-c)p Ft(')g(nor)g(`)p Fs(-s)p Ft(')f(option)i(is)150
3320 y(supplied)j(\(see)j(Section)g(6.1)f([In)m(v)m(oking)h(Bash],)h
3877 y(supplied)j(\(see)j(Section)g(6.1)f([In)m(v)m(oking)h(Bash],)h
(page)f(69\),)i(Bash)d(reads)f(and)g(executes)i(commands)150
3430 y(from)31 b(the)h(\014le,)h(then)e(exits.)46 b(This)31
3987 y(from)31 b(the)h(\014le,)h(then)e(exits.)46 b(This)31
b(mo)s(de)g(of)h(op)s(eration)h(creates)g(a)f(non-in)m(teractiv)m(e)i
(shell.)45 b(The)32 b(shell)150 3539 y(\014rst)26 b(searc)m(hes)h(for)f
(shell.)45 b(The)32 b(shell)150 4096 y(\014rst)26 b(searc)m(hes)h(for)f
(the)g(\014le)h(in)f(the)g(curren)m(t)h(directory)-8
b(,)28 b(and)e(lo)s(oks)g(in)h(the)f(directories)h(in)f
Fs($PATH)f Ft(if)i(not)150 3649 y(found)i(there.)275
3785 y(When)34 b(Bash)h(runs)e(a)i(shell)g(script,)g(it)h(sets)f(the)f
Fs($PATH)f Ft(if)i(not)150 4206 y(found)i(there.)275
4352 y(When)34 b(Bash)h(runs)e(a)i(shell)g(script,)g(it)h(sets)f(the)f
(sp)s(ecial)i(parameter)f Fs(0)f Ft(to)h(the)g(name)g(of)g(the)g
(\014le,)150 3894 y(rather)k(than)g(the)h(name)f(of)h(the)f(shell,)j
(\014le,)150 4462 y(rather)k(than)g(the)h(name)f(of)h(the)f(shell,)j
(and)d(the)h(p)s(ositional)g(parameters)f(are)h(set)g(to)g(the)g
(remain-)150 4004 y(ing)f(argumen)m(ts,)j(if)d(an)m(y)g(are)g(giv)m
(remain-)150 4571 y(ing)f(argumen)m(ts,)j(if)d(an)m(y)g(are)g(giv)m
(en.)67 b(If)39 b(no)g(additional)g(argumen)m(ts)h(are)f(supplied,)h
(the)f(p)s(ositional)150 4113 y(parameters)31 b(are)f(unset.)275
4249 y(A)39 b(shell)h(script)f(ma)m(y)h(b)s(e)f(made)h(executable)h(b)m
(the)f(p)s(ositional)150 4681 y(parameters)31 b(are)f(unset.)275
4828 y(A)39 b(shell)h(script)f(ma)m(y)h(b)s(e)f(made)h(executable)h(b)m
(y)e(using)g(the)h Fs(chmod)e Ft(command)h(to)h(turn)e(on)i(the)150
4359 y(execute)j(bit.)73 b(When)41 b(Bash)g(\014nds)e(suc)m(h)i(a)h
4937 y(execute)j(bit.)73 b(When)41 b(Bash)g(\014nds)e(suc)m(h)i(a)h
(\014le)f(while)g(searc)m(hing)h(the)f Fs($PATH)f Ft(for)h(a)h
(command,)h(it)150 4468 y(spa)m(wns)30 b(a)g(subshell)g(to)h(execute)h
(it.)41 b(In)30 b(other)g(w)m(ords,)g(executing)390 4604
y Fs(filename)46 b Fj(arguments)150 4740 y Ft(is)30 b(equiv)-5
b(alen)m(t)32 b(to)f(executing)390 4875 y Fs(bash)47
b(filename)e Fj(arguments)150 5011 y Ft(if)30 b Fs(filename)d
Ft(is)j(an)f(executable)j(shell)e(script.)40 b(This)29
b(subshell)g(reinitializes)i(itself,)g(so)f(that)h(the)e(e\013ect)150
5121 y(is)36 b(as)h(if)g(a)f(new)g(shell)h(had)f(b)s(een)g(in)m(v)m(ok)
m(ed)h(to)h(in)m(terpret)e(the)h(script,)h(with)e(the)h(exception)h
(that)f(the)150 5230 y(lo)s(cations)25 b(of)g(commands)e(remem)m(b)s
(ered)h(b)m(y)g(the)g(paren)m(t)g(\(see)h(the)f(description)g(of)g
Fs(hash)f Ft(in)h(Section)h(4.1)150 5340 y([Bourne)30
b(Shell)h(Builtins],)g(page)g(35\))h(are)e(retained)h(b)m(y)f(the)h(c)m
(hild.)p eop end
(command,)h(it)150 5047 y(spa)m(wns)30 b(a)g(subshell)g(to)h(execute)h
(it.)41 b(In)30 b(other)g(w)m(ords,)g(executing)390 5193
y Fs(filename)46 b Fj(arguments)150 5340 y Ft(is)30 b(equiv)-5
b(alen)m(t)32 b(to)f(executing)p eop end
%%Page: 33 39
TeXDict begin 33 38 bop 150 -116 a Ft(Chapter)30 b(3:)41
b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(33)275 299
y(Most)36 b(v)m(ersions)g(of)g(Unix)f(mak)m(e)h(this)g(a)g(part)f(of)h
(the)g(op)s(erating)g(system's)f(command)h(execution)150
408 y(mec)m(hanism.)50 b(If)33 b(the)g(\014rst)g(line)h(of)f(a)h
(script)f(b)s(egins)g(with)g(the)g(t)m(w)m(o)i(c)m(haracters)g(`)p
Fs(#!)p Ft(',)f(the)g(remainder)150 518 y(of)d(the)g(line)h(sp)s
(eci\014es)e(an)h(in)m(terpreter)g(for)g(the)g(program.)43
b(Th)m(us,)30 b(y)m(ou)h(can)h(sp)s(ecify)e(Bash,)i Fs(awk)p
Ft(,)e(P)m(erl,)150 628 y(or)g(some)h(other)g(in)m(terpreter)g(and)e
(write)i(the)f(rest)h(of)g(the)f(script)g(\014le)h(in)f(that)h
(language.)275 762 y(The)40 b(argumen)m(ts)h(to)g(the)g(in)m(terpreter)
g(consist)g(of)g(a)g(single)h(optional)f(argumen)m(t)h(follo)m(wing)g
(the)150 872 y(in)m(terpreter)33 b(name)h(on)f(the)g(\014rst)f(line)i
(of)f(the)g(script)g(\014le,)h(follo)m(w)m(ed)h(b)m(y)e(the)g(name)g
(of)g(the)h(script)f(\014le,)150 981 y(follo)m(w)m(ed)g(b)m(y)f(the)f
(rest)h(of)g(the)f(argumen)m(ts.)45 b(Bash)31 b(will)h(p)s(erform)e
(this)i(action)h(on)e(op)s(erating)h(systems)150 1091
y(that)24 b(do)g(not)f(handle)g(it)h(themselv)m(es.)40
b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(33)390 299
y Fs(bash)47 b(filename)e Fj(arguments)150 433 y Ft(if)30
b Fs(filename)d Ft(is)j(an)f(executable)j(shell)e(script.)40
b(This)29 b(subshell)g(reinitializes)i(itself,)g(so)f(that)h(the)e
(e\013ect)150 543 y(is)36 b(as)h(if)g(a)f(new)g(shell)h(had)f(b)s(een)g
(in)m(v)m(ok)m(ed)h(to)h(in)m(terpret)e(the)h(script,)h(with)e(the)h
(exception)h(that)f(the)150 653 y(lo)s(cations)25 b(of)g(commands)e
(remem)m(b)s(ered)h(b)m(y)g(the)g(paren)m(t)g(\(see)h(the)f
(description)g(of)g Fs(hash)f Ft(in)h(Section)h(4.1)150
762 y([Bourne)30 b(Shell)h(Builtins],)g(page)g(35\))h(are)e(retained)h
(b)m(y)f(the)h(c)m(hild.)275 897 y(Most)36 b(v)m(ersions)g(of)g(Unix)f
(mak)m(e)h(this)g(a)g(part)f(of)h(the)g(op)s(erating)g(system's)f
(command)h(execution)150 1006 y(mec)m(hanism.)50 b(If)33
b(the)g(\014rst)g(line)h(of)f(a)h(script)f(b)s(egins)g(with)g(the)g(t)m
(w)m(o)i(c)m(haracters)g(`)p Fs(#!)p Ft(',)f(the)g(remainder)150
1116 y(of)d(the)g(line)h(sp)s(eci\014es)e(an)h(in)m(terpreter)g(for)g
(the)g(program.)43 b(Th)m(us,)30 b(y)m(ou)h(can)h(sp)s(ecify)e(Bash,)i
Fs(awk)p Ft(,)e(P)m(erl,)150 1225 y(or)g(some)h(other)g(in)m(terpreter)
g(and)e(write)i(the)f(rest)h(of)g(the)f(script)g(\014le)h(in)f(that)h
(language.)275 1360 y(The)40 b(argumen)m(ts)h(to)g(the)g(in)m
(terpreter)g(consist)g(of)g(a)g(single)h(optional)f(argumen)m(t)h
(follo)m(wing)g(the)150 1469 y(in)m(terpreter)33 b(name)h(on)f(the)g
(\014rst)f(line)i(of)f(the)g(script)g(\014le,)h(follo)m(w)m(ed)h(b)m(y)
e(the)g(name)g(of)g(the)h(script)f(\014le,)150 1579 y(follo)m(w)m(ed)g
(b)m(y)f(the)f(rest)h(of)g(the)f(argumen)m(ts.)45 b(Bash)31
b(will)h(p)s(erform)e(this)i(action)h(on)e(op)s(erating)h(systems)150
1689 y(that)24 b(do)g(not)f(handle)g(it)h(themselv)m(es.)40
b(Note)25 b(that)f(some)g(older)g(v)m(ersions)f(of)h(Unix)f(limit)i
(the)f(in)m(terpreter)150 1200 y(name)30 b(and)g(argumen)m(t)h(to)g(a)g
(maxim)m(um)f(of)h(32)g(c)m(haracters.)275 1335 y(Bash)h(scripts)g
(the)f(in)m(terpreter)150 1798 y(name)30 b(and)g(argumen)m(t)h(to)g(a)g
(maxim)m(um)f(of)h(32)g(c)m(haracters.)275 1933 y(Bash)h(scripts)g
(often)g(b)s(egin)g(with)g Fs(#!)e(/bin/bash)g Ft(\(assuming)i(that)h
(Bash)f(has)g(b)s(een)f(installed)i(in)150 1445 y(`)p
(Bash)f(has)g(b)s(een)f(installed)i(in)150 2042 y(`)p
Fs(/bin)p Ft('\),)25 b(since)e(this)g(ensures)f(that)i(Bash)f(will)h(b)
s(e)e(used)h(to)h(in)m(terpret)f(the)g(script,)i(ev)m(en)f(if)f(it)h
(is)f(executed)150 1554 y(under)29 b(another)h(shell.)p
(is)f(executed)150 2152 y(under)29 b(another)h(shell.)p
eop end
%%Page: 34 40
TeXDict begin 34 39 bop 150 -116 a Ft(34)2572 b(Bash)31
@@ -8678,104 +8689,107 @@ b Ft(If)33 b(set,)j(Bash)e(attempts)h(to)g(sa)m(v)m(e)g(all)g(lines)f
(of)g(a)h(m)m(ultiple-line)g(command)1110 1504 y(in)c(the)g(same)g
(history)g(en)m(try)-8 b(.)42 b(This)30 b(allo)m(ws)i(easy)g
(re-editing)g(of)f(m)m(ulti-line)1110 1614 y(commands.)630
1778 y Fs(dotglob)144 b Ft(If)27 b(set,)i(Bash)f(includes)g
(\014lenames)g(b)s(eginning)f(with)g(a)h(`.')41 b(in)27
b(the)h(results)g(of)1110 1888 y(\014lename)j(expansion.)630
2052 y Fs(execfail)96 b Ft(If)24 b(this)h(is)f(set,)j(a)e(non-in)m
(teractiv)m(e)i(shell)e(will)f(not)h(exit)h(if)e(it)h(cannot)h(execute)
1110 2162 y(the)i(\014le)g(sp)s(eci\014ed)g(as)g(an)g(argumen)m(t)g(to)
h(the)f Fs(exec)f Ft(builtin)h(command.)39 b(An)1110
2271 y(in)m(teractiv)m(e)33 b(shell)e(do)s(es)f(not)g(exit)i(if)e
Fs(exec)f Ft(fails.)630 2436 y Fs(expand_aliases)1110
2545 y Ft(If)j(set,)h(aliases)g(are)g(expanded)e(as)h(describ)s(ed)f(b)
s(elo)m(w)h(under)f(Aliases,)i(Sec-)1110 2655 y(tion)38
1778 y Fs(compat31)96 b Ft(If)27 b(set,)i(Bash)e(c)m(hanges)i(its)f(b)s
(eha)m(vior)f(to)i(that)f(of)f(v)m(ersion)h(3.1)h(with)e(resp)s(ect)
1110 1888 y(to)k(quoted)g(argumen)m(ts)f(to)h(the)g(conditional)h
(command's)e(=)p Fs(~)g Ft(op)s(erator.)630 2052 y Fs(dotglob)144
b Ft(If)27 b(set,)i(Bash)f(includes)g(\014lenames)g(b)s(eginning)f
(with)g(a)h(`.')41 b(in)27 b(the)h(results)g(of)1110
2162 y(\014lename)j(expansion.)630 2326 y Fs(execfail)96
b Ft(If)24 b(this)h(is)f(set,)j(a)e(non-in)m(teractiv)m(e)i(shell)e
(will)f(not)h(exit)h(if)e(it)h(cannot)h(execute)1110
2436 y(the)i(\014le)g(sp)s(eci\014ed)g(as)g(an)g(argumen)m(t)g(to)h
(the)f Fs(exec)f Ft(builtin)h(command.)39 b(An)1110 2545
y(in)m(teractiv)m(e)33 b(shell)e(do)s(es)f(not)g(exit)i(if)e
Fs(exec)f Ft(fails.)630 2710 y Fs(expand_aliases)1110
2819 y Ft(If)j(set,)h(aliases)g(are)g(expanded)e(as)h(describ)s(ed)f(b)
s(elo)m(w)h(under)f(Aliases,)i(Sec-)1110 2929 y(tion)38
b(6.6)h([Aliases],)j(page)d(77.)64 b(This)37 b(option)h(is)g(enabled)g
(b)m(y)g(default)g(for)1110 2765 y(in)m(teractiv)m(e)33
b(shells.)630 2929 y Fs(extdebug)96 b Ft(If)30 b(set,)h(b)s(eha)m(vior)
(b)m(y)g(default)g(for)1110 3039 y(in)m(teractiv)m(e)33
b(shells.)630 3203 y Fs(extdebug)96 b Ft(If)30 b(set,)h(b)s(eha)m(vior)
g(in)m(tended)f(for)g(use)g(b)m(y)g(debuggers)g(is)h(enabled:)1159
3066 y(1.)61 b(The)32 b(`)p Fs(-F)p Ft(')g(option)h(to)g(the)g
3340 y(1.)61 b(The)32 b(`)p Fs(-F)p Ft(')g(option)h(to)g(the)g
Fs(declare)d Ft(builtin)i(\(see)i(Section)f(4.2)h([Bash)1290
3176 y(Builtins],)29 b(page)g(41\))g(displa)m(ys)f(the)g(source)h
(\014le)f(name)g(and)f(line)h(n)m(um-)1290 3285 y(b)s(er)h(corresp)s
3450 y(Builtins],)29 b(page)g(41\))g(displa)m(ys)f(the)g(source)h
(\014le)f(name)g(and)f(line)h(n)m(um-)1290 3559 y(b)s(er)h(corresp)s
(onding)g(to)i(eac)m(h)g(function)f(name)g(supplied)f(as)i(an)f(argu-)
1290 3395 y(men)m(t.)1159 3532 y(2.)61 b(If)20 b(the)h(command)g(run)e
1290 3669 y(men)m(t.)1159 3806 y(2.)61 b(If)20 b(the)h(command)g(run)e
(b)m(y)i(the)f Fs(DEBUG)g Ft(trap)g(returns)g(a)h(non-zero)g(v)-5
b(alue,)1290 3641 y(the)31 b(next)f(command)g(is)h(skipp)s(ed)e(and)g
(not)i(executed.)1159 3778 y(3.)61 b(If)37 b(the)g(command)g(run)f(b)m
b(alue,)1290 3915 y(the)31 b(next)f(command)g(is)h(skipp)s(ed)e(and)g
(not)i(executed.)1159 4052 y(3.)61 b(If)37 b(the)g(command)g(run)f(b)m
(y)i(the)f Fs(DEBUG)f Ft(trap)h(returns)f(a)i(v)-5 b(alue)38
b(of)f(2,)1290 3888 y(and)c(the)g(shell)h(is)f(executing)i(in)e(a)h
(subroutine)e(\(a)i(shell)g(function)f(or)1290 3998 y(a)h(shell)h
b(of)f(2,)1290 4162 y(and)c(the)g(shell)h(is)f(executing)i(in)e(a)h
(subroutine)e(\(a)i(shell)g(function)f(or)1290 4271 y(a)h(shell)h
(script)f(executed)h(b)m(y)f(the)g Fs(.)g Ft(or)g Fs(source)e
Ft(builtins\),)j(a)g(call)g(to)1290 4107 y Fs(return)29
b Ft(is)h(sim)m(ulated.)1159 4244 y(4.)61 b Fs(BASH_ARGC)34
Ft(builtins\),)j(a)g(call)g(to)1290 4381 y Fs(return)29
b Ft(is)h(sim)m(ulated.)1159 4518 y(4.)61 b Fs(BASH_ARGC)34
b Ft(and)i Fs(BASH_ARGV)e Ft(are)j(up)s(dated)e(as)h(describ)s(ed)g(in)
g(their)1290 4354 y(descriptions)30 b(\(see)i(Section)f(5.2)g([Bash)g
(V)-8 b(ariables],)32 b(page)f(59\).)1159 4491 y(5.)61
g(their)1290 4628 y(descriptions)30 b(\(see)i(Section)f(5.2)g([Bash)g
(V)-8 b(ariables],)32 b(page)f(59\).)1159 4765 y(5.)61
b(F)-8 b(unction)57 b(tracing)g(is)g(enabled:)93 b(command)56
b(substitution,)63 b(shell)1290 4600 y(functions,)30
b(substitution,)63 b(shell)1290 4874 y(functions,)30
b(and)f(subshells)g(in)m(v)m(ok)m(ed)j(with)d Fs(\()h
Fj(command)39 b Fs(\))30 b Ft(inherit)g(the)1290 4710
y Fs(DEBUG)f Ft(and)h Fs(RETURN)e Ft(traps.)1159 4847
Fj(command)39 b Fs(\))30 b Ft(inherit)g(the)1290 4984
y Fs(DEBUG)f Ft(and)h Fs(RETURN)e Ft(traps.)1159 5121
y(6.)61 b(Error)74 b(tracing)i(is)f(enabled:)131 b(command)74
b(substitution,)87 b(shell)1290 4956 y(functions,)30
b(substitution,)87 b(shell)1290 5230 y(functions,)30
b(and)f(subshells)g(in)m(v)m(ok)m(ed)j(with)d Fs(\()h
Fj(command)39 b Fs(\))30 b Ft(inherit)g(the)1290 5066
y Fs(ERROR)f Ft(trap.)630 5230 y Fs(extglob)144 b Ft(If)26
b(set,)i(the)f(extended)f(pattern)h(matc)m(hing)g(features)g(describ)s
(ed)e(ab)s(o)m(v)m(e)j(\(see)1110 5340 y(Section)j(3.5.8.1)i([P)m
(attern)f(Matc)m(hing],)g(page)f(24\))h(are)f(enabled.)p
eop end
Fj(command)39 b Fs(\))30 b Ft(inherit)g(the)1290 5340
y Fs(ERROR)f Ft(trap.)p eop end
%%Page: 55 61
TeXDict begin 55 60 bop 150 -116 a Ft(Chapter)30 b(4:)41
b(Shell)30 b(Builtin)h(Commands)2069 b(55)630 299 y Fs(extquote)96
b Ft(If)49 b(set,)54 b Fs($')p Fj(string)11 b Fs(')46
b Ft(and)j Fs($")p Fj(string)11 b Fs(")46 b Ft(quoting)k(is)f(p)s
(erformed)e(within)1110 408 y Fs(${)p Fj(parameter)11
b Fs(})30 b Ft(expansions)j(enclosed)h(in)g(double)f(quotes.)51
b(This)32 b(option)1110 518 y(is)e(enabled)h(b)m(y)f(default.)630
693 y Fs(failglob)96 b Ft(If)30 b(set,)g(patterns)g(whic)m(h)g(fail)h
(to)g(matc)m(h)g(\014lenames)f(during)e(pathname)i(ex-)1110
803 y(pansion)g(result)g(in)g(an)g(expansion)h(error.)630
978 y Fs(force_fignore)1110 1088 y Ft(If)43 b(set,)k(the)d(su\016xes)f
b(Shell)30 b(Builtin)h(Commands)2069 b(55)630 299 y Fs(extglob)144
b Ft(If)26 b(set,)i(the)f(extended)f(pattern)h(matc)m(hing)g(features)g
(describ)s(ed)e(ab)s(o)m(v)m(e)j(\(see)1110 408 y(Section)j(3.5.8.1)i
([P)m(attern)f(Matc)m(hing],)g(page)f(24\))h(are)f(enabled.)630
558 y Fs(extquote)96 b Ft(If)49 b(set,)54 b Fs($')p Fj(string)11
b Fs(')46 b Ft(and)j Fs($")p Fj(string)11 b Fs(")46 b
Ft(quoting)k(is)f(p)s(erformed)e(within)1110 667 y Fs(${)p
Fj(parameter)11 b Fs(})30 b Ft(expansions)j(enclosed)h(in)g(double)f
(quotes.)51 b(This)32 b(option)1110 777 y(is)e(enabled)h(b)m(y)f
(default.)630 927 y Fs(failglob)96 b Ft(If)30 b(set,)g(patterns)g(whic)
m(h)g(fail)h(to)g(matc)m(h)g(\014lenames)f(during)e(pathname)i(ex-)1110
1036 y(pansion)g(result)g(in)g(an)g(expansion)h(error.)630
1186 y Fs(force_fignore)1110 1295 y Ft(If)43 b(set,)k(the)d(su\016xes)f
(sp)s(eci\014ed)f(b)m(y)i(the)f Fs(FIGNORE)f Ft(shell)h(v)-5
b(ariable)44 b(cause)1110 1198 y(w)m(ords)31 b(to)h(b)s(e)f(ignored)h
b(ariable)44 b(cause)1110 1405 y(w)m(ords)31 b(to)h(b)s(e)f(ignored)h
(when)f(p)s(erforming)f(w)m(ord)h(completion)i(ev)m(en)f(if)g(the)1110
1307 y(ignored)37 b(w)m(ords)g(are)g(the)h(only)f(p)s(ossible)g
(completions.)62 b(See)37 b(Section)h(5.2)1110 1417 y([Bash)24
1514 y(ignored)37 b(w)m(ords)g(are)g(the)h(only)f(p)s(ossible)g
(completions.)62 b(See)37 b(Section)h(5.2)1110 1624 y([Bash)24
b(V)-8 b(ariables],)27 b(page)e(59,)h(for)d(a)h(description)g(of)g
Fs(FIGNORE)p Ft(.)37 b(This)22 b(option)1110 1526 y(is)30
b(enabled)h(b)m(y)f(default.)630 1702 y Fs(gnu_errfmt)1110
1811 y Ft(If)35 b(set,)j(shell)e(error)g(messages)g(are)h(written)e(in)
h(the)g(standard)f Fl(gnu)g Ft(error)1110 1921 y(message)c(format.)630
2096 y Fs(histappend)1110 2206 y Ft(If)c(set,)j(the)e(history)g(list)g
Fs(FIGNORE)p Ft(.)37 b(This)22 b(option)1110 1733 y(is)30
b(enabled)h(b)m(y)f(default.)630 1883 y Fs(gnu_errfmt)1110
1993 y Ft(If)35 b(set,)j(shell)e(error)g(messages)g(are)h(written)e(in)
h(the)g(standard)f Fl(gnu)g Ft(error)1110 2102 y(message)c(format.)630
2252 y Fs(histappend)1110 2361 y Ft(If)c(set,)j(the)e(history)g(list)g
(is)g(app)s(ended)e(to)j(the)f(\014le)g(named)f(b)m(y)h(the)g(v)-5
b(alue)29 b(of)1110 2315 y(the)d Fs(HISTFILE)d Ft(v)-5
b(alue)29 b(of)1110 2471 y(the)d Fs(HISTFILE)d Ft(v)-5
b(ariable)26 b(when)e(the)h(shell)h(exits,)h(rather)e(than)h(o)m(v)m
(erwriting)1110 2425 y(the)31 b(\014le.)630 2600 y Fs(histreedit)1110
2710 y Ft(If)i(set,)h(and)f(Readline)h(is)f(b)s(eing)g(used,)g(a)g
(erwriting)1110 2580 y(the)31 b(\014le.)630 2730 y Fs(histreedit)1110
2839 y Ft(If)i(set,)h(and)f(Readline)h(is)f(b)s(eing)g(used,)g(a)g
(user)g(is)g(giv)m(en)h(the)g(opp)s(ortunit)m(y)1110
2819 y(to)d(re-edit)g(a)g(failed)g(history)f(substitution.)630
2995 y Fs(histverify)1110 3104 y Ft(If)35 b(set,)i(and)e(Readline)h(is)
2949 y(to)d(re-edit)g(a)g(failed)g(history)f(substitution.)630
3098 y Fs(histverify)1110 3208 y Ft(If)35 b(set,)i(and)e(Readline)h(is)
f(b)s(eing)g(used,)h(the)f(results)g(of)g(history)h(substitu-)1110
3214 y(tion)h(are)g(not)g(immediately)h(passed)e(to)h(the)g(shell)g
(parser.)59 b(Instead,)38 b(the)1110 3324 y(resulting)i(line)f(is)h
3318 y(tion)h(are)g(not)g(immediately)h(passed)e(to)h(the)g(shell)g
(parser.)59 b(Instead,)38 b(the)1110 3427 y(resulting)i(line)f(is)h
(loaded)g(in)m(to)g(the)g(Readline)g(editing)g(bu\013er,)h(allo)m(wing)
1110 3433 y(further)29 b(mo)s(di\014cation.)630 3608
y Fs(hostcomplete)1110 3718 y Ft(If)38 b(set,)j(and)c(Readline)i(is)f
1110 3537 y(further)29 b(mo)s(di\014cation.)630 3686
y Fs(hostcomplete)1110 3796 y Ft(If)38 b(set,)j(and)c(Readline)i(is)f
(b)s(eing)g(used,)h(Bash)g(will)f(attempt)h(to)g(p)s(erform)1110
3828 y(hostname)d(completion)h(when)e(a)h(w)m(ord)f(con)m(taining)i(a)f
(`)p Fs(@)p Ft(')g(is)g(b)s(eing)f(com-)1110 3937 y(pleted)g(\(see)h
3905 y(hostname)d(completion)h(when)e(a)h(w)m(ord)f(con)m(taining)i(a)f
(`)p Fs(@)p Ft(')g(is)g(b)s(eing)f(com-)1110 4015 y(pleted)g(\(see)h
(Section)f(8.4.6)i([Commands)d(F)-8 b(or)36 b(Completion],)g(page)g
(107\).)1110 4047 y(This)30 b(option)g(is)h(enabled)f(b)m(y)g(default.)
630 4222 y Fs(huponexit)1110 4332 y Ft(If)i(set,)i(Bash)f(will)h(send)d
(107\).)1110 4125 y(This)30 b(option)g(is)h(enabled)f(b)m(y)g(default.)
630 4274 y Fs(huponexit)1110 4384 y Ft(If)i(set,)i(Bash)f(will)h(send)d
Fs(SIGHUP)h Ft(to)h(all)h(jobs)e(when)g(an)g(in)m(teractiv)m(e)k(login)
1110 4441 y(shell)31 b(exits)g(\(see)g(Section)g(3.7.6)h([Signals],)g
(page)f(31\).)630 4617 y Fs(interactive_comments)1110
4726 y Ft(Allo)m(w)c(a)g(w)m(ord)e(b)s(eginning)g(with)h(`)p
1110 4493 y(shell)31 b(exits)g(\(see)g(Section)g(3.7.6)h([Signals],)g
(page)f(32\).)630 4643 y Fs(interactive_comments)1110
4752 y Ft(Allo)m(w)c(a)g(w)m(ord)e(b)s(eginning)g(with)h(`)p
Fs(#)p Ft(')g(to)h(cause)f(that)h(w)m(ord)f(and)f(all)i(remain-)1110
4836 y(ing)41 b(c)m(haracters)i(on)e(that)h(line)g(to)g(b)s(e)f
4862 y(ing)41 b(c)m(haracters)i(on)e(that)h(line)g(to)g(b)s(e)f
(ignored)g(in)g(an)g(in)m(teractiv)m(e)j(shell.)1110
4945 y(This)30 b(option)g(is)h(enabled)f(b)m(y)g(default.)630
4971 y(This)30 b(option)g(is)h(enabled)f(b)m(y)g(default.)630
5121 y Fs(lithist)144 b Ft(If)22 b(enabled,)i(and)d(the)h
Fs(cmdhist)e Ft(option)j(is)f(enabled,)i(m)m(ulti-line)f(commands)1110
5230 y(are)28 b(sa)m(v)m(ed)h(to)g(the)f(history)g(with)f(em)m(b)s
@@ -9880,14 +9894,14 @@ b(Alias)31 b(expansion)g(\(see)g(Section)g(6.6)g([Aliases],)i(page)e
(77\))h(is)e(p)s(erformed)f(b)m(y)h(default.)199 2191
y(9.)61 b(In)24 b(the)g(absence)h(of)f(an)m(y)h(traps,)g(Bash)g
(ignores)f Fs(SIGTERM)f Ft(\(see)i(Section)g(3.7.6)h([Signals],)g(page)
f(31\).)154 2342 y(10.)61 b(In)26 b(the)h(absence)h(of)f(an)m(y)g
f(32\).)154 2342 y(10.)61 b(In)26 b(the)h(absence)h(of)f(an)m(y)g
(traps,)g Fs(SIGINT)e Ft(is)i(caugh)m(t)h(and)f(handled)e(\(\(see)k
(Section)e(3.7.6)i([Signals],)330 2451 y(page)i(31\).)42
(Section)e(3.7.6)i([Signals],)330 2451 y(page)i(32\).)42
b Fs(SIGINT)29 b Ft(will)h(in)m(terrupt)g(some)h(shell)g(builtins.)154
2602 y(11.)61 b(An)40 b(in)m(teractiv)m(e)j(login)e(shell)g(sends)e(a)i
Fs(SIGHUP)d Ft(to)j(all)g(jobs)f(on)g(exit)h(if)g(the)f
Fs(huponexit)e Ft(shell)330 2712 y(option)31 b(has)f(b)s(een)g(enabled)
g(\(see)h(Section)g(3.7.6)i([Signals],)e(page)g(31\).)154
g(\(see)h(Section)g(3.7.6)i([Signals],)e(page)g(32\).)154
2863 y(12.)61 b(The)26 b(`)p Fs(-n)p Ft(')f(in)m(v)m(o)s(cation)k
(option)d(is)g(ignored,)h(and)f(`)p Fs(set)k(-n)p Ft(')25
b(has)h(no)g(e\013ect)i(\(see)e(Section)h(4.3.1)h([The)330
@@ -15686,7 +15700,7 @@ g(.)h(.)f(.)42 b Fb(73)2025 1259 y(signal)14 b Fc(.)f(.)g(.)f(.)g(.)h
h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)40
b Fb(4)2025 1346 y(signal)27 b(handling)18 b Fc(.)13
b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g
(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)44 b Fb(31)2025
(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)44 b Fb(32)2025
1433 y(sp)r(ecial)27 b(builtin)12 b Fc(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g
(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)
g(.)g(.)h(.)38 b Fb(4,)26 b(57)2025 1521 y(startup)f(\014les)20
+4
View File
@@ -1080,6 +1080,10 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
ccmmddhhiisstt If set, bbaasshh attempts to save all lines of a multiple-
line command in the same history entry. This allows
easy re-editing of multi-line commands.
ccoommppaatt3311
If set, bbaasshh changes its behavior to that of version 3.1
with respect to quoted arguments to the conditional com-
mand's =~ operator.
ddoottgglloobb If set, bbaasshh includes filenames beginning with a `.' in
the results of pathname expansion.
eexxeeccffaaiill
+415 -410
View File
@@ -1,6 +1,6 @@
%!PS-Adobe-3.0
%%Creator: groff version 1.19.1
%%CreationDate: Thu Jan 10 17:41:19 2008
%%CreationDate: Tue Mar 4 08:37:55 2008
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%+ font Times-Italic
@@ -1892,526 +1892,531 @@ BP
(bash)3.702 E F0 1.202(attempts to sa)3.702 F 1.502 -.15(ve a)-.2 H
1.202(ll lines of a multiple-line command in the same history).15 F
(entry)184 144 Q 5(.T)-.65 G(his allo)-5 E
(ws easy re-editing of multi-line commands.)-.25 E F1(dotglob)144 156 Q
F0 .165(If set,)7.77 F F1(bash)2.665 E F0 .165(includes \214lenames be)
2.665 F .165(ginning with a `.)-.15 F 2.665('i)-.7 G 2.665(nt)-2.665 G
.165(he results of pathname e)-2.665 F(xpansion.)-.15 E F1(execfail)144
168 Q F0 1.386(If set, a non-interacti)7.79 F 1.686 -.15(ve s)-.25 H
1.386(hell will not e).15 F 1.386(xit if it cannot e)-.15 F -.15(xe)-.15
G 1.387(cute the \214le speci\214ed as an).15 F(ar)184 180 Q
(ws easy re-editing of multi-line commands.)-.25 E F1(compat31)144 156 Q
F0 .42(If set,)184 168 R F1(bash)2.92 E F0 .42(changes its beha)2.92 F
.419(vior to that of v)-.2 F .419(ersion 3.1 with respect to quoted ar)
-.15 F(guments)-.18 E(to the conditional command')184 180 Q 2.5(s=)-.55
G 2.5(~o)-2.5 G(perator)-2.5 E(.)-.55 E F1(dotglob)144 192 Q F0 .165
(If set,)7.77 F F1(bash)2.665 E F0 .165(includes \214lenames be)2.665 F
.165(ginning with a `.)-.15 F 2.665('i)-.7 G 2.665(nt)-2.665 G .165
(he results of pathname e)-2.665 F(xpansion.)-.15 E F1(execfail)144 204
Q F0 1.387(If set, a non-interacti)7.79 F 1.687 -.15(ve s)-.25 H 1.386
(hell will not e).15 F 1.386(xit if it cannot e)-.15 F -.15(xe)-.15 G
1.386(cute the \214le speci\214ed as an).15 F(ar)184 216 Q
(gument to the)-.18 E F1(exec)2.5 E F0 -.2(bu)2.5 G(iltin command.).2 E
(An interacti)5 E .3 -.15(ve s)-.25 H(hell does not e).15 E(xit if)-.15
E F1(exec)2.5 E F0 -.1(fa)2.5 G(ils.).1 E F1(expand_aliases)144 192 Q F0
.717(If set, aliases are e)184 204 R .717(xpanded as described abo)-.15
F 1.017 -.15(ve u)-.15 H(nder).15 E F2(ALIASES)3.217 E F3(.)A F0 .716
(This option is enabled)5.217 F(by def)184 216 Q(ault for interacti)-.1
E .3 -.15(ve s)-.25 H(hells.).15 E F1(extdeb)144 228 Q(ug)-.2 E F0
(If set, beha)184 240 Q(vior intended for use by deb)-.2 E
(uggers is enabled:)-.2 E F1(1.)184 252 Q F0(The)28.5 E F1<ad46>4.25 E
F0 1.75(option to the)4.25 F F1(declar)4.251 E(e)-.18 E F0 -.2(bu)4.251
G 1.751(iltin displays the source \214le name and line).2 F
(number corresponding to each function name supplied as an ar)220 264 Q
(gument.)-.18 E F1(2.)184 276 Q F0 1.667(If the command run by the)28.5
E F1(exec)2.5 E F0 -.1(fa)2.5 G(ils.).1 E F1(expand_aliases)144 228 Q F0
.716(If set, aliases are e)184 240 R .717(xpanded as described abo)-.15
F 1.017 -.15(ve u)-.15 H(nder).15 E F2(ALIASES)3.217 E F3(.)A F0 .717
(This option is enabled)5.217 F(by def)184 252 Q(ault for interacti)-.1
E .3 -.15(ve s)-.25 H(hells.).15 E F1(extdeb)144 264 Q(ug)-.2 E F0
(If set, beha)184 276 Q(vior intended for use by deb)-.2 E
(uggers is enabled:)-.2 E F1(1.)184 288 Q F0(The)28.5 E F1<ad46>4.251 E
F0 1.751(option to the)4.251 F F1(declar)4.251 E(e)-.18 E F0 -.2(bu)
4.251 G 1.751(iltin displays the source \214le name and line).2 F
(number corresponding to each function name supplied as an ar)220 300 Q
(gument.)-.18 E F1(2.)184 312 Q F0 1.667(If the command run by the)28.5
F F1(DEB)4.167 E(UG)-.1 E F0 1.667(trap returns a non-zero v)4.167 F
1.667(alue, the ne)-.25 F(xt)-.15 E(command is skipped and not e)220 288
Q -.15(xe)-.15 G(cuted.).15 E F1(3.)184 300 Q F0 .84
(If the command run by the)28.5 F F1(DEB)3.34 E(UG)-.1 E F0 .841
(trap returns a v)3.341 F .841(alue of 2, and the shell is)-.25 F -.15
(exe)220 312 S .488
1.667(alue, the ne)-.25 F(xt)-.15 E(command is skipped and not e)220 324
Q -.15(xe)-.15 G(cuted.).15 E F1(3.)184 336 Q F0 .841
(If the command run by the)28.5 F F1(DEB)3.341 E(UG)-.1 E F0 .841
(trap returns a v)3.341 F .84(alue of 2, and the shell is)-.25 F -.15
(exe)220 348 S .488
(cuting in a subroutine \(a shell function or a shell script e).15 F
-.15(xe)-.15 G .488(cuted by the).15 F F1(.)2.988 E F0(or)2.988 E F1
(sour)220 324 Q(ce)-.18 E F0 -.2(bu)2.5 G(iltins\), a call to).2 E F1
(sour)220 360 Q(ce)-.18 E F0 -.2(bu)2.5 G(iltins\), a call to).2 E F1
-.18(re)2.5 G(tur).18 E(n)-.15 E F0(is simulated.)2.5 E F1 26(4. B)184
336 R(ASH_ARGC)-.3 E F0(and)3.775 E F1 -.3(BA)3.775 G(SH_ARGV).3 E F0
1.276(are updated as described in their descrip-)3.775 F(tions abo)220
348 Q -.15(ve)-.15 G(.).15 E F1(5.)184 360 Q F0 1.359
372 R(ASH_ARGC)-.3 E F0(and)3.776 E F1 -.3(BA)3.776 G(SH_ARGV).3 E F0
1.275(are updated as described in their descrip-)3.776 F(tions abo)220
384 Q -.15(ve)-.15 G(.).15 E F1(5.)184 396 Q F0 1.359
(Function tracing is enabled:)28.5 F 1.359
(command substitution, shell functions, and sub-)6.359 F(shells in)220
372 Q -.2(vo)-.4 G -.1(ke).2 G 2.5(dw).1 G(ith)-2.5 E F1(\()2.5 E/F4 10
408 Q -.2(vo)-.4 G -.1(ke).2 G 2.5(dw).1 G(ith)-2.5 E F1(\()2.5 E/F4 10
/Times-Italic@0 SF(command)2.5 E F1(\))2.5 E F0(inherit the)2.5 E F1
(DEB)2.5 E(UG)-.1 E F0(and)2.5 E F1(RETURN)2.5 E F0(traps.)2.5 E F1(6.)
184 384 Q F0 .804(Error tracing is enabled:)28.5 F .805
(command substitution, shell functions, and subshells)5.804 F(in)220 396
184 420 Q F0 .805(Error tracing is enabled:)28.5 F .804
(command substitution, shell functions, and subshells)5.805 F(in)220 432
Q -.2(vo)-.4 G -.1(ke).2 G 2.5(dw).1 G(ith)-2.5 E F1(\()2.5 E F4
(command)2.5 E F1(\))2.5 E F0(inherit the)2.5 E F1(ERR)2.5 E(OR)-.3 E F0
(trap.)2.5 E F1(extglob)144 408 Q F0 .4(If set, the e)8.89 F .4
(trap.)2.5 E F1(extglob)144 444 Q F0 .4(If set, the e)8.89 F .4
(xtended pattern matching features described abo)-.15 F .7 -.15(ve u)
-.15 H(nder).15 E F1 -.1(Pa)2.9 G .4(thname Expan-).1 F(sion)184 420 Q
F0(are enabled.)2.5 E F1(extquote)144 432 Q F0 2.473(If set,)184 444 R
-.15 H(nder).15 E F1 -.1(Pa)2.9 G .4(thname Expan-).1 F(sion)184 456 Q
F0(are enabled.)2.5 E F1(extquote)144 468 Q F0 2.473(If set,)184 480 R
F1($)4.973 E F0<08>A F4(string)A F0 4.973<0861>C(nd)-4.973 E F1($)4.973
E F0(")A F4(string)A F0 4.973("q)C 2.473(uoting is performed within)
-4.973 F F1(${)4.973 E F4(par)A(ameter)-.15 E F1(})A F0 -.15(ex)4.973 G
(pansions).15 E(enclosed in double quotes.)184 456 Q
(This option is enabled by def)5 E(ault.)-.1 E F1(failglob)144 468 Q F0
1.425(If set, patterns which f)7.77 F 1.425
(ail to match \214lenames during pathname e)-.1 F 1.424
(xpansion result in an)-.15 F -.15(ex)184 480 S(pansion error).15 E(.)
-.55 E F1 -.25(fo)144 492 S -.18(rc).25 G(e_\214gnor).18 E(e)-.18 E F0
.585(If set, the suf)184 504 R<8c78>-.25 E .585(es speci\214ed by the)
(pansions).15 E(enclosed in double quotes.)184 492 Q
(This option is enabled by def)5 E(ault.)-.1 E F1(failglob)144 504 Q F0
1.424(If set, patterns which f)7.77 F 1.425
(ail to match \214lenames during pathname e)-.1 F 1.425
(xpansion result in an)-.15 F -.15(ex)184 516 S(pansion error).15 E(.)
-.55 E F1 -.25(fo)144 528 S -.18(rc).25 G(e_\214gnor).18 E(e)-.18 E F0
.585(If set, the suf)184 540 R<8c78>-.25 E .585(es speci\214ed by the)
-.15 F F1(FIGNORE)3.085 E F0 .585(shell v)3.085 F .585(ariable cause w)
-.25 F .585(ords to be ignored)-.1 F .32(when performing w)184 516 R .32
-.25 F .585(ords to be ignored)-.1 F .32(when performing w)184 552 R .32
(ord completion e)-.1 F -.15(ve)-.25 G 2.82(ni).15 G 2.82(ft)-2.82 G .32
(he ignored w)-2.82 F .32(ords are the only possible com-)-.1 F 3.329
(pletions. See)184 528 R F2 .829(SHELL V)3.329 F(ARIABLES)-1.215 E F0
(abo)3.079 E 1.129 -.15(ve f)-.15 H .83(or a description of).15 F F1
(FIGNORE)3.33 E F0 5.83(.T)C .83(his option)-5.83 F(is enabled by def)
184 540 Q(ault.)-.1 E F1(gnu_errfmt)144 552 Q F0(If set, shell error me\
ssages are written in the standard GNU error message format.)184 564 Q
F1(histappend)144 576 Q F0 .384
(he ignored w)-2.82 F .32(ords are the only possible com-)-.1 F 3.33
(pletions. See)184 564 R F2 .83(SHELL V)3.33 F(ARIABLES)-1.215 E F0(abo)
3.08 E 1.13 -.15(ve f)-.15 H .829(or a description of).15 F F1(FIGNORE)
3.329 E F0 5.829(.T)C .829(his option)-5.829 F(is enabled by def)184 576
Q(ault.)-.1 E F1(gnu_errfmt)144 588 Q F0(If set, shell error messages a\
re written in the standard GNU error message format.)184 600 Q F1
(histappend)144 612 Q F0 .383
(If set, the history list is appended to the \214le named by the v)184
588 R .383(alue of the)-.25 F F1(HISTFILE)2.883 E F0 -.25(va)2.883 G
(ri-).25 E(able when the shell e)184 600 Q(xits, rather than o)-.15 E
-.15(ve)-.15 G(rwriting the \214le.).15 E F1(histr)144 612 Q(eedit)-.18
E F0 .575(If set, and)184 624 R F1 -.18(re)3.075 G(adline).18 E F0 .575
(is being used, a user is gi)3.075 F -.15(ve)-.25 G 3.075(nt).15 G .576
(he opportunity to re-edit a f)-3.075 F .576(ailed his-)-.1 F
(tory substitution.)184 636 Q F1(histv)144 648 Q(erify)-.1 E F0 .403
(If set, and)184 660 R F1 -.18(re)2.903 G(adline).18 E F0 .403
624 R .384(alue of the)-.25 F F1(HISTFILE)2.884 E F0 -.25(va)2.884 G
(ri-).25 E(able when the shell e)184 636 Q(xits, rather than o)-.15 E
-.15(ve)-.15 G(rwriting the \214le.).15 E F1(histr)144 648 Q(eedit)-.18
E F0 .576(If set, and)184 660 R F1 -.18(re)3.076 G(adline).18 E F0 .575
(is being used, a user is gi)3.076 F -.15(ve)-.25 G 3.075(nt).15 G .575
(he opportunity to re-edit a f)-3.075 F .575(ailed his-)-.1 F
(tory substitution.)184 672 Q F1(histv)144 684 Q(erify)-.1 E F0 .402
(If set, and)184 696 R F1 -.18(re)2.903 G(adline).18 E F0 .403
(is being used, the results of history substitution are not immediately)
2.903 F .661(passed to the shell parser)184 672 R 5.661(.I)-.55 G .662
(nstead, the resulting line is loaded into the)-5.661 F F1 -.18(re)3.162
G(adline).18 E F0(editing)3.162 E -.2(bu)184 684 S -.25(ff).2 G(er).25 E
2.5(,a)-.4 G(llo)-2.5 E(wing further modi\214cation.)-.25 E F1
(hostcomplete)144 696 Q F0 1.182(If set, and)184 708 R F1 -.18(re)3.682
G(adline).18 E F0 1.182(is being used,)3.682 F F1(bash)3.682 E F0 1.181
(will attempt to perform hostname completion)3.681 F 1.38(when a w)184
720 R 1.38(ord containing a)-.1 F F1(@)3.881 E F0 1.381
(is being completed \(see)3.881 F F1(Completing)3.881 E F0(under)3.881 E
F2(READLINE)3.881 E F0(GNU Bash-3.0)72 768 Q(2004 Apr 20)148.735 E(15)
198.725 E 0 Cg EP
2.903 F .662(passed to the shell parser)184 708 R 5.662(.I)-.55 G .661
(nstead, the resulting line is loaded into the)-5.662 F F1 -.18(re)3.161
G(adline).18 E F0(editing)3.161 E -.2(bu)184 720 S -.25(ff).2 G(er).25 E
2.5(,a)-.4 G(llo)-2.5 E(wing further modi\214cation.)-.25 E
(GNU Bash-3.0)72 768 Q(2004 Apr 20)148.735 E(15)198.725 E 0 Cg EP
%%Page: 16 16
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48
(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E(abo)184 84 Q
-.15(ve)-.15 G 2.5(\). This).15 F(is enabled by def)2.5 E(ault.)-.1 E/F1
10/Times-Bold@0 SF(huponexit)144 96 Q F0(If set,)184 108 Q F1(bash)2.5 E
F0(will send)2.5 E/F2 9/Times-Bold@0 SF(SIGHUP)2.5 E F0
(to all jobs when an interacti)2.25 E .3 -.15(ve l)-.25 H(ogin shell e)
.15 E(xits.)-.15 E F1(interacti)144 120 Q -.1(ve)-.1 G(_comments).1 E F0
.33(If set, allo)184 132 R 2.83(waw)-.25 G .33(ord be)-2.93 F .33
(ginning with)-.15 F F1(#)2.83 E F0 .33(to cause that w)2.83 F .33
(ord and all remaining characters on)-.1 F .967
(that line to be ignored in an interacti)184 144 R 1.267 -.15(ve s)-.25
H .967(hell \(see).15 F F2(COMMENTS)3.467 E F0(abo)3.217 E -.15(ve)-.15
G 3.467(\). This).15 F .968(option is)3.468 F(enabled by def)184 156 Q
(ault.)-.1 E F1(lithist)144 168 Q F0 .655(If set, and the)15.55 F F1
(cmdhist)3.155 E F0 .654(option is enabled, multi-line commands are sa)
3.154 F -.15(ve)-.2 G 3.154(dt).15 G 3.154(ot)-3.154 G .654(he history)
-3.154 F(with embedded ne)184 180 Q
(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10
/Times-Bold@0 SF(hostcomplete)144 84 Q F0 1.181(If set, and)184 96 R F1
-.18(re)3.681 G(adline).18 E F0 1.181(is being used,)3.681 F F1(bash)
3.682 E F0 1.182(will attempt to perform hostname completion)3.682 F
1.381(when a w)184 108 R 1.381(ord containing a)-.1 F F1(@)3.881 E F0
1.381(is being completed \(see)3.881 F F1(Completing)3.88 E F0(under)
3.88 E/F2 9/Times-Bold@0 SF(READLINE)3.88 E F0(abo)184 120 Q -.15(ve)
-.15 G 2.5(\). This).15 F(is enabled by def)2.5 E(ault.)-.1 E F1
(huponexit)144 132 Q F0(If set,)184 144 Q F1(bash)2.5 E F0(will send)2.5
E F2(SIGHUP)2.5 E F0(to all jobs when an interacti)2.25 E .3 -.15(ve l)
-.25 H(ogin shell e).15 E(xits.)-.15 E F1(interacti)144 156 Q -.1(ve)-.1
G(_comments).1 E F0 .33(If set, allo)184 168 R 2.83(waw)-.25 G .33
(ord be)-2.93 F .33(ginning with)-.15 F F1(#)2.83 E F0 .33
(to cause that w)2.83 F .33(ord and all remaining characters on)-.1 F
.967(that line to be ignored in an interacti)184 180 R 1.267 -.15(ve s)
-.25 H .967(hell \(see).15 F F2(COMMENTS)3.467 E F0(abo)3.217 E -.15(ve)
-.15 G 3.467(\). This).15 F .967(option is)3.467 F(enabled by def)184
192 Q(ault.)-.1 E F1(lithist)144 204 Q F0 .654(If set, and the)15.55 F
F1(cmdhist)3.154 E F0 .654
(option is enabled, multi-line commands are sa)3.154 F -.15(ve)-.2 G
3.155(dt).15 G 3.155(ot)-3.155 G .655(he history)-3.155 F
(with embedded ne)184 216 Q
(wlines rather than using semicolon separators where possible.)-.25 E F1
(login_shell)144 192 Q F0 .486
(login_shell)144 228 Q F0 .486
(The shell sets this option if it is started as a login shell \(see)184
204 R F2(INV)2.987 E(OCA)-.405 E(TION)-.855 E F0(abo)2.737 E -.15(ve)
-.15 G 2.987(\). The).15 F -.25(va)184 216 S(lue may not be changed.).25
E F1(mailwar)144 228 Q(n)-.15 E F0 .815(If set, and a \214le that)184
240 R F1(bash)3.315 E F0 .814
(is checking for mail has been accessed since the last time it)3.315 F
-.1(wa)184 252 S 2.5(sc).1 G(heck)-2.5 E(ed, the message `)-.1 E
240 R F2(INV)2.986 E(OCA)-.405 E(TION)-.855 E F0(abo)2.736 E -.15(ve)
-.15 G 2.986(\). The).15 F -.25(va)184 252 S(lue may not be changed.).25
E F1(mailwar)144 264 Q(n)-.15 E F0 .814(If set, and a \214le that)184
276 R F1(bash)3.314 E F0 .815
(is checking for mail has been accessed since the last time it)3.314 F
-.1(wa)184 288 S 2.5(sc).1 G(heck)-2.5 E(ed, the message `)-.1 E
(`The mail in)-.74 E/F3 10/Times-Italic@0 SF(mail\214le)2.5 E F0
(has been read')2.5 E 2.5('i)-.74 G 2.5(sd)-2.5 G(isplayed.)-2.5 E F1
(no_empty_cmd_completion)144 264 Q F0 .145(If set, and)184 276 R F1 -.18
(re)2.645 G(adline).18 E F0 .145(is being used,)2.645 F F1(bash)2.646 E
F0 .146(will not attempt to search the)2.646 F F1 -.74(PA)2.646 G(TH)
-.21 E F0 .146(for possible)2.646 F
(completions when completion is attempted on an empty line.)184 288 Q F1
(nocaseglob)144 300 Q F0 .437(If set,)184 312 R F1(bash)2.937 E F0 .436
(matches \214lenames in a case\255insensiti)2.937 F .736 -.15(ve f)-.25
H .436(ashion when performing pathname).05 F -.15(ex)184 324 S
(no_empty_cmd_completion)144 300 Q F0 .146(If set, and)184 312 R F1 -.18
(re)2.646 G(adline).18 E F0 .146(is being used,)2.646 F F1(bash)2.646 E
F0 .145(will not attempt to search the)2.646 F F1 -.74(PA)2.645 G(TH)
-.21 E F0 .145(for possible)2.645 F
(completions when completion is attempted on an empty line.)184 324 Q F1
(nocaseglob)144 336 Q F0 .436(If set,)184 348 R F1(bash)2.936 E F0 .436
(matches \214lenames in a case\255insensiti)2.936 F .737 -.15(ve f)-.25
H .437(ashion when performing pathname).05 F -.15(ex)184 360 S
(pansion \(see).15 E F1 -.1(Pa)2.5 G(thname Expansion).1 E F0(abo)2.5 E
-.15(ve)-.15 G(\).).15 E F1(nocasematch)144 336 Q F0 1.193(If set,)184
348 R F1(bash)3.693 E F0 1.194(matches patterns in a case\255insensiti)
3.693 F 1.494 -.15(ve f)-.25 H 1.194(ashion when performing matching).05
F(while e)184 360 Q -.15(xe)-.15 G(cuting).15 E F1(case)2.5 E F0(or)2.5
E F1([[)2.5 E F0(conditional commands.)2.5 E F1(nullglob)144 372 Q F0
.855(If set,)184 384 R F1(bash)3.355 E F0(allo)3.355 E .855
(ws patterns which match no \214les \(see)-.25 F F1 -.1(Pa)3.354 G .854
(thname Expansion).1 F F0(abo)3.354 E -.15(ve)-.15 G 3.354(\)t).15 G(o)
-3.354 E -.15(ex)184 396 S(pand to a null string, rather than themselv)
.15 E(es.)-.15 E F1(pr)144 408 Q(ogcomp)-.18 E F0 .676
(If set, the programmable completion f)184 420 R .677(acilities \(see)
-.1 F F1(Pr)3.177 E .677(ogrammable Completion)-.18 F F0(abo)3.177 E
-.15(ve)-.15 G(\)).15 E(are enabled.)184 432 Q
(This option is enabled by def)5 E(ault.)-.1 E F1(pr)144 444 Q(omptv)
-.18 E(ars)-.1 E F0 1.448(If set, prompt strings under)184 456 R 1.448
(go parameter e)-.18 F 1.447(xpansion, command substitution, arithmetic)
-.15 F -.15(ex)184 468 S .17(pansion, and quote remo).15 F -.25(va)-.15
-.15(ve)-.15 G(\).).15 E F1(nocasematch)144 372 Q F0 1.194(If set,)184
384 R F1(bash)3.694 E F0 1.194(matches patterns in a case\255insensiti)
3.694 F 1.493 -.15(ve f)-.25 H 1.193(ashion when performing matching).05
F(while e)184 396 Q -.15(xe)-.15 G(cuting).15 E F1(case)2.5 E F0(or)2.5
E F1([[)2.5 E F0(conditional commands.)2.5 E F1(nullglob)144 408 Q F0
.854(If set,)184 420 R F1(bash)3.354 E F0(allo)3.354 E .855
(ws patterns which match no \214les \(see)-.25 F F1 -.1(Pa)3.355 G .855
(thname Expansion).1 F F0(abo)3.355 E -.15(ve)-.15 G 3.355(\)t).15 G(o)
-3.355 E -.15(ex)184 432 S(pand to a null string, rather than themselv)
.15 E(es.)-.15 E F1(pr)144 444 Q(ogcomp)-.18 E F0 .677
(If set, the programmable completion f)184 456 R .677(acilities \(see)
-.1 F F1(Pr)3.176 E .676(ogrammable Completion)-.18 F F0(abo)3.176 E
-.15(ve)-.15 G(\)).15 E(are enabled.)184 468 Q
(This option is enabled by def)5 E(ault.)-.1 E F1(pr)144 480 Q(omptv)
-.18 E(ars)-.1 E F0 1.447(If set, prompt strings under)184 492 R 1.448
(go parameter e)-.18 F 1.448(xpansion, command substitution, arithmetic)
-.15 F -.15(ex)184 504 S .171(pansion, and quote remo).15 F -.25(va)-.15
G 2.67(la).25 G .17(fter being e)-2.67 F .17(xpanded as described in)
-.15 F F2(PR)2.671 E(OMPTING)-.27 E F0(abo)2.421 E -.15(ve)-.15 G(.).15
E(This option is enabled by def)184 480 Q(ault.)-.1 E F1 -.18(re)144 492
-.15 F F2(PR)2.67 E(OMPTING)-.27 E F0(abo)2.42 E -.15(ve)-.15 G(.).15 E
(This option is enabled by def)184 516 Q(ault.)-.1 E F1 -.18(re)144 528
S(stricted_shell).18 E F0 1.069
(The shell sets this option if it is started in restricted mode \(see)
184 504 R F2 1.069(RESTRICTED SHELL)3.569 F F0(belo)184 516 Q 4.178
184 540 R F2 1.069(RESTRICTED SHELL)3.569 F F0(belo)184 552 Q 4.178
(w\). The)-.25 F -.25(va)4.178 G 1.678(lue may not be changed.).25 F
1.678(This is not reset when the startup \214les are)6.678 F -.15(exe)
184 528 S(cuted, allo).15 E(wing the startup \214les to disco)-.25 E
184 564 S(cuted, allo).15 E(wing the startup \214les to disco)-.25 E
-.15(ve)-.15 G 2.5(rw).15 G(hether or not a shell is restricted.)-2.5 E
F1(shift_v)144 540 Q(erbose)-.1 E F0 .502(If set, the)184 552 R F1
(shift)3.002 E F0 -.2(bu)3.002 G .501
(iltin prints an error message when the shift count e).2 F .501
(xceeds the number)-.15 F(of positional parameters.)184 564 Q F1(sour)
144 576 Q(cepath)-.18 E F0 .77(If set, the)184 588 R F1(sour)3.27 E(ce)
-.18 E F0(\()3.27 E F1(.)A F0 3.27(\)b)C .77(uiltin uses the v)-3.47 F
.771(alue of)-.25 F F2 -.666(PA)3.271 G(TH)-.189 E F0 .771
(to \214nd the directory containing the)3.021 F
(\214le supplied as an ar)184 600 Q 2.5(gument. This)-.18 F
(option is enabled by def)2.5 E(ault.)-.1 E F1(xpg_echo)144 612 Q F0
(If set, the)184 624 Q F1(echo)2.5 E F0 -.2(bu)2.5 G(iltin e).2 E
(xpands backslash-escape sequences by def)-.15 E(ault.)-.1 E F1(suspend)
108 636 Q F0([)2.5 E F1<ad66>A F0(])A .493(Suspend the e)144 648 R -.15
(xe)-.15 G .493(cution of this shell until it recei).15 F -.15(ve)-.25 G
2.992(sa).15 G F2(SIGCONT)A F0 2.992(signal. The)2.742 F F1<ad66>2.992 E
F0 .492(option says not to)2.992 F .758
(complain if this is a login shell; just suspend an)144 660 R(yw)-.15 E
(ay)-.1 E 5.758(.T)-.65 G .759
F1(shift_v)144 576 Q(erbose)-.1 E F0 .501(If set, the)184 588 R F1
(shift)3.001 E F0 -.2(bu)3.001 G .501
(iltin prints an error message when the shift count e).2 F .502
(xceeds the number)-.15 F(of positional parameters.)184 600 Q F1(sour)
144 612 Q(cepath)-.18 E F0 .771(If set, the)184 624 R F1(sour)3.271 E
(ce)-.18 E F0(\()3.271 E F1(.)A F0 3.271(\)b)C .771(uiltin uses the v)
-3.471 F .771(alue of)-.25 F F2 -.666(PA)3.27 G(TH)-.189 E F0 .77
(to \214nd the directory containing the)3.02 F(\214le supplied as an ar)
184 636 Q 2.5(gument. This)-.18 F(option is enabled by def)2.5 E(ault.)
-.1 E F1(xpg_echo)144 648 Q F0(If set, the)184 660 Q F1(echo)2.5 E F0
-.2(bu)2.5 G(iltin e).2 E(xpands backslash-escape sequences by def)-.15
E(ault.)-.1 E F1(suspend)108 672 Q F0([)2.5 E F1<ad66>A F0(])A .492
(Suspend the e)144 684 R -.15(xe)-.15 G .492
(cution of this shell until it recei).15 F -.15(ve)-.25 G 2.992(sa).15 G
F2(SIGCONT).001 E F0 2.993(signal. The)2.743 F F1<ad66>2.993 E F0 .493
(option says not to)2.993 F .759
(complain if this is a login shell; just suspend an)144 696 R(yw)-.15 E
(ay)-.1 E 5.758(.T)-.65 G .758
(he return status is 0 unless the shell is a)-5.758 F(login shell and)
144 672 Q F1<ad66>2.5 E F0
(is not supplied, or if job control is not enabled.)2.5 E F1(test)108
684 Q F3 -.2(ex)2.5 G(pr).2 E F1([)108 696 Q F3 -.2(ex)2.5 G(pr).2 E F1
(])2.5 E F0 1.15(Return a status of 0 or 1 depending on the e)6.77 F
-.25(va)-.25 G 1.15(luation of the conditional e).25 F(xpression)-.15 E
F3 -.2(ex)3.65 G(pr).2 E F0 6.15(.E).73 G(ach)-6.15 E 1.187
(operator and operand must be a separate ar)144 708 R 3.688
(gument. Expressions)-.18 F 1.188(are composed of the primaries)3.688 F
1.89(described abo)144 720 R 2.19 -.15(ve u)-.15 H(nder).15 E F2
(CONDITION)4.39 E 1.89(AL EXPRESSIONS)-.18 F/F4 9/Times-Roman@0 SF(.)A
F1(test)6.39 E F0 1.889(does not accept an)4.389 F 4.389(yo)-.15 G 1.889
(ptions, nor)-4.389 F(GNU Bash-3.0)72 768 Q(2004 Apr 20)148.735 E(16)
198.725 E 0 Cg EP
144 708 Q F1<ad66>2.5 E F0
(is not supplied, or if job control is not enabled.)2.5 E(GNU Bash-3.0)
72 768 Q(2004 Apr 20)148.735 E(16)198.725 E 0 Cg EP
%%Page: 17 17
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48
(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E
(does it accept and ignore an ar)144 84 Q(gument of)-.18 E/F1 10
/Times-Bold@0 SF<adad>2.5 E F0(as signifying the end of options.)2.5 E
.785(Expressions may be combined using the follo)144 102 R .786
(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10
/Times-Bold@0 SF(test)108 84 Q/F2 10/Times-Italic@0 SF -.2(ex)2.5 G(pr)
.2 E F1([)108 96 Q F2 -.2(ex)2.5 G(pr).2 E F1(])2.5 E F0 1.15
(Return a status of 0 or 1 depending on the e)6.77 F -.25(va)-.25 G 1.15
(luation of the conditional e).25 F(xpression)-.15 E F2 -.2(ex)3.65 G
(pr).2 E F0 6.15(.E).73 G(ach)-6.15 E 1.188
(operator and operand must be a separate ar)144 108 R 3.688
(gument. Expressions)-.18 F 1.187(are composed of the primaries)3.688 F
1.889(described abo)144 120 R 2.189 -.15(ve u)-.15 H(nder).15 E/F3 9
/Times-Bold@0 SF(CONDITION)4.389 E 1.889(AL EXPRESSIONS)-.18 F/F4 9
/Times-Roman@0 SF(.)A F1(test)6.389 E F0 1.89(does not accept an)4.389 F
4.39(yo)-.15 G 1.89(ptions, nor)-4.39 F(does it accept and ignore an ar)
144 132 Q(gument of)-.18 E F1<adad>2.5 E F0
(as signifying the end of options.)2.5 E .786
(Expressions may be combined using the follo)144 150 R .785
(wing operators, listed in decreasing order of prece-)-.25 F 2.5
(dence. The)144 114 R -.25(eva)2.5 G
(dence. The)144 162 R -.25(eva)2.5 G
(luation depends on the number of ar).25 E(guments; see belo)-.18 E -.65
(w.)-.25 G F1(!)144 126 Q/F2 10/Times-Italic@0 SF -.2(ex)2.5 G(pr).2 E
F0 -.35(Tr)12.6 G(ue if).35 E F2 -.2(ex)2.5 G(pr).2 E F0(is f)3.23 E
(alse.)-.1 E F1(\()144 138 Q F2 -.2(ex)2.5 G(pr).2 E F1(\))2.5 E F0 .26
(Returns the v)6.77 F .26(alue of)-.25 F F2 -.2(ex)2.76 G(pr).2 E F0
5.26(.T)C .26(his may be used to o)-5.26 F -.15(ve)-.15 G .26
(rride the normal precedence of opera-).15 F(tors.)180 150 Q F2 -.2(ex)
144 162 S(pr1).2 E F0<ad>2.5 E F1(a)A F2 -.2(ex)2.5 G(pr2).2 E F0 -.35
(Tr)180 174 S(ue if both).35 E F2 -.2(ex)2.5 G(pr1).2 E F0(and)2.5 E F2
-.2(ex)2.5 G(pr2).2 E F0(are true.)2.52 E F2 -.2(ex)144 186 S(pr1).2 E
F0<ad>2.5 E F1(o)A F2 -.2(ex)2.5 G(pr2).2 E F0 -.35(Tr)180 198 S
(w.)-.25 G F1(!)144 174 Q F2 -.2(ex)2.5 G(pr).2 E F0 -.35(Tr)12.6 G
(ue if).35 E F2 -.2(ex)2.5 G(pr).2 E F0(is f)3.23 E(alse.)-.1 E F1(\()
144 186 Q F2 -.2(ex)2.5 G(pr).2 E F1(\))2.5 E F0 .26(Returns the v)6.77
F .26(alue of)-.25 F F2 -.2(ex)2.76 G(pr).2 E F0 5.26(.T)C .26
(his may be used to o)-5.26 F -.15(ve)-.15 G .26
(rride the normal precedence of opera-).15 F(tors.)180 198 Q F2 -.2(ex)
144 210 S(pr1).2 E F0<ad>2.5 E F1(a)A F2 -.2(ex)2.5 G(pr2).2 E F0 -.35
(Tr)180 222 S(ue if both).35 E F2 -.2(ex)2.5 G(pr1).2 E F0(and)2.5 E F2
-.2(ex)2.5 G(pr2).2 E F0(are true.)2.52 E F2 -.2(ex)144 234 S(pr1).2 E
F0<ad>2.5 E F1(o)A F2 -.2(ex)2.5 G(pr2).2 E F0 -.35(Tr)180 246 S
(ue if either).35 E F2 -.2(ex)2.5 G(pr1).2 E F0(or)2.5 E F2 -.2(ex)2.5 G
(pr2).2 E F0(is true.)2.52 E F1(test)144 214.8 Q F0(and)2.5 E F1([)2.5 E
(pr2).2 E F0(is true.)2.52 E F1(test)144 262.8 Q F0(and)2.5 E F1([)2.5 E
F0 -.25(eva)2.5 G(luate conditional e).25 E
(xpressions using a set of rules based on the number of ar)-.15 E
(guments.)-.18 E 2.5(0a)144 232.8 S -.18(rg)-2.5 G(uments).18 E(The e)
180 244.8 Q(xpression is f)-.15 E(alse.)-.1 E 2.5(1a)144 256.8 S -.18
(rg)-2.5 G(ument).18 E(The e)180 268.8 Q
(guments.)-.18 E 2.5(0a)144 280.8 S -.18(rg)-2.5 G(uments).18 E(The e)
180 292.8 Q(xpression is f)-.15 E(alse.)-.1 E 2.5(1a)144 304.8 S -.18
(rg)-2.5 G(ument).18 E(The e)180 316.8 Q
(xpression is true if and only if the ar)-.15 E(gument is not null.)-.18
E 2.5(2a)144 280.8 S -.18(rg)-2.5 G(uments).18 E .37(If the \214rst ar)
180 292.8 R .37(gument is)-.18 F F1(!)2.87 E F0 2.87(,t)C .37(he e)-2.87
E 2.5(2a)144 328.8 S -.18(rg)-2.5 G(uments).18 E .37(If the \214rst ar)
180 340.8 R .37(gument is)-.18 F F1(!)2.87 E F0 2.87(,t)C .37(he e)-2.87
F .37(xpression is true if and only if the second ar)-.15 F .37
(gument is null.)-.18 F .38(If the \214rst ar)180 304.8 R .38
(gument is one of the unary conditional operators listed abo)-.18 F .679
-.15(ve u)-.15 H(nder).15 E/F3 9/Times-Bold@0 SF(CONDI-)2.879 E(TION)180
316.8 Q .552(AL EXPRESSIONS)-.18 F/F4 9/Times-Roman@0 SF(,)A F0 .552
(the e)2.802 F .552(xpression is true if the unary test is true.)-.15 F
.552(If the \214rst ar)5.552 F(gu-)-.18 E(ment is not a v)180 328.8 Q
(gument is null.)-.18 F .379(If the \214rst ar)180 352.8 R .38
(gument is one of the unary conditional operators listed abo)-.18 F .68
-.15(ve u)-.15 H(nder).15 E F3(CONDI-)2.88 E(TION)180 364.8 Q .553
(AL EXPRESSIONS)-.18 F F4(,)A F0 .552(the e)2.802 F .552
(xpression is true if the unary test is true.)-.15 F .552
(If the \214rst ar)5.552 F(gu-)-.18 E(ment is not a v)180 376.8 Q
(alid unary conditional operator)-.25 E 2.5(,t)-.4 G(he e)-2.5 E
(xpression is f)-.15 E(alse.)-.1 E 2.5(3a)144 340.8 S -.18(rg)-2.5 G
(uments).18 E .024(If the second ar)180 352.8 R .023
(xpression is f)-.15 E(alse.)-.1 E 2.5(3a)144 388.8 S -.18(rg)-2.5 G
(uments).18 E .023(If the second ar)180 400.8 R .023
(gument is one of the binary conditional operators listed abo)-.18 F
.323 -.15(ve u)-.15 H(nder).15 E F3(CON-)2.523 E(DITION)180 364.8 Q
1.477(AL EXPRESSIONS)-.18 F F4(,)A F0 1.477(the result of the e)3.727 F
.324 -.15(ve u)-.15 H(nder).15 E F3(CON-)2.524 E(DITION)180 412.8 Q
1.478(AL EXPRESSIONS)-.18 F F4(,)A F0 1.477(the result of the e)3.727 F
1.477(xpression is the result of the binary test)-.15 F .513
(using the \214rst and third ar)180 376.8 R .513(guments as operands.)
(using the \214rst and third ar)180 424.8 R .513(guments as operands.)
-.18 F(The)5.513 E F1<ad61>3.013 E F0(and)3.013 E F1<ad6f>3.013 E F0
.512(operators are considered)3.013 F .972
(binary operators when there are three ar)180 388.8 R 3.472(guments. If)
.513(operators are considered)3.013 F .972
(binary operators when there are three ar)180 436.8 R 3.472(guments. If)
-.18 F .972(the \214rst ar)3.472 F .972(gument is)-.18 F F1(!)3.472 E F0
3.472(,t)C .972(he v)-3.472 F .972(alue is)-.25 F .884(the ne)180 400.8
R -.05(ga)-.15 G .884(tion of the tw).05 F(o-ar)-.1 E .884
(gument test using the second and third ar)-.18 F 3.383(guments. If)-.18
F .883(the \214rst)3.383 F(ar)180 412.8 Q .874(gument is e)-.18 F
(xactly)-.15 E F1(\()3.374 E F0 .875(and the third ar)3.374 F .875
(gument is e)-.18 F(xactly)-.15 E F1(\))3.375 E F0 3.375(,t)C .875
(he result is the one-ar)-3.375 F(gument)-.18 E(test of the second ar)
180 424.8 Q 2.5(gument. Otherwise,)-.18 F(the e)2.5 E(xpression is f)
-.15 E(alse.)-.1 E 2.5(4a)144 436.8 S -.18(rg)-2.5 G(uments).18 E .385
(If the \214rst ar)180 448.8 R .385(gument is)-.18 F F1(!)2.885 E F0
2.885(,t)C .385(he result is the ne)-2.885 F -.05(ga)-.15 G .384
(tion of the three-ar).05 F .384(gument e)-.18 F .384(xpression com-)
-.15 F 1.647(posed of the remaining ar)180 460.8 R 4.147
(guments. Otherwise,)-.18 F 1.647(the e)4.147 F 1.648
3.472(,t)C .972(he v)-3.472 F .972(alue is)-.25 F .883(the ne)180 448.8
R -.05(ga)-.15 G .883(tion of the tw).05 F(o-ar)-.1 E .884
(gument test using the second and third ar)-.18 F 3.384(guments. If)-.18
F .884(the \214rst)3.384 F(ar)180 460.8 Q .875(gument is e)-.18 F
(xactly)-.15 E F1(\()3.375 E F0 .875(and the third ar)3.375 F .875
(gument is e)-.18 F(xactly)-.15 E F1(\))3.375 E F0 3.374(,t)C .874
(he result is the one-ar)-3.374 F(gument)-.18 E(test of the second ar)
180 472.8 Q 2.5(gument. Otherwise,)-.18 F(the e)2.5 E(xpression is f)
-.15 E(alse.)-.1 E 2.5(4a)144 484.8 S -.18(rg)-2.5 G(uments).18 E .384
(If the \214rst ar)180 496.8 R .384(gument is)-.18 F F1(!)2.884 E F0
2.885(,t)C .385(he result is the ne)-2.885 F -.05(ga)-.15 G .385
(tion of the three-ar).05 F .385(gument e)-.18 F .385(xpression com-)
-.15 F 1.648(posed of the remaining ar)180 508.8 R 4.147
(guments. Otherwise,)-.18 F 1.647(the e)4.147 F 1.647
(xpression is parsed and e)-.15 F -.25(va)-.25 G(luated).25 E
(according to precedence using the rules listed abo)180 472.8 Q -.15(ve)
-.15 G(.).15 E 2.5(5o)144 484.8 S 2.5(rm)-2.5 G(ore ar)-2.5 E(guments)
-.18 E 1.635(The e)180 496.8 R 1.635(xpression is parsed and e)-.15 F
(according to precedence using the rules listed abo)180 520.8 Q -.15(ve)
-.15 G(.).15 E 2.5(5o)144 532.8 S 2.5(rm)-2.5 G(ore ar)-2.5 E(guments)
-.18 E 1.635(The e)180 544.8 R 1.635(xpression is parsed and e)-.15 F
-.25(va)-.25 G 1.635
(luated according to precedence using the rules listed).25 F(abo)180
508.8 Q -.15(ve)-.15 G(.).15 E F1(times)108 525.6 Q F0 1.229(Print the \
556.8 Q -.15(ve)-.15 G(.).15 E F1(times)108 573.6 Q F0 1.229(Print the \
accumulated user and system times for the shell and for processes run f\
rom the shell.)13.23 F(The return status is 0.)144 537.6 Q F1(trap)108
554.4 Q F0([)2.5 E F1(\255lp)A F0 2.5(][)C([)-2.5 E F2(ar)A(g)-.37 E F0
(])A F2(sigspec)2.5 E F0(...])2.5 E .703(The command)144 566.4 R F2(ar)
3.533 E(g)-.37 E F0 .703(is to be read and e)3.423 F -.15(xe)-.15 G .702
(cuted when the shell recei).15 F -.15(ve)-.25 G 3.202(ss).15 G
(ignal\(s\))-3.202 E F2(sigspec)3.202 E F0 5.702(.I).31 G(f)-5.702 E F2
(ar)3.532 E(g)-.37 E F0(is)3.422 E .608(absent \(and there is a single)
144 578.4 R F2(sigspec)3.108 E F0 3.108(\)o)C(r)-3.108 E F1<ad>3.108 E
rom the shell.)13.23 F(The return status is 0.)144 585.6 Q F1(trap)108
602.4 Q F0([)2.5 E F1(\255lp)A F0 2.5(][)C([)-2.5 E F2(ar)A(g)-.37 E F0
(])A F2(sigspec)2.5 E F0(...])2.5 E .702(The command)144 614.4 R F2(ar)
3.532 E(g)-.37 E F0 .702(is to be read and e)3.422 F -.15(xe)-.15 G .702
(cuted when the shell recei).15 F -.15(ve)-.25 G 3.203(ss).15 G
(ignal\(s\))-3.203 E F2(sigspec)3.203 E F0 5.703(.I).31 G(f)-5.703 E F2
(ar)3.533 E(g)-.37 E F0(is)3.423 E .609(absent \(and there is a single)
144 626.4 R F2(sigspec)3.108 E F0 3.108(\)o)C(r)-3.108 E F1<ad>3.108 E
F0 3.108(,e)C .608
(ach speci\214ed signal is reset to its original disposition)-3.108 F
.659(\(the v)144 590.4 R .659(alue it had upon entrance to the shell\).)
-.25 F(If)5.658 E F2(ar)3.488 E(g)-.37 E F0 .658
.658(\(the v)144 638.4 R .658(alue it had upon entrance to the shell\).)
-.25 F(If)5.658 E F2(ar)3.488 E(g)-.37 E F0 .659
(is the null string the signal speci\214ed by each)3.378 F F2(sigspec)
144.34 602.4 Q F0 .58(is ignored by the shell and by the commands it in)
3.39 F -.2(vo)-.4 G -.1(ke).2 G 3.081(s. If).1 F F2(ar)3.411 E(g)-.37 E
F0 .581(is not present and)3.301 F F1<ad70>3.081 E F0(has)3.081 E 1.215
(been supplied, then the trap commands associated with each)144 614.4 R
F2(sigspec)4.054 E F0 1.214(are displayed.)4.024 F 1.214(If no ar)6.214
F(gu-)-.18 E .86(ments are supplied or if only)144 626.4 R F1<ad70>3.36
144.34 650.4 Q F0 .581
(is ignored by the shell and by the commands it in)3.391 F -.2(vo)-.4 G
-.1(ke).2 G 3.08(s. If).1 F F2(ar)3.41 E(g)-.37 E F0 .58
(is not present and)3.3 F F1<ad70>3.08 E F0(has)3.08 E 1.214
(been supplied, then the trap commands associated with each)144 662.4 R
F2(sigspec)4.054 E F0 1.215(are displayed.)4.024 F 1.215(If no ar)6.215
F(gu-)-.18 E .86(ments are supplied or if only)144 674.4 R F1<ad70>3.36
E F0 .86(is gi)3.36 F -.15(ve)-.25 G(n,).15 E F1(trap)3.36 E F0 .86
(prints the list of commands associated with each)3.36 F 2.83
(signal. The)144 638.4 R F1<ad6c>2.83 E F0 .33(option causes the shell \
to print a list of signal names and their corresponding num-)2.83 F 4.31
(bers. Each)144 650.4 R F2(sigspec)4.65 E F0 1.811
(is either a signal name de\214ned in <)4.62 F F2(signal.h)A F0 1.811
(>, or a signal number)B 6.811(.S)-.55 G(ignal)-6.811 E .745
(names are case insensiti)144 662.4 R 1.045 -.15(ve a)-.25 H .745
(signal. The)144 686.4 R F1<ad6c>2.83 E F0 .33(option causes the shell \
to print a list of signal names and their corresponding num-)2.83 F
4.311(bers. Each)144 698.4 R F2(sigspec)4.651 E F0 1.811
(is either a signal name de\214ned in <)4.621 F F2(signal.h)A F0 1.81
(>, or a signal number)B 6.81(.S)-.55 G(ignal)-6.81 E .745
(names are case insensiti)144 710.4 R 1.045 -.15(ve a)-.25 H .745
(nd the SIG pre\214x is optional.).15 F .745(If a)5.745 F F2(sigspec)
3.585 E F0(is)3.555 E F3(EXIT)3.245 E F0 .745(\(0\) the command)2.995 F
F2(ar)144.33 674.4 Q(g)-.37 E F0 1.629(is e)4.349 F -.15(xe)-.15 G 1.629
F2(ar)144.33 722.4 Q(g)-.37 E F0 1.63(is e)4.35 F -.15(xe)-.15 G 1.63
(cuted on e).15 F 1.63(xit from the shell.)-.15 F 1.63(If a)6.63 F F2
(sigspec)4.47 E F0(is)4.44 E F3(DEB)4.13 E(UG)-.09 E F4(,)A F0 1.63
(the command)3.88 F F2(ar)4.46 E(g)-.37 E F0 1.63(is e)4.35 F -.15(xe)
-.15 G(cuted).15 E 1.207(before e)144 686.4 R -.15(ve)-.25 G(ry).15 E F2
1.207(simple command)3.707 F F0(,)A F2(for)3.707 E F0(command,)3.706 E
F2(case)3.706 E F0(command,)3.706 E F2(select)3.706 E F0 1.206
(command, e)3.706 F -.15(ve)-.25 G 1.206(ry arithmetic).15 F F2(for)144
698.4 Q F0 .412(command, and before the \214rst command e)2.912 F -.15
(xe)-.15 G .412(cutes in a shell function \(see).15 F F3 .413
(SHELL GRAMMAR)2.912 F F0(abo)144 710.4 Q -.15(ve)-.15 G 2.666
(\). Refer).15 F .166(to the description of the)2.666 F F1(extdeb)2.666
E(ug)-.2 E F0 .166(option to the)2.666 F F1(shopt)2.666 E F0 -.2(bu)
2.666 G .166(iltin for details of its ef).2 F(fect)-.25 E 1.98(on the)
144 722.4 R F1(DEB)4.48 E(UG)-.1 E F0 4.48(trap. If)4.48 F(a)4.48 E F2
(sigspec)4.821 E F0(is)4.791 E F3(ERR)4.481 E F4(,)A F0 1.981
(the command)4.231 F F2(ar)4.811 E(g)-.37 E F0 1.981(is e)4.701 F -.15
(xe)-.15 G 1.981(cuted whene).15 F -.15(ve)-.25 G 4.481(ras).15 G(imple)
-4.481 E(GNU Bash-3.0)72 768 Q(2004 Apr 20)148.735 E(17)198.725 E 0 Cg
EP
(sigspec)4.47 E F0(is)4.44 E F3(DEB)4.13 E(UG)-.09 E F4(,)A F0 1.629
(the command)3.88 F F2(ar)4.459 E(g)-.37 E F0 1.629(is e)4.349 F -.15
(xe)-.15 G(cuted).15 E(GNU Bash-3.0)72 768 Q(2004 Apr 20)148.735 E(17)
198.725 E 0 Cg EP
%%Page: 18 18
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48
(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E 1.358
(command has a non\255zero e)144 84 R 1.358
(xit status, subject to the follo)-.15 F 1.358(wing conditions.)-.25 F
(The)6.358 E/F1 9/Times-Bold@0 SF(ERR)3.858 E F0 1.358(trap is not)3.608
F -.15(exe)144 96 S .105(cuted if the f).15 F .105
(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E 1.206
(before e)144 84 R -.15(ve)-.25 G(ry).15 E/F1 10/Times-Italic@0 SF 1.206
(simple command)3.706 F F0(,)A F1(for)3.706 E F0(command,)3.706 E F1
(case)3.706 E F0(command,)3.706 E F1(select)3.707 E F0 1.207(command, e)
3.707 F -.15(ve)-.25 G 1.207(ry arithmetic).15 F F1(for)144 96 Q F0 .412
(command, and before the \214rst command e)2.913 F -.15(xe)-.15 G .412
(cutes in a shell function \(see).15 F/F2 9/Times-Bold@0 SF .412
(SHELL GRAMMAR)2.912 F F0(abo)144 108 Q -.15(ve)-.15 G 2.665(\). Refer)
.15 F .166(to the description of the)2.665 F/F3 10/Times-Bold@0 SF
(extdeb)2.666 E(ug)-.2 E F0 .166(option to the)2.666 F F3(shopt)2.666 E
F0 -.2(bu)2.666 G .166(iltin for details of its ef).2 F(fect)-.25 E .509
(on the)144 120 R F3(DEB)3.009 E(UG)-.1 E F0 3.009(trap. If)3.009 F(a)
3.009 E F1(sigspec)3.348 E F0(is)3.318 E F2(ERR)3.008 E/F4 9
/Times-Roman@0 SF(,)A F0 .508(the command)2.758 F F1(ar)3.338 E(g)-.37 E
F0 .508(is e)3.228 F -.15(xe)-.15 G .508(cuted whene).15 F -.15(ve)-.25
G 3.008(ras).15 G .508(imple com-)-3.008 F 2.506
(mand has a non\255zero e)144 132 R 2.506
(xit status, subject to the follo)-.15 F 2.506(wing conditions.)-.25 F
(The)7.506 E F2(ERR)5.006 E F0 2.506(trap is not)4.756 F -.15(exe)144
144 S .105(cuted if the f).15 F .105
(ailed command is part of the command list immediately follo)-.1 F .105
(wing a)-.25 F/F2 10/Times-Bold@0 SF(while)2.605 E F0(or)2.605 E F2
(until)2.605 E F0 -.1(ke)144 108 S(yw)-.05 E .549
(ord, part of the test in an)-.1 F/F3 10/Times-Italic@0 SF(if)3.059 E F0
.549(statement, part of a command e)5.009 F -.15(xe)-.15 G .549
(cuted in a).15 F F2(&&)3.049 E F0(or)3.049 E/F4 10/Symbol SF<efef>3.049
E F0 .549(list, or if)3.049 F .577(the command')144 120 R 3.077(sr)-.55
G .577(eturn v)-3.077 F .577(alue is being in)-.25 F -.15(ve)-.4 G .577
(rted via).15 F F2(!)3.077 E F0 5.578(.T)C .578
(hese are the same conditions obe)-5.578 F .578(yed by the)-.15 F F2
(err)144 132 Q(exit)-.18 E F0 3.031(option. If)3.031 F(a)3.031 E F3
(sigspec)3.371 E F0(is)3.341 E F1(RETURN)3.031 E/F5 9/Times-Roman@0 SF
(,)A F0 .531(the command)2.781 F F3(ar)3.361 E(g)-.37 E F0 .531(is e)
3.251 F -.15(xe)-.15 G .53(cuted each time a shell function).15 F .316
(or a script e)144 144 R -.15(xe)-.15 G .317(cuted with the).15 F F2(.)
2.817 E F0(or)2.817 E F2(sour)2.817 E(ce)-.18 E F0 -.2(bu)2.817 G .317
(wing a)-.25 F F3(while)2.605 E F0(or)2.605 E F3(until)2.605 E F0 -.1
(ke)144 156 S(yw)-.05 E .549(ord, part of the test in an)-.1 F F1(if)
3.059 E F0 .549(statement, part of a command e)5.009 F -.15(xe)-.15 G
.549(cuted in a).15 F F3(&&)3.049 E F0(or)3.049 E/F5 10/Symbol SF<efef>
3.049 E F0 .549(list, or if)3.049 F .578(the command')144 168 R 3.078
(sr)-.55 G .578(eturn v)-3.078 F .578(alue is being in)-.25 F -.15(ve)
-.4 G .578(rted via).15 F F3(!)3.078 E F0 5.577(.T)C .577
(hese are the same conditions obe)-5.577 F .577(yed by the)-.15 F F3
(err)144 180 Q(exit)-.18 E F0 3.03(option. If)3.03 F(a)3.03 E F1
(sigspec)3.37 E F0(is)3.341 E F2(RETURN)3.031 E F4(,)A F0 .531
(the command)2.781 F F1(ar)3.361 E(g)-.37 E F0 .531(is e)3.251 F -.15
(xe)-.15 G .531(cuted each time a shell function).15 F .317
(or a script e)144 192 R -.15(xe)-.15 G .317(cuted with the).15 F F3(.)
2.817 E F0(or)2.817 E F3(sour)2.817 E(ce)-.18 E F0 -.2(bu)2.817 G .317
(iltins \214nishes e).2 F -.15(xe)-.15 G 2.817(cuting. Signals).15 F
.317(ignored upon entry to)2.817 F .787
(the shell cannot be trapped or reset.)144 156 R -.35(Tr)5.787 G .787
.316(ignored upon entry to)2.817 F .787
(the shell cannot be trapped or reset.)144 204 R -.35(Tr)5.787 G .787
(apped signals that are not being ignored are reset to their).35 F 1.1
(original v)144 168 R 1.1(alues in a child process when it is created.)
-.25 F 1.1(The return status is f)6.1 F 1.1(alse if an)-.1 F(y)-.15 E F3
(sigspec)3.94 E F0(is)3.91 E(in)144 180 Q -.25(va)-.4 G(lid; otherwise)
.25 E F2(trap)2.5 E F0(returns true.)2.5 E F2(type)108 196.8 Q F0([)2.5
E F2(\255aftpP)A F0(])A F3(name)2.5 E F0([)2.5 E F3(name)A F0(...])2.5 E
-.4(Wi)144 208.8 S .174(th no options, indicate ho).4 F 2.674(we)-.25 G
(ach)-2.674 E F3(name)3.034 E F0 -.1(wo)2.854 G .173
(uld be interpreted if used as a command name.).1 F .173(If the)5.173 F
F2<ad74>144 220.8 Q F0 .842(option is used,)3.342 F F2(type)3.342 E F0
.843(prints a string which is one of)3.343 F F3(alias)3.343 E F0(,).27 E
F3 -.1(ke)3.343 G(ywor)-.2 E(d)-.37 E F0(,).77 E F3(function)3.343 E F0
(,).24 E F3 -.2(bu)3.343 G(iltin).2 E F0 3.343(,o).24 G(r)-3.343 E F3
(\214le)5.253 E F0(if)3.523 E F3(name)144.36 232.8 Q F0 .087
(is an alias, shell reserv)2.767 F .087(ed w)-.15 F .087
(ord, function, b)-.1 F .086(uiltin, or disk \214le, respecti)-.2 F -.15
(ve)-.25 G(ly).15 E 5.086(.I)-.65 G 2.586(ft)-5.086 G(he)-2.586 E F3
(name)2.946 E F0 .086(is not)2.766 F .118
(found, then nothing is printed, and an e)144 244.8 R .118
(xit status of f)-.15 F .118(alse is returned.)-.1 F .119(If the)5.119 F
F2<ad70>2.619 E F0 .119(option is used,)2.619 F F2(type)2.619 E F0 .855
(either returns the name of the disk \214le that w)144 256.8 R .855
(ould be e)-.1 F -.15(xe)-.15 G .855(cuted if).15 F F3(name)3.715 E F0
.855(were speci\214ed as a com-)3.535 F .64(mand name, or nothing if)144
268.8 R/F6 10/Courier@0 SF .64(type -t name)3.14 F F0 -.1(wo)3.14 G .641
(uld not return).1 F F3(\214le)3.141 E F0 5.641(.T).18 G(he)-5.641 E F2
<ad50>3.141 E F0 .641(option forces a)3.141 F F1 -.666(PA)3.141 G(TH)
-.189 E F0 .113(search for each)144 280.8 R F3(name)2.613 E F0 2.613(,e)
C -.15(ve)-2.863 G 2.613(ni).15 G(f)-2.613 E F6 .113(type -t name)2.613
F F0 -.1(wo)2.613 G .113(uld not return).1 F F3(\214le)2.613 E F0 5.113
(.I).18 G 2.613(fa)-5.113 G .112(command is hashed,)-.001 F F2<ad70>
2.612 E F0(and)144 292.8 Q F2<ad50>2.944 E F0 .444(print the hashed v)
2.944 F .444(alue, not necessarily the \214le that appears \214rst in)
-.25 F F1 -.666(PA)2.945 G(TH)-.189 E F5(.)A F0 .445(If the)4.945 F F2
<ad61>2.945 E F0(option)2.945 E .265(is used,)144 304.8 R F2(type)2.765
E F0 .265(prints all of the places that contain an e)2.765 F -.15(xe)
-.15 G .265(cutable named).15 F F3(name)2.765 E F0 5.265(.T).18 G .265
(his includes aliases)-5.265 F .426(and functions, if and only if the)
144 316.8 R F2<ad70>2.926 E F0 .426(option is not also used.)2.926 F
.427(The table of hashed commands is not)5.426 F .549
(consulted when using)144 328.8 R F2<ad61>3.049 E F0 5.549(.T)C(he)
-5.549 E F2<ad66>3.049 E F0 .548
(option suppresses shell function lookup, as with the)3.049 F F2
(command)3.048 E F0 -.2(bu)144 340.8 S(iltin.).2 E F2(type)5 E F0
(original v)144 216 R 1.1(alues in a child process when it is created.)
-.25 F 1.1(The return status is f)6.1 F 1.1(alse if an)-.1 F(y)-.15 E F1
(sigspec)3.94 E F0(is)3.91 E(in)144 228 Q -.25(va)-.4 G(lid; otherwise)
.25 E F3(trap)2.5 E F0(returns true.)2.5 E F3(type)108 244.8 Q F0([)2.5
E F3(\255aftpP)A F0(])A F1(name)2.5 E F0([)2.5 E F1(name)A F0(...])2.5 E
-.4(Wi)144 256.8 S .173(th no options, indicate ho).4 F 2.673(we)-.25 G
(ach)-2.673 E F1(name)3.033 E F0 -.1(wo)2.853 G .174
(uld be interpreted if used as a command name.).1 F .174(If the)5.174 F
F3<ad74>144 268.8 Q F0 .843(option is used,)3.343 F F3(type)3.343 E F0
.843(prints a string which is one of)3.343 F F1(alias)3.343 E F0(,).27 E
F1 -.1(ke)3.343 G(ywor)-.2 E(d)-.37 E F0(,).77 E F1(function)3.343 E F0
(,).24 E F1 -.2(bu)3.342 G(iltin).2 E F0 3.342(,o).24 G(r)-3.342 E F1
(\214le)5.252 E F0(if)3.522 E F1(name)144.36 280.8 Q F0 .086
(is an alias, shell reserv)2.766 F .086(ed w)-.15 F .086
(ord, function, b)-.1 F .087(uiltin, or disk \214le, respecti)-.2 F -.15
(ve)-.25 G(ly).15 E 5.087(.I)-.65 G 2.587(ft)-5.087 G(he)-2.587 E F1
(name)2.947 E F0 .087(is not)2.767 F .119
(found, then nothing is printed, and an e)144 292.8 R .118
(xit status of f)-.15 F .118(alse is returned.)-.1 F .118(If the)5.118 F
F3<ad70>2.618 E F0 .118(option is used,)2.618 F F3(type)2.618 E F0 .855
(either returns the name of the disk \214le that w)144 304.8 R .855
(ould be e)-.1 F -.15(xe)-.15 G .855(cuted if).15 F F1(name)3.715 E F0
.855(were speci\214ed as a com-)3.535 F .641(mand name, or nothing if)
144 316.8 R/F6 10/Courier@0 SF .641(type -t name)3.141 F F0 -.1(wo)3.141
G .641(uld not return).1 F F1(\214le)3.14 E F0 5.64(.T).18 G(he)-5.64 E
F3<ad50>3.14 E F0 .64(option forces a)3.14 F F2 -.666(PA)3.14 G(TH)-.189
E F0 .112(search for each)144 328.8 R F1(name)2.612 E F0 2.612(,e)C -.15
(ve)-2.862 G 2.613(ni).15 G(f)-2.613 E F6 .113(type -t name)2.613 F F0
-.1(wo)2.613 G .113(uld not return).1 F F1(\214le)2.613 E F0 5.113(.I)
.18 G 2.613(fac)-5.113 G .113(ommand is hashed,)-2.613 F F3<ad70>2.613 E
F0(and)144 340.8 Q F3<ad50>2.945 E F0 .445(print the hashed v)2.945 F
.444(alue, not necessarily the \214le that appears \214rst in)-.25 F F2
-.666(PA)2.944 G(TH)-.189 E F4(.)A F0 .444(If the)4.944 F F3<ad61>2.944
E F0(option)2.944 E .265(is used,)144 352.8 R F3(type)2.765 E F0 .265
(prints all of the places that contain an e)2.765 F -.15(xe)-.15 G .265
(cutable named).15 F F1(name)2.765 E F0 5.265(.T).18 G .265
(his includes aliases)-5.265 F .427(and functions, if and only if the)
144 364.8 R F3<ad70>2.926 E F0 .426(option is not also used.)2.926 F
.426(The table of hashed commands is not)5.426 F .548
(consulted when using)144 376.8 R F3<ad61>3.048 E F0 5.548(.T)C(he)
-5.548 E F3<ad66>3.048 E F0 .549
(option suppresses shell function lookup, as with the)3.048 F F3
(command)3.049 E F0 -.2(bu)144 388.8 S(iltin.).2 E F3(type)5 E F0
(returns true if an)2.5 E 2.5(yo)-.15 G 2.5(ft)-2.5 G(he ar)-2.5 E
(guments are found, f)-.18 E(alse if none are found.)-.1 E F2(ulimit)108
357.6 Q F0([)2.5 E F2(\255SHacde\214lmnpqrstuvx)A F0([)2.5 E F3(limit)A
F0(]])A(Pro)144 369.6 Q .243(vides control o)-.15 F -.15(ve)-.15 G 2.743
(rt).15 G .243(he resources a)-2.743 F -.25(va)-.2 G .244
(guments are found, f)-.18 E(alse if none are found.)-.1 E F3(ulimit)108
405.6 Q F0([)2.5 E F3(\255SHacde\214lmnpqrstuvx)A F0([)2.5 E F1(limit)A
F0(]])A(Pro)144 417.6 Q .244(vides control o)-.15 F -.15(ve)-.15 G 2.744
(rt).15 G .244(he resources a)-2.744 F -.25(va)-.2 G .244
(ilable to the shell and to processes started by it, on systems).25 F
.944(that allo)144 381.6 R 3.444(ws)-.25 G .944(uch control.)-3.444 F
(The)5.944 E F2<ad48>3.444 E F0(and)3.444 E F2<ad53>3.444 E F0 .943
.943(that allo)144 429.6 R 3.443(ws)-.25 G .943(uch control.)-3.443 F
(The)5.943 E F3<ad48>3.443 E F0(and)3.443 E F3<ad53>3.444 E F0 .944
(options specify that the hard or soft limit is set for the)3.444 F(gi)
144 393.6 Q -.15(ve)-.25 G 2.708(nr).15 G 2.708(esource. A)-2.708 F .208
144 441.6 Q -.15(ve)-.25 G 2.709(nr).15 G 2.709(esource. A)-2.709 F .208
(hard limit cannot be increased by a non-root user once it is set; a so\
ft limit may)2.708 F .426(be increased up to the v)144 405.6 R .426
(alue of the hard limit.)-.25 F .425(If neither)5.426 F F2<ad48>2.925 E
F0(nor)2.925 E F2<ad53>2.925 E F0 .425
(is speci\214ed, both the soft and)2.925 F .139(hard limits are set.)144
417.6 R .139(The v)5.139 F .139(alue of)-.25 F F3(limit)2.729 E F0 .139
ft limit may)2.709 F .425(be increased up to the v)144 453.6 R .425
(alue of the hard limit.)-.25 F .426(If neither)5.425 F F3<ad48>2.926 E
F0(nor)2.926 E F3<ad53>2.926 E F0 .426
(is speci\214ed, both the soft and)2.926 F .139(hard limits are set.)144
465.6 R .139(The v)5.139 F .139(alue of)-.25 F F1(limit)2.729 E F0 .139
(can be a number in the unit speci\214ed for the resource or one)3.319 F
.742(of the special v)144 429.6 R(alues)-.25 E F2(hard)3.242 E F0(,)A F2
(soft)3.241 E F0 3.241(,o)C(r)-3.241 E F2(unlimited)3.241 E F0 3.241(,w)
.741(of the special v)144 477.6 R(alues)-.25 E F3(hard)3.241 E F0(,)A F3
(soft)3.241 E F0 3.241(,o)C(r)-3.241 E F3(unlimited)3.241 E F0 3.241(,w)
C .741(hich stand for the current hard limit, the current)-3.241 F .78
(soft limit, and no limit, respecti)144 441.6 R -.15(ve)-.25 G(ly).15 E
5.78(.I)-.65 G(f)-5.78 E F3(limit)3.37 E F0 .78
(soft limit, and no limit, respecti)144 489.6 R -.15(ve)-.25 G(ly).15 E
5.78(.I)-.65 G(f)-5.78 E F1(limit)3.37 E F0 .78
(is omitted, the current v)3.96 F .78(alue of the soft limit of the)-.25
F .499(resource is printed, unless the)144 453.6 R F2<ad48>2.999 E F0
.499(option is gi)2.999 F -.15(ve)-.25 G 2.999(n. When).15 F .498
F .498(resource is printed, unless the)144 501.6 R F3<ad48>2.999 E F0
.499(option is gi)2.999 F -.15(ve)-.25 G 2.999(n. When).15 F .499
(more than one resource is speci\214ed, the)2.999 F
(limit name and unit are printed before the v)144 465.6 Q 2.5
(alue. Other)-.25 F(options are interpreted as follo)2.5 E(ws:)-.25 E F2
<ad61>144 477.6 Q F0(All current limits are reported)25.3 E F2<ad63>144
489.6 Q F0(The maximum size of core \214les created)25.86 E F2<ad64>144
501.6 Q F0(The maximum size of a process')24.74 E 2.5(sd)-.55 G(ata se)
-2.5 E(gment)-.15 E F2<ad65>144 513.6 Q F0
(The maximum scheduling priority \("nice"\))25.86 E F2<ad66>144 525.6 Q
(limit name and unit are printed before the v)144 513.6 Q 2.5
(alue. Other)-.25 F(options are interpreted as follo)2.5 E(ws:)-.25 E F3
<ad61>144 525.6 Q F0(All current limits are reported)25.3 E F3<ad63>144
537.6 Q F0(The maximum size of core \214les created)25.86 E F3<ad64>144
549.6 Q F0(The maximum size of a process')24.74 E 2.5(sd)-.55 G(ata se)
-2.5 E(gment)-.15 E F3<ad65>144 561.6 Q F0
(The maximum scheduling priority \("nice"\))25.86 E F3<ad66>144 573.6 Q
F0(The maximum size of \214les written by the shell and its children)
26.97 E F2<ad69>144 537.6 Q F0(The maximum number of pending signals)
27.52 E F2<ad6c>144 549.6 Q F0(The maximum size that may be lock)27.52 E
(ed into memory)-.1 E F2<ad6d>144 561.6 Q F0
(The maximum resident set size)21.97 E F2<ad6e>144 573.6 Q F0 .791(The \
26.97 E F3<ad69>144 585.6 Q F0(The maximum number of pending signals)
27.52 E F3<ad6c>144 597.6 Q F0(The maximum size that may be lock)27.52 E
(ed into memory)-.1 E F3<ad6d>144 609.6 Q F0
(The maximum resident set size)21.97 E F3<ad6e>144 621.6 Q F0 .791(The \
maximum number of open \214le descriptors \(most systems do not allo)
24.74 F 3.291(wt)-.25 G .791(his v)-3.291 F .791(alue to)-.25 F
(be set\))180 585.6 Q F2<ad70>144 597.6 Q F0
(The pipe size in 512-byte blocks \(this may not be set\))24.74 E F2
<ad71>144 609.6 Q F0
(The maximum number of bytes in POSIX message queues)24.74 E F2<ad72>144
621.6 Q F0(The maximum real-time scheduling priority)25.86 E F2<ad73>144
633.6 Q F0(The maximum stack size)26.41 E F2<ad74>144 645.6 Q F0
(The maximum amount of cpu time in seconds)26.97 E F2<ad75>144 657.6 Q
24.74 F 3.29(wt)-.25 G .79(his v)-3.29 F .79(alue to)-.25 F(be set\))180
633.6 Q F3<ad70>144 645.6 Q F0
(The pipe size in 512-byte blocks \(this may not be set\))24.74 E F3
<ad71>144 657.6 Q F0
(The maximum number of bytes in POSIX message queues)24.74 E F3<ad72>144
669.6 Q F0(The maximum real-time scheduling priority)25.86 E F3<ad73>144
681.6 Q F0(The maximum stack size)26.41 E F3<ad74>144 693.6 Q F0
(The maximum amount of cpu time in seconds)26.97 E F3<ad75>144 705.6 Q
F0(The maximum number of processes a)24.74 E -.25(va)-.2 G
(ilable to a single user).25 E F2<ad76>144 669.6 Q F0
(ilable to a single user).25 E F3<ad76>144 717.6 Q F0
(The maximum amount of virtual memory a)25.3 E -.25(va)-.2 G
(ilable to the shell).25 E F2<ad78>144 681.6 Q F0
(The maximum number of \214le locks)25.3 E(If)144 698.4 Q F3(limit)2.933
E F0 .343(is gi)3.523 F -.15(ve)-.25 G .343(n, it is the ne).15 F 2.843
(wv)-.25 G .343(alue of the speci\214ed resource \(the)-3.093 F F2<ad61>
2.843 E F0 .343(option is display only\).)2.843 F .343(If no)5.343 F
.175(option is gi)144 710.4 R -.15(ve)-.25 G .175(n, then).15 F F2<ad66>
2.675 E F0 .175(is assumed.)2.675 F -1.11(Va)5.175 G .175
(lues are in 1024-byte increments, e)1.11 F .176(xcept for)-.15 F F2
<ad74>2.676 E F0 2.676(,w)C .176(hich is in)-2.676 F(seconds,)144 722.4
Q F2<ad70>2.698 E F0 2.698(,w)C .198
(hich is in units of 512-byte blocks, and)-2.698 F F2<ad6e>2.698 E F0
(and)2.698 E F2<ad75>2.697 E F0 2.697(,w)C .197(hich are unscaled v)
-2.697 F 2.697(alues. The)-.25 F(GNU Bash-3.0)72 768 Q(2004 Apr 20)
148.735 E(18)198.725 E 0 Cg EP
(ilable to the shell).25 E(GNU Bash-3.0)72 768 Q(2004 Apr 20)148.735 E
(18)198.725 E 0 Cg EP
%%Page: 19 19
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48
(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E .404
(return status is 0 unless an in)144 84 R -.25(va)-.4 G .404
(lid option or ar).25 F .404
(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10
/Times-Bold@0 SF<ad78>144 84 Q F0(The maximum number of \214le locks)
25.3 E(If)144 100.8 Q/F2 10/Times-Italic@0 SF(limit)2.933 E F0 .343
(is gi)3.523 F -.15(ve)-.25 G .343(n, it is the ne).15 F 2.843(wv)-.25 G
.343(alue of the speci\214ed resource \(the)-3.093 F F1<ad61>2.843 E F0
.343(option is display only\).)2.843 F .343(If no)5.343 F .176
(option is gi)144 112.8 R -.15(ve)-.25 G .176(n, then).15 F F1<ad66>
2.676 E F0 .175(is assumed.)2.676 F -1.11(Va)5.175 G .175
(lues are in 1024-byte increments, e)1.11 F .175(xcept for)-.15 F F1
<ad74>2.675 E F0 2.675(,w)C .175(hich is in)-2.675 F(seconds,)144 124.8
Q F1<ad70>2.697 E F0 2.697(,w)C .197
(hich is in units of 512-byte blocks, and)-2.697 F F1<ad6e>2.698 E F0
(and)2.698 E F1<ad75>2.698 E F0 2.698(,w)C .198(hich are unscaled v)
-2.698 F 2.698(alues. The)-.25 F .404(return status is 0 unless an in)
144 136.8 R -.25(va)-.4 G .404(lid option or ar).25 F .404
(gument is supplied, or an error occurs while setting)-.18 F 2.5(an)144
96 S .5 -.25(ew l)-2.5 H(imit.).25 E/F1 10/Times-Bold@0 SF(umask)108
112.8 Q F0([)2.5 E F1<ad70>A F0 2.5(][)C F1<ad53>-2.5 E F0 2.5(][)C/F2
10/Times-Italic@0 SF(mode)-2.5 E F0(])A .2
(The user \214le-creation mask is set to)144 124.8 R F2(mode)2.7 E F0
148.8 S .5 -.25(ew l)-2.5 H(imit.).25 E F1(umask)108 165.6 Q F0([)2.5 E
F1<ad70>A F0 2.5(][)C F1<ad53>-2.5 E F0 2.5(][)C F2(mode)-2.5 E F0(])A
.2(The user \214le-creation mask is set to)144 177.6 R F2(mode)2.7 E F0
5.2(.I).18 G(f)-5.2 E F2(mode)3.08 E F0(be)2.88 E .2
(gins with a digit, it is interpreted as an octal)-.15 F .066(number; o\
therwise it is interpreted as a symbolic mode mask similar to that acce\
pted by)144 136.8 R F2 -.15(ch)2.566 G(mod).15 E F0(\(1\).).77 E(If)144
148.8 Q F2(mode)3.263 E F0 .382(is omitted, the current v)3.063 F .382
pted by)144 189.6 R F2 -.15(ch)2.566 G(mod).15 E F0(\(1\).).77 E(If)144
201.6 Q F2(mode)3.262 E F0 .382(is omitted, the current v)3.062 F .382
(alue of the mask is printed.)-.25 F(The)5.382 E F1<ad53>2.882 E F0 .382
(option causes the mask to be)2.882 F .547
(printed in symbolic form; the def)144 160.8 R .547
(printed in symbolic form; the def)144 213.6 R .547
(ault output is an octal number)-.1 F 5.547(.I)-.55 G 3.047(ft)-5.547 G
(he)-3.047 E F1<ad70>3.047 E F0 .547(option is supplied, and)3.047 F F2
(mode)144.38 172.8 Q F0 .552
(is omitted, the output is in a form that may be reused as input.)3.232
F .551(The return status is 0 if the)5.551 F(mode w)144 184.8 Q
(mode)144.38 225.6 Q F0 .551
(is omitted, the output is in a form that may be reused as input.)3.231
F .552(The return status is 0 if the)5.552 F(mode w)144 237.6 Q
(as successfully changed or if no)-.1 E F2(mode)2.5 E F0(ar)2.5 E
(gument w)-.18 E(as supplied, and f)-.1 E(alse otherwise.)-.1 E F1
(unalias)108 201.6 Q F0<5bad>2.5 E F1(a)A F0 2.5(][)C F2(name)-2.5 E F0
(...])2.5 E(Remo)144 213.6 Q 1.955 -.15(ve e)-.15 H(ach).15 E F2(name)
(unalias)108 254.4 Q F0<5bad>2.5 E F1(a)A F0 2.5(][)C F2(name)-2.5 E F0
(...])2.5 E(Remo)144 266.4 Q 1.955 -.15(ve e)-.15 H(ach).15 E F2(name)
4.155 E F0 1.655(from the list of de\214ned aliases.)4.155 F(If)6.655 E
F1<ad61>4.155 E F0 1.655(is supplied, all alias de\214nitions are)4.155
F(remo)144 225.6 Q -.15(ve)-.15 G 2.5(d. The).15 F(return v)2.5 E
F(remo)144 278.4 Q -.15(ve)-.15 G 2.5(d. The).15 F(return v)2.5 E
(alue is true unless a supplied)-.25 E F2(name)2.86 E F0
(is not a de\214ned alias.)2.68 E F1(unset)108 242.4 Q F0<5bad>2.5 E F1
(fv)A F0 2.5(][)C F2(name)-2.5 E F0(...])2.5 E -.15(Fo)144 254.4 S 3.107
(re).15 G(ach)-3.107 E F2(name)3.107 E F0 3.107(,r).18 G(emo)-3.107 E
.907 -.15(ve t)-.15 H .607(he corresponding v).15 F .607
(ariable or function.)-.25 F .606(If no options are supplied, or the)
5.607 F F1<ad76>144 266.4 Q F0 .304(option is gi)2.804 F -.15(ve)-.25 G
.304(n, each).15 F F2(name)3.164 E F0 .305(refers to a shell v)2.985 F
2.805(ariable. Read-only)-.25 F -.25(va)2.805 G .305
(riables may not be unset.).25 F(If)5.305 E F1<ad66>144 278.4 Q F0 .46
(is speci\214ed, each)2.96 F F2(name)3.32 E F0 .459
(refers to a shell function, and the function de\214nition is remo)3.14
F -.15(ve)-.15 G 2.959(d. Each).15 F .902(unset v)144 290.4 R .902
(is not a de\214ned alias.)2.68 E F1(unset)108 295.2 Q F0<5bad>2.5 E F1
(fv)A F0 2.5(][)C F2(name)-2.5 E F0(...])2.5 E -.15(Fo)144 307.2 S 3.106
(re).15 G(ach)-3.106 E F2(name)3.106 E F0 3.106(,r).18 G(emo)-3.106 E
.906 -.15(ve t)-.15 H .606(he corresponding v).15 F .607
(ariable or function.)-.25 F .607(If no options are supplied, or the)
5.607 F F1<ad76>144 319.2 Q F0 .305(option is gi)2.805 F -.15(ve)-.25 G
.305(n, each).15 F F2(name)3.165 E F0 .305(refers to a shell v)2.985 F
2.805(ariable. Read-only)-.25 F -.25(va)2.805 G .304
(riables may not be unset.).25 F(If)5.304 E F1<ad66>144 331.2 Q F0 .459
(is speci\214ed, each)2.959 F F2(name)3.319 E F0 .459
(refers to a shell function, and the function de\214nition is remo)3.139
F -.15(ve)-.15 G 2.96(d. Each).15 F .903(unset v)144 343.2 R .903
(ariable or function is remo)-.25 F -.15(ve)-.15 G 3.402(df).15 G .902
(rom the en)-3.402 F .903(vironment passed to subsequent commands.)-.4 F
(If)5.903 E(an)144 302.4 Q 4.285(yo)-.15 G(f)-4.285 E/F3 9/Times-Bold@0
SF(RANDOM)4.285 E/F4 9/Times-Roman@0 SF(,)A F3(SECONDS)4.035 E F4(,)A F3
(rom the en)-3.402 F .902(vironment passed to subsequent commands.)-.4 F
(If)5.902 E(an)144 355.2 Q 4.284(yo)-.15 G(f)-4.284 E/F3 9/Times-Bold@0
SF(RANDOM)4.284 E/F4 9/Times-Roman@0 SF(,)A F3(SECONDS)4.035 E F4(,)A F3
(LINENO)4.035 E F4(,)A F3(HISTCMD)4.035 E F4(,)A F3(FUNCN)4.035 E(AME)
-.18 E F4(,)A F3(GR)4.035 E(OUPS)-.27 E F4(,)A F0(or)4.035 E F3(DIRST)
4.284 E -.495(AC)-.81 G(K).495 E F0(are)4.034 E .328(unset, the)144
314.4 R 2.828(yl)-.15 G .328(ose their special properties, e)-2.828 F
4.285 E -.495(AC)-.81 G(K).495 E F0(are)4.035 E .329(unset, the)144
367.2 R 2.829(yl)-.15 G .328(ose their special properties, e)-2.829 F
-.15(ve)-.25 G 2.828(ni).15 G 2.828(ft)-2.828 G(he)-2.828 E 2.828(ya)
-.15 G .328(re subsequently reset.)-2.828 F .328(The e)5.328 F .329
(xit status is true)-.15 F(unless a)144 326.4 Q F2(name)2.86 E F0
(is readonly)2.68 E(.)-.65 E F1(wait)108 343.2 Q F0([)2.5 E F2 2.5(n.)C
(..)-2.5 E F0(])A -.8(Wa)144 355.2 S .288
-.15 G .328(re subsequently reset.)-2.828 F .328(The e)5.328 F .328
(xit status is true)-.15 F(unless a)144 379.2 Q F2(name)2.86 E F0
(is readonly)2.68 E(.)-.65 E F1(wait)108 396 Q F0([)2.5 E F2 2.5(n.)C
(..)-2.5 E F0(])A -.8(Wa)144 408 S .288
(it for each speci\214ed process and return its termination status.).8 F
(Each)5.288 E F2(n)3.148 E F0 .287(may be a process ID or a)3.028 F .722
(job speci\214cation; if a job spec is gi)144 367.2 R -.15(ve)-.25 G
.722(n, all processes in that job').15 F 3.222(sp)-.55 G .722
(ipeline are w)-3.222 F .722(aited for)-.1 F 5.722(.I)-.55 G(f)-5.722 E
F2(n)3.583 E F0(is)3.463 E 1.266(not gi)144 379.2 R -.15(ve)-.25 G 1.266
(n, all currently acti).15 F 1.566 -.15(ve c)-.25 H 1.265
(hild processes are w).15 F 1.265(aited for)-.1 F 3.765(,a)-.4 G 1.265
(nd the return status is zero.)-3.765 F(If)6.265 E F2(n)4.125 E F0 .456
(speci\214es a non-e)144 391.2 R .457
(Each)5.288 E F2(n)3.148 E F0 .288(may be a process ID or a)3.028 F .722
(job speci\214cation; if a job spec is gi)144 420 R -.15(ve)-.25 G .722
(n, all processes in that job').15 F 3.222(sp)-.55 G .722(ipeline are w)
-3.222 F .722(aited for)-.1 F 5.722(.I)-.55 G(f)-5.722 E F2(n)3.582 E F0
(is)3.462 E 1.265(not gi)144 432 R -.15(ve)-.25 G 1.265
(n, all currently acti).15 F 1.565 -.15(ve c)-.25 H 1.265
(hild processes are w).15 F 1.265(aited for)-.1 F 3.765(,a)-.4 G 1.266
(nd the return status is zero.)-3.765 F(If)6.266 E F2(n)4.126 E F0 .457
(speci\214es a non-e)144 444 R .457
(xistent process or job, the return status is 127.)-.15 F .457
(Otherwise, the return status is the)5.457 F -.15(ex)144 403.2 S
(Otherwise, the return status is the)5.457 F -.15(ex)144 456 S
(it status of the last process or job w).15 E(aited for)-.1 E(.)-.55 E
/F5 10.95/Times-Bold@0 SF(SEE ALSO)72 420 Q F0(bash\(1\), sh\(1\))108
432 Q(GNU Bash-3.0)72 768 Q(2004 Apr 20)148.735 E(19)198.725 E 0 Cg EP
/F5 10.95/Times-Bold@0 SF(SEE ALSO)72 472.8 Q F0(bash\(1\), sh\(1\))108
484.8 Q(GNU Bash-3.0)72 768 Q(2004 Apr 20)148.735 E(19)198.725 E 0 Cg EP
%%Trailer
end
%%EOF
+1 -1
View File
@@ -1,6 +1,6 @@
%!PS-Adobe-3.0
%%Creator: groff version 1.19.1
%%CreationDate: Thu Jan 10 17:41:20 2008
%%CreationDate: Tue Mar 4 08:37:56 2008
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%DocumentSuppliedResources: procset grops 1.19 1
+25 -1
View File
@@ -1,7 +1,7 @@
/* externs.h -- extern function declarations which do not appear in their
own header file. */
/* Copyright (C) 1993-2005 Free Software Foundation, Inc.
/* Copyright (C) 1993-2008 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -148,6 +148,18 @@ extern void show_shell_version __P((int));
/* Functions from the bash library, lib/sh/libsh.a. These should really
go into a separate include file. */
/* declarations for functions defined in lib/sh/casemod.c */
extern char *sh_modcase __P((const char *, char *, int));
/* Defines for flags argument to sh_modcase. These need to agree with what's
in lib/sh/casemode.c */
#define CASE_LOWER 0x01
#define CASE_UPPER 0x02
#define CASE_CAPITALIZE 0x04
#define CASE_UNCAP 0x08
#define CASE_TOGGLE 0x10
#define CASE_TOGGLEALL 0x20
/* declarations for functions defined in lib/sh/clktck.c */
extern long get_clk_tck __P((void));
@@ -197,6 +209,7 @@ extern char *uitos __P((uintmax_t));
#define MP_DOTILDE 0x01
#define MP_DOCWD 0x02
#define MP_RMDOT 0x04
#define MP_IGNDOT 0x08
extern char *sh_makepath __P((const char *, const char *, int));
@@ -261,6 +274,7 @@ extern int sh_contains_shell_metas __P((char *));
/* declarations for functions defined in lib/sh/spell.c */
extern int spname __P((char *, char *));
extern char *dirspell __P((char *));
/* declarations for functions defined in lib/sh/strcasecmp.c */
#if !defined (HAVE_STRCASECMP)
@@ -387,6 +401,13 @@ extern char *sh_mktmpname __P((char *, int));
extern int sh_mktmpfd __P((char *, int, char **));
/* extern FILE *sh_mktmpfp __P((char *, int, char **)); */
/* declarations for functions defined in lib/sh/uconvert.c */
extern int uconvert __P((char *, long *, long *));
/* declarations for functions defined in lib/sh/ufuncs.c */
extern unsigned int falarm __P((unsigned int, unsigned int));
extern unsigned int fsleep __P((unsigned int, unsigned int));
/* declarations for functions defined in lib/sh/winsize.c */
extern void get_new_window_size __P((int, int *, int *));
@@ -397,6 +418,9 @@ extern char *xstrchr __P((const char *, int));
/* declarations for functions defined in lib/sh/zcatfd.c */
extern int zcatfd __P((int, int, char *));
/* declarations for functions defined in lib/sh/zgetline.c */
extern ssize_t zgetline __P((int, char **, size_t *, int));
/* declarations for functions defined in lib/sh/zmapfd.c */
extern int zmapfd __P((int, char **, char *));
+38 -1
View File
@@ -1,7 +1,7 @@
/* externs.h -- extern function declarations which do not appear in their
own header file. */
/* Copyright (C) 1993-2005 Free Software Foundation, Inc.
/* Copyright (C) 1993-2008 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -30,6 +30,9 @@
extern intmax_t evalexp __P((char *, int *));
/* Functions from print_cmd.c. */
#define FUNC_MULTILINE 0x01
#define FUNC_EXTERNAL 0x02
extern char *make_command_string __P((COMMAND *));
extern char *named_function_string __P((char *, COMMAND *, int));
@@ -145,6 +148,18 @@ extern void show_shell_version __P((int));
/* Functions from the bash library, lib/sh/libsh.a. These should really
go into a separate include file. */
/* declarations for functions defined in lib/sh/casemod.c */
extern char *sh_modcase __P((const char *, char *, int));
/* Defines for flags argument to sh_modcase. These need to agree with what's
in lib/sh/casemode.c */
#define CASE_LOWER 0x01
#define CASE_UPPER 0x02
#define CASE_CAPITALIZE 0x04
#define CASE_UNCAP 0x08
#define CASE_TOGGLE 0x10
#define CASE_TOGGLEALL 0x20
/* declarations for functions defined in lib/sh/clktck.c */
extern long get_clk_tck __P((void));
@@ -168,6 +183,17 @@ extern char *fmtullong __P((unsigned long long int, int, char *, size_t, int));
/* Declarations for functions defined in lib/sh/fmtumax.c */
extern char *fmtumax __P((uintmax_t, int, char *, size_t, int));
/* Declarations for functions defined in lib/sh/fpurge.c */
#if defined (NEED_FPURGE_DECL)
#if HAVE_FPURGE
# define fpurge _bash_fpurge
#endif
extern int fpurge __P((FILE *stream));
#endif /* NEED_FPURGE_DECL */
/* Declarations for functions defined in lib/sh/getcwd.c */
#if !defined (HAVE_GETCWD)
extern char *getcwd __P((char *, size_t));
@@ -183,6 +209,7 @@ extern char *uitos __P((uintmax_t));
#define MP_DOTILDE 0x01
#define MP_DOCWD 0x02
#define MP_RMDOT 0x04
#define MP_IGNDOT 0x08
extern char *sh_makepath __P((const char *, const char *, int));
@@ -373,6 +400,13 @@ extern char *sh_mktmpname __P((char *, int));
extern int sh_mktmpfd __P((char *, int, char **));
/* extern FILE *sh_mktmpfp __P((char *, int, char **)); */
/* declarations for functions defined in lib/sh/uconvert.c */
extern int uconvert __P((char *, long *, long *));
/* declarations for functions defined in lib/sh/ufuncs.c */
extern unsigned int falarm __P((unsigned int, unsigned int));
extern unsigned int fsleep __P((unsigned int, unsigned int));
/* declarations for functions defined in lib/sh/winsize.c */
extern void get_new_window_size __P((int, int *, int *));
@@ -383,6 +417,9 @@ extern char *xstrchr __P((const char *, int));
/* declarations for functions defined in lib/sh/zcatfd.c */
extern int zcatfd __P((int, int, char *));
/* declarations for functions defined in lib/sh/zgetline.c */
extern ssize_t zgetline __P((int, char **, size_t *, int));
/* declarations for functions defined in lib/sh/zmapfd.c */
extern int zmapfd __P((int, char **, char *));
+27 -17
View File
@@ -27,6 +27,10 @@
#include <shmbutil.h>
#if HANDLE_MULTIBYTE
#ifndef FREE
# define FREE(x) do { if (x) free (x); } while (0)
#endif
/* On some locales (ex. ja_JP.sjis), mbsrtowc doesn't convert 0x5c to U<0x5c>.
So, this function is made for converting 0x5c to U<0x5c>. */
@@ -160,12 +164,16 @@ xdupmbstowcs (destp, indicesp, src)
return (size_t)-1;
}
indices = (char **) malloc (wsbuf_size * sizeof(char *));
if (indices == NULL)
indices = NULL;
if (indicesp)
{
free (wsbuf);
*destp = NULL;
return (size_t)-1;
indices = (char **) malloc (wsbuf_size * sizeof(char *));
if (indices == NULL)
{
free (wsbuf);
*destp = NULL;
return (size_t)-1;
}
}
p = src;
@@ -196,7 +204,7 @@ xdupmbstowcs (destp, indicesp, src)
if (MB_INVALIDCH (mblength))
{
free (wsbuf);
free (indices);
FREE (indices);
*destp = NULL;
return (size_t)-1;
}
@@ -215,25 +223,29 @@ xdupmbstowcs (destp, indicesp, src)
if (wstmp == NULL)
{
free (wsbuf);
free (indices);
FREE (indices);
*destp = NULL;
return (size_t)-1;
}
wsbuf = wstmp;
idxtmp = (char **) realloc (indices, wsbuf_size * sizeof (char **));
if (idxtmp == NULL)
if (indicesp)
{
free (wsbuf);
free (indices);
*destp = NULL;
return (size_t)-1;
idxtmp = (char **) realloc (indices, wsbuf_size * sizeof (char **));
if (idxtmp == NULL)
{
free (wsbuf);
free (indices);
*destp = NULL;
return (size_t)-1;
}
indices = idxtmp;
}
indices = idxtmp;
}
wsbuf[wcnum - 1] = wc;
indices[wcnum - 1] = (char *)p;
if (indices)
indices[wcnum - 1] = (char *)p;
p += mblength;
}
while (MB_NULLWCH (wc) == 0);
@@ -242,8 +254,6 @@ xdupmbstowcs (destp, indicesp, src)
*destp = wsbuf;
if (indicesp != NULL)
*indicesp = indices;
else
free (indices);
return (wcnum - 1);
}
+261
View File
@@ -0,0 +1,261 @@
/* xmbsrtowcs.c -- replacement function for mbsrtowcs */
/* Copyright (C) 2002-2004 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
Bash is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.
Bash is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License along
with Bash; see the file COPYING. If not, write to the Free Software
Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#include <config.h>
#include <bashansi.h>
/* <wchar.h>, <wctype.h> and <stdlib.h> are included in "shmbutil.h".
If <wchar.h>, <wctype.h>, mbsrtowcs(), exist, HANDLE_MULTIBYTE
is defined as 1. */
#include <shmbutil.h>
#if HANDLE_MULTIBYTE
#ifndef FREE
# define FREE(x) if (x) free (x)
#endif
/* On some locales (ex. ja_JP.sjis), mbsrtowc doesn't convert 0x5c to U<0x5c>.
So, this function is made for converting 0x5c to U<0x5c>. */
static mbstate_t local_state;
static int local_state_use = 0;
size_t
xmbsrtowcs (dest, src, len, pstate)
wchar_t *dest;
const char **src;
size_t len;
mbstate_t *pstate;
{
mbstate_t *ps;
size_t mblength, wclength, n;
ps = pstate;
if (pstate == NULL)
{
if (!local_state_use)
{
memset (&local_state, '\0', sizeof(mbstate_t));
local_state_use = 1;
}
ps = &local_state;
}
n = strlen (*src);
if (dest == NULL)
{
wchar_t *wsbuf;
const char *mbs;
mbstate_t psbuf;
/* It doesn't matter if malloc fails here, since mbsrtowcs should do
the right thing with a NULL first argument. */
wsbuf = (wchar_t *) malloc ((n + 1) * sizeof(wchar_t));
mbs = *src;
psbuf = *ps;
wclength = mbsrtowcs (wsbuf, &mbs, n, &psbuf);
if (wsbuf)
free (wsbuf);
return wclength;
}
for (wclength = 0; wclength < len; wclength++, dest++)
{
if (mbsinit(ps))
{
if (**src == '\0')
{
*dest = L'\0';
*src = NULL;
return (wclength);
}
else if (**src == '\\')
{
*dest = L'\\';
mblength = 1;
}
else
mblength = mbrtowc(dest, *src, n, ps);
}
else
mblength = mbrtowc(dest, *src, n, ps);
/* Cannot convert multibyte character to wide character. */
if (mblength == (size_t)-1 || mblength == (size_t)-2)
return (size_t)-1;
*src += mblength;
n -= mblength;
/* The multibyte string has been completely converted,
including the terminating '\0'. */
if (*dest == L'\0')
{
*src = NULL;
break;
}
}
return (wclength);
}
/* Convert a multibyte string to a wide character string. Memory for the
new wide character string is obtained with malloc.
The return value is the length of the wide character string. Returns a
pointer to the wide character string in DESTP. If INDICESP is not NULL,
INDICESP stores the pointer to the pointer array. Each pointer is to
the first byte of each multibyte character. Memory for the pointer array
is obtained with malloc, too.
If conversion is failed, the return value is (size_t)-1 and the values
of DESTP and INDICESP are NULL. */
#define WSBUF_INC 32
size_t
xdupmbstowcs (destp, indicesp, src)
wchar_t **destp; /* Store the pointer to the wide character string */
char ***indicesp; /* Store the pointer to the pointer array. */
const char *src; /* Multibyte character string */
{
const char *p; /* Conversion start position of src */
wchar_t wc; /* Created wide character by conversion */
wchar_t *wsbuf; /* Buffer for wide characters. */
char **indices; /* Buffer for indices. */
size_t wsbuf_size; /* Size of WSBUF */
size_t wcnum; /* Number of wide characters in WSBUF */
mbstate_t state; /* Conversion State */
/* In case SRC or DESP is NULL, conversion doesn't take place. */
if (src == NULL || destp == NULL)
{
if (destp)
*destp = NULL;
return (size_t)-1;
}
memset (&state, '\0', sizeof(mbstate_t));
wsbuf_size = WSBUF_INC;
wsbuf = (wchar_t *) malloc (wsbuf_size * sizeof(wchar_t));
if (wsbuf == NULL)
{
*destp = NULL;
return (size_t)-1;
}
indices = NULL;
if (indicesp)
{
indices = (char **) malloc (wsbuf_size * sizeof(char *));
if (indices == NULL)
{
free (wsbuf);
*destp = NULL;
return (size_t)-1;
}
}
p = src;
wcnum = 0;
do
{
size_t mblength; /* Byte length of one multibyte character. */
if (mbsinit (&state))
{
if (*p == '\0')
{
wc = L'\0';
mblength = 1;
}
else if (*p == '\\')
{
wc = L'\\';
mblength = 1;
}
else
mblength = mbrtowc(&wc, p, MB_LEN_MAX, &state);
}
else
mblength = mbrtowc(&wc, p, MB_LEN_MAX, &state);
/* Conversion failed. */
if (MB_INVALIDCH (mblength))
{
free (wsbuf);
FREE (indices);
*destp = NULL;
return (size_t)-1;
}
++wcnum;
/* Resize buffers when they are not large enough. */
if (wsbuf_size < wcnum)
{
wchar_t *wstmp;
char **idxtmp;
wsbuf_size += WSBUF_INC;
wstmp = (wchar_t *) realloc (wsbuf, wsbuf_size * sizeof (wchar_t));
if (wstmp == NULL)
{
free (wsbuf);
FREE (indices);
*destp = NULL;
return (size_t)-1;
}
wsbuf = wstmp;
if (indicesp)
{
idxtmp = (char **) realloc (indices, wsbuf_size * sizeof (char **));
if (idxtmp == NULL)
{
free (wsbuf);
free (indices);
*destp = NULL;
return (size_t)-1;
}
indices = idxtmp;
}
}
wsbuf[wcnum - 1] = wc;
if (indices)
indices[wcnum - 1] = (char *)p;
p += mblength;
}
while (MB_NULLWCH (wc) == 0);
/* Return the length of the wide character string, not including `\0'. */
*destp = wsbuf;
if (indicesp != NULL)
*indicesp = indices;
return (wcnum - 1);
}
#endif /* HANDLE_MULTIBYTE */
+20 -2
View File
@@ -91,7 +91,8 @@ CSOURCES = clktck.c clock.c getcwd.c getenv.c oslib.c setlinebuf.c \
fmtulong.c fmtullong.c fmtumax.c shmatch.c strnlen.c \
strtoll.c strtoull.c strtoimax.c strtoumax.c memset.c strstr.c \
mktime.c strftime.c xstrchr.c zcatfd.c zmapfd.c winsize.c eaccess.c \
wcsdup.c fpurge.c zgetline.c mbscmp.c
wcsdup.c fpurge.c zgetline.c mbscmp.c uconvert.c ufuncs.c \
casemod.c
# The header files for this library.
HSOURCES =
@@ -104,7 +105,7 @@ OBJECTS = clktck.o clock.o getenv.o oslib.o setlinebuf.o strnlen.o \
pathphys.o tmpfile.o stringlist.o stringvec.o spell.o shquote.o \
strtrans.o strindex.o snprintf.o mailstat.o fmtulong.o \
fmtullong.o fmtumax.o xstrchr.o zcatfd.o zmapfd.o winsize.o wcsdup.o \
fpurge.o zgetline.o mbscmp.o ${LIBOBJS}
fpurge.o zgetline.o mbscmp.o uconvert.o ufuncs.o casemod.o ${LIBOBJS}
SUPPORT = Makefile
@@ -136,6 +137,7 @@ ${BUILD_DIR}/version.h: ${BUILD_DIR}/config.h ${BUILD_DIR}/Makefile Makefile
-( cd ${BUILD_DIR} && ${MAKE} ${MFLAGS} version.h )
# rules for losing makes, like SunOS
casemod.o: casemod.c
clktck.o: clktck.c
clock.o: clock.c
eaccess.o: eaccess.c
@@ -182,6 +184,8 @@ strtrans.o: strtrans.c
times.o: times.c
timeval.o: timeval.c
tmpfile.o: tmpfile.c
uconvert.o: uconvert.c
ufuncs.o: ufuncs.c
vprint.o: vprint.c
wcsdup.o: wcsdup.c
xstrchr.o: xstrchr.c
@@ -199,6 +203,7 @@ strtoul.o: strtol.c
strtoull.o: strtol.c
# all files in the library depend on config.h
casemod.o: ${BUILD_DIR}/config.h
clktck.o: ${BUILD_DIR}/config.h
clock.o: ${BUILD_DIR}/config.h
eaccess.o: ${BUILD_DIR}/config.h
@@ -245,6 +250,8 @@ strtrans.o: ${BUILD_DIR}/config.h
times.o: ${BUILD_DIR}/config.h
timeval.o: ${BUILD_DIR}/config.h
tmpfile.o: ${BUILD_DIR}/config.h
uconvert.o: ${BUILD_DIR}/config.h
ufuncs.o: ${BUILD_DIR}/config.h
vprint.o: ${BUILD_DIR}/config.h
wcsdup.o: ${BUILD_DIR}/config.h
xstrchr.o: ${BUILD_DIR}/config.h
@@ -449,6 +456,10 @@ tmpfile.o: ${topdir}/bashtypes.h
tmpfile.o: ${BASHINCDIR}/posixstat.h
tmpfile.o: ${BASHINCDIR}/filecntl.h
uconvert.o: ${topdir}/bashtypes.h
ufuncs.o: ${topdir}/bashtypes.h
clock.o: ${BASHINCDIR}/posixtime.h
mailstat.o: ${topdir}/bashansi.h
@@ -495,3 +506,10 @@ zgetline.o: ${topdir}/bashtypes.h
mbscmp.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h
mbscmp.o: ${BASHINCDIR}/stdc.h
mbscmp.o: ${topdir}/xmalloc.h
casemod.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h
casemod.o: ${BASHINCDIR}/stdc.h
casemod.o: ${topdir}/xmalloc.h
casemod.o: ${topdir}/bashtypes.h
casemod.o: ${BASHINCDIR}/shmbutil.h
casemod.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h
+26 -3
View File
@@ -91,7 +91,8 @@ CSOURCES = clktck.c clock.c getcwd.c getenv.c oslib.c setlinebuf.c \
fmtulong.c fmtullong.c fmtumax.c shmatch.c strnlen.c \
strtoll.c strtoull.c strtoimax.c strtoumax.c memset.c strstr.c \
mktime.c strftime.c xstrchr.c zcatfd.c zmapfd.c winsize.c eaccess.c \
wcsdup.c fpurge.c zgetline.c mbscmp.c
wcsdup.c fpurge.c zgetline.c mbscmp.c uconvert.c ufuncs.c \
casemod.c
# The header files for this library.
HSOURCES =
@@ -104,7 +105,7 @@ OBJECTS = clktck.o clock.o getenv.o oslib.o setlinebuf.o strnlen.o \
pathphys.o tmpfile.o stringlist.o stringvec.o spell.o shquote.o \
strtrans.o strindex.o snprintf.o mailstat.o fmtulong.o \
fmtullong.o fmtumax.o xstrchr.o zcatfd.o zmapfd.o winsize.o wcsdup.o \
fpurge.o zgetline.o mbscmp.o ${LIBOBJS}
fpurge.o zgetline.o mbscmp.o uconvert.o ufuncs.o casemod.o ${LIBOBJS}
SUPPORT = Makefile
@@ -136,6 +137,7 @@ ${BUILD_DIR}/version.h: ${BUILD_DIR}/config.h ${BUILD_DIR}/Makefile Makefile
-( cd ${BUILD_DIR} && ${MAKE} ${MFLAGS} version.h )
# rules for losing makes, like SunOS
casemod.o: casemod.c
clktck.o: clktck.c
clock.o: clock.c
eaccess.o: eaccess.c
@@ -149,6 +151,7 @@ inet_aton.o: inet_aton.c
itos.o: itos.c
mailstat.o: mailstat.c
makepath.o: makepath.c
mbscmp.o: mbscmp.c
memset.o: memset.c
mktime.o: mktime.c
netconn.o: netconn.c
@@ -181,6 +184,8 @@ strtrans.o: strtrans.c
times.o: times.c
timeval.o: timeval.c
tmpfile.o: tmpfile.c
uconvert.o: uconvert.c
ufuncs.o: ufuncs.c
vprint.o: vprint.c
wcsdup.o: wcsdup.c
xstrchr.o: xstrchr.c
@@ -198,7 +203,7 @@ strtoul.o: strtol.c
strtoull.o: strtol.c
# all files in the library depend on config.h
clktck.o: ${BUILD_DIR}/config.h
casemod.o: ${BUILD_DIR}/config.h
clock.o: ${BUILD_DIR}/config.h
eaccess.o: ${BUILD_DIR}/config.h
fmtullong.o: ${BUILD_DIR}/config.h
@@ -211,6 +216,7 @@ inet_aton.o: ${BUILD_DIR}/config.h
itos.o: ${BUILD_DIR}/config.h
mailstat.o: ${BUILD_DIR}/config.h
makepath.o: ${BUILD_DIR}/config.h
mbscmp.o: ${BUILD_DIR}/config.h
memset.o: ${BUILD_DIR}/config.h
mktime.o: ${BUILD_DIR}/config.h
netconn.o: ${BUILD_DIR}/config.h
@@ -243,6 +249,8 @@ strtrans.o: ${BUILD_DIR}/config.h
times.o: ${BUILD_DIR}/config.h
timeval.o: ${BUILD_DIR}/config.h
tmpfile.o: ${BUILD_DIR}/config.h
uconvert.o: ${BUILD_DIR}/config.h
ufuncs.o: ${BUILD_DIR}/config.h
vprint.o: ${BUILD_DIR}/config.h
wcsdup.o: ${BUILD_DIR}/config.h
xstrchr.o: ${BUILD_DIR}/config.h
@@ -447,6 +455,10 @@ tmpfile.o: ${topdir}/bashtypes.h
tmpfile.o: ${BASHINCDIR}/posixstat.h
tmpfile.o: ${BASHINCDIR}/filecntl.h
uconvert.o: ${topdir}/bashtypes.h
ufuncs.o: ${topdir}/bashtypes.h
clock.o: ${BASHINCDIR}/posixtime.h
mailstat.o: ${topdir}/bashansi.h
@@ -489,3 +501,14 @@ zgetline.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h
zgetline.o: ${BASHINCDIR}/stdc.h
zgetline.o: ${topdir}/xmalloc.h
zgetline.o: ${topdir}/bashtypes.h
mbscmp.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h
mbscmp.o: ${BASHINCDIR}/stdc.h
mbscmp.o: ${topdir}/xmalloc.h
casemod.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h
casemod.o: ${BASHINCDIR}/stdc.h
casemod.o: ${topdir}/xmalloc.h
casemod.o: ${topdir}/bashtypes.h
casemod.o: ${BASHINCDIR}/shmbutil.h
casemod.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h
+205
View File
@@ -0,0 +1,205 @@
/* casemod.c -- functions to change case of strings */
/* Copyright (C) 2008 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
Bash is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.
Bash is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
The GNU General Public License is often shipped with GNU software, and
is generally kept in a file called COPYING or LICENSE. If you do not
have a copy of the license, write to the Free Software Foundation,
59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#if defined (HAVE_CONFIG_H)
# include <config.h>
#endif
#if defined (HAVE_UNISTD_H)
# include <unistd.h>
#endif /* HAVE_UNISTD_H */
#include <stdc.h>
#include <bashansi.h>
#include <bashintl.h>
#include <bashtypes.h>
#include <stdio.h>
#include <ctype.h>
#include <xmalloc.h>
#include <shmbutil.h>
#include <chartypes.h>
#include <glob/strmatch.h>
#define _to_wupper(wc) (iswlower (wc) ? towupper (wc) : (wc))
#define _to_wlower(wc) (iswupper (wc) ? towlower (wc) : (wc))
#if !defined (HANDLE_MULTIBYTE)
# define cval(s, i) ((s)[(i)])
# define iswalnum(c) (isalnum(c))
# define TOGGLE(x) (ISUPPER (x) ? tolower (x) : (TOUPPER (x)))
#else
# define TOGGLE(x) (iswupper (x) ? towlower (x) : (_to_wupper(x)))
#endif
/* These must agree with the defines in externs.h */
#define CASE_NOOP 0x0
#define CASE_LOWER 0x01
#define CASE_UPPER 0x02
#define CASE_CAPITALIZE 0x04
#define CASE_UNCAP 0x08
#define CASE_TOGGLE 0x10
#define CASE_TOGGLEALL 0x20
extern char *substring __P((char *, int, int));
#if defined (HANDLE_MULTIBYTE)
static wchar_t
cval (s, i)
char *s;
int i;
{
size_t tmp;
wchar_t wc;
int l;
mbstate_t mps;
if (MB_CUR_MAX == 1)
return ((wchar_t)s[i]);
l = strlen (s);
if (i >= (l - 1))
return ((wchar_t)s[i]);
memset (&mps, 0, sizeof (mbstate_t));
tmp = mbrtowc (&wc, s + i, l - i, &mps);
if (MB_INVALIDCH (tmp) || MB_NULLWCH (tmp))
return ((wchar_t)s[i]);
return wc;
}
#endif
/* Modify the case of characters in STRING matching PAT based on the value of
FLAGS. If PAT is null, modify the case of each character */
char *
sh_modcase (string, pat, flags)
const char *string;
char *pat;
int flags;
{
int start, next, end;
int inword, c, nc, nop, match;
char *ret, *s;
wchar_t wc;
#if defined (HANDLE_MULTIBYTE)
wchar_t nwc;
char mb[MB_LEN_MAX+1];
int mlen;
mbstate_t state;
#endif
#if defined (HANDLE_MULTIBYTE)
memset (&state, 0, sizeof (mbstate_t));
#endif
start = 0;
end = strlen (string);
ret = (char *)xmalloc (end + 1);
strcpy (ret, string);
inword = 0;
while (start < end)
{
wc = cval (ret, start);
if (iswalnum (wc) == 0)
{
inword = 0;
ADVANCE_CHAR (ret, end, start);
continue;
}
if (pat)
{
next = start;
ADVANCE_CHAR (ret, end, next);
s = substring (ret, start, next);
match = strmatch (pat, s, FNM_EXTMATCH) != FNM_NOMATCH;
free (s);
if (match == 0)
{
start = next;
inword = 1;
continue;
}
}
if (flags == CASE_CAPITALIZE)
{
nop = inword ? CASE_LOWER : CASE_UPPER;
inword = 1;
}
else if (flags == CASE_UNCAP)
{
nop = inword ? CASE_UPPER : CASE_LOWER;
inword = 1;
}
else if (flags == CASE_TOGGLE)
{
nop = inword ? CASE_NOOP : CASE_TOGGLE;
inword = 1;
}
else
nop = flags;
if (MB_CUR_MAX == 1 || isascii (wc))
{
switch (nop)
{
case CASE_NOOP: nc = wc; break;
case CASE_UPPER: nc = TOUPPER (wc); break;
case CASE_LOWER: nc = TOLOWER (wc); break;
case CASE_TOGGLEALL:
case CASE_TOGGLE: nc = TOGGLE (wc); break;
}
ret[start] = nc;
}
#if defined (HANDLE_MULTIBYTE)
else
{
mbrtowc (&wc, string + start, end - start, &state);
switch (nop)
{
case CASE_NOOP: nwc = wc; break;
case CASE_UPPER: nwc = TOUPPER (wc); break;
case CASE_LOWER: nwc = TOLOWER (wc); break;
case CASE_TOGGLEALL:
case CASE_TOGGLE: nwc = TOGGLE (wc); break;
}
if (nwc != wc) /* just skip unchanged characters */
{
mlen = wcrtomb (mb, nwc, &state);
if (mlen > 0)
mb[mlen] = '\0';
/* Assume the same width */
strncpy (ret + start, mb, mlen);
}
}
#endif
/* This assumes that the upper and lower case versions are the same width. */
ADVANCE_CHAR (ret, end, start);
}
return ret;
}
+13 -3
View File
@@ -42,17 +42,21 @@
# define MP_DOTILDE 0x01
# define MP_DOCWD 0x02
# define MP_RMDOT 0x04
# define MP_IGNDOT 0x08
#endif
extern char *get_working_directory __P((char *));
static char *nullpath = "";
/* Take PATH, an element from, e.g., $CDPATH, and DIR, a directory name,
and paste them together into PATH/DIR. Tilde expansion is performed on
PATH if (flags & MP_DOTILDE) is non-zero. If PATH is NULL or the empty
string, it is converted to the current directory. A full pathname is
used if (flags & MP_DOCWD) is non-zero, otherwise `./' is used. If
(flags & MP_RMDOT) is non-zero, any `./' is removed from the beginning
of DIR. */
of DIR. If (flags & MP_IGNDOT) is non-zero, a PATH that is "." or "./"
is ignored. */
#define MAKEDOT() \
do { \
@@ -89,6 +93,12 @@ sh_makepath (path, dir, flags)
else
MAKEDOT();
}
else if ((flags & MP_IGNDOT) && path[0] == '.' && (path[1] == '\0' ||
path[1] == '/' && path[2] == '\0'))
{
xpath = nullpath;
pathlen = 0;
}
else
{
xpath = ((flags & MP_DOTILDE) && *path == '~') ? bash_tilde_expand (path, 0) : (char *)path;
@@ -107,12 +117,12 @@ sh_makepath (path, dir, flags)
s = xpath;
while (*s)
*r++ = *s++;
if (s[-1] != '/')
if (s > xpath && s[-1] != '/')
*r++ = '/';
s = xdir;
while (*r++ = *s++)
;
if (xpath != path)
if (xpath != path && xpath != nullpath)
free (xpath);
return (ret);
}
+118
View File
@@ -0,0 +1,118 @@
/* makepath.c - glue PATH and DIR together into a full pathname. */
/* Copyright (C) 1987, 1989, 1991 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
Bash is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.
Bash is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License along
with Bash; see the file COPYING. If not, write to the Free Software
Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#include <config.h>
#if defined (HAVE_UNISTD_H)
# ifdef _MINIX
# include <sys/types.h>
# endif
# include <unistd.h>
#endif
#include <bashansi.h>
#include "shell.h"
#include <tilde/tilde.h>
#ifndef NULL
# define NULL 0
#endif
/* MAKE SURE THESE AGREE WITH ../../externs.h. */
#ifndef MP_DOTILDE
# define MP_DOTILDE 0x01
# define MP_DOCWD 0x02
# define MP_RMDOT 0x04
#endif
extern char *get_working_directory __P((char *));
/* Take PATH, an element from, e.g., $CDPATH, and DIR, a directory name,
and paste them together into PATH/DIR. Tilde expansion is performed on
PATH if (flags & MP_DOTILDE) is non-zero. If PATH is NULL or the empty
string, it is converted to the current directory. A full pathname is
used if (flags & MP_DOCWD) is non-zero, otherwise `./' is used. If
(flags & MP_RMDOT) is non-zero, any `./' is removed from the beginning
of DIR. */
#define MAKEDOT() \
do { \
xpath = (char *)xmalloc (2); \
xpath[0] = '.'; \
xpath[1] = '\0'; \
pathlen = 1; \
} while (0)
char *
sh_makepath (path, dir, flags)
const char *path, *dir;
int flags;
{
int dirlen, pathlen;
char *ret, *xpath, *xdir, *r, *s;
if (path == 0 || *path == '\0')
{
if (flags & MP_DOCWD)
{
xpath = get_working_directory ("sh_makepath");
if (xpath == 0)
{
ret = get_string_value ("PWD");
if (ret)
xpath = savestring (ret);
}
if (xpath == 0)
MAKEDOT();
else
pathlen = strlen (xpath);
}
else
MAKEDOT();
}
else
{
xpath = ((flags & MP_DOTILDE) && *path == '~') ? bash_tilde_expand (path, 0) : (char *)path;
pathlen = strlen (xpath);
}
xdir = (char *)dir;
dirlen = strlen (xdir);
if ((flags & MP_RMDOT) && dir[0] == '.' && dir[1] == '/')
{
xdir += 2;
dirlen -= 2;
}
r = ret = (char *)xmalloc (2 + dirlen + pathlen);
s = xpath;
while (*s)
*r++ = *s++;
if (s[-1] != '/')
*r++ = '/';
s = xdir;
while (*r++ = *s++)
;
if (xpath != path)
free (xpath);
return (ret);
}
+24
View File
@@ -186,3 +186,27 @@ spdist(cur, new)
return 3;
}
char *
dirspell (dirname)
char *dirname;
{
int n;
char *guess;
n = (strlen (dirname) * 3 + 1) / 2 + 1;
guess = (char *)malloc (n);
if (guess == 0)
return 0;
switch (spname (dirname, guess))
{
case -1:
default:
free (guess);
return (char *)NULL;
case 0:
case 1:
return guess;
}
}
+113
View File
@@ -0,0 +1,113 @@
/* Copyright (C) 2008 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
Bash is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.
Bash is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License along
with Bash; see the file COPYING. If not, write to the Free Software
Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#include "config.h"
#include "bashtypes.h"
#if defined (TIME_WITH_SYS_TIME)
# include <sys/time.h>
# include <time.h>
#else
# if defined (HAVE_SYS_TIME_H)
# include <sys/time.h>
# else
# include <time.h>
# endif
#endif
#if defined (HAVE_UNISTD_H)
#include <unistd.h>
#endif
#include <stdio.h>
#include "chartypes.h"
#include "shell.h"
#include "builtins.h"
#define DECIMAL '.' /* XXX - should use locale */
#define RETURN(x) \
do { \
if (ip) *ip = ipart * mult; \
if (up) *up = upart; \
return (x); \
} while (0)
/*
* An incredibly simplistic floating point converter.
*/
static int multiplier[7] = { 1, 100000, 10000, 1000, 100, 10, 1 };
/* Take a decimal number int-part[.[micro-part]] and convert it to the whole
and fractional portions. The fractional portion is returned in
millionths (micro); callers are responsible for multiplying appropriately.
Return 1 if value converted; 0 if invalid integer for either whole or
fractional parts. */
int
uconvert(s, ip, up)
char *s;
long *ip, *up;
{
int n, mult;
long ipart, upart;
char *p;
ipart = upart = 0;
mult = 1;
if (s && (*s == '-' || *s == '+'))
{
mult = (*s == '-') ? -1 : 1;
p = s + 1;
}
else
p = s;
for ( ; p && *p; p++)
{
if (*p == DECIMAL) /* decimal point */
break;
if (DIGIT(*p) == 0)
RETURN(0);
ipart = (ipart * 10) + (*p - '0');
}
if (*p == 0)
RETURN(1);
if (*p == DECIMAL)
p++;
/* Look for up to six digits past a decimal point. */
for (n = 0; n < 6 && p[n]; n++)
{
if (DIGIT(p[n]) == 0)
RETURN(0);
upart = (upart * 10) + (p[n] - '0');
}
/* Now convert to millionths */
upart *= multiplier[n];
if (n == 6 && p[6] >= '5' && p[6] <= '9')
upart++; /* round up 1 */
RETURN(1);
}
+102
View File
@@ -0,0 +1,102 @@
/* Copyright (C) 2008 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
Bash is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.
Bash is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License along
with Bash; see the file COPYING. If not, write to the Free Software
Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#include "config.h"
#include "bashtypes.h"
#if defined (TIME_WITH_SYS_TIME)
# include <sys/time.h>
# include <time.h>
#else
# if defined (HAVE_SYS_TIME_H)
# include <sys/time.h>
# else
# include <time.h>
# endif
#endif
#if defined (HAVE_UNISTD_H)
#include <unistd.h>
#endif
/* A version of `alarm' using setitimer if it's available. */
#if defined (HAVE_SETITIMER)
unsigned int
falarm(secs, usecs)
unsigned int secs, usecs;
{
struct itimerval it, oit;
it.it_interval.tv_sec = 0;
it.it_interval.tv_usec = 0;
it.it_value.tv_sec = secs;
it.it_value.tv_usec = usecs;
if (setitimer(ITIMER_REAL, &it, &oit) < 0)
return (-1);
/* Backwards compatibility with alarm(3) */
if (oit.it_value.tv_usec)
oit.it_value.tv_sec++;
return (oit.it_value.tv_sec);
}
#else
int
falarm (secs, usecs)
unsigned int secs, usecs;
{
if (secs == 0 && usecs == 0)
return (alarm (0));
if (secs == 0 || usecs >= 500000)
{
secs++;
usecs = 0;
}
return (alarm (secs));
}
#endif /* !HAVE_SETITIMER */
/* A version of sleep using fractional seconds and select. I'd like to use
`usleep', but it's already taken */
#if defined (HAVE_TIMEVAL) && defined (HAVE_SELECT)
int
fsleep(sec, usec)
unsigned int sec, usec;
{
struct timeval tv;
tv.tv_sec = sec;
tv.tv_usec = usec;
return select(0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &tv);
}
#else /* !HAVE_TIMEVAL || !HAVE_SELECT */
int
fsleep(sec, usec)
long sec, usec;
{
if (usec >= 500000) /* round */
sec++;
return (sleep(sec));
}
#endif /* !HAVE_TIMEVAL || !HAVE_SELECT */
+193 -45
View File
@@ -1,13 +1,13 @@
# Translation of the bash package to Slovak
# Copyright (C) 2006 Free Software Foundation, Inc.
# This file is distributed under the same license as the bash package.
# Ivan Masár <helix84@centrum.sk>, 2007.
# Ivan Masár <helix84@centrum.sk>, 2007, 2008.
#
msgid ""
msgstr ""
"Project-Id-Version: bash 3.2\n"
"POT-Creation-Date: 2006-10-23 17:20-0400\n"
"PO-Revision-Date: 2007-09-01 19:53+0100\n"
"PO-Revision-Date: 2008-02-24 15:18+0100\n"
"Last-Translator: Ivan Masár <helix84@centrum.sk>\n"
"Language-Team: Slovak <sk-i18n@lists.linux.sk>\n"
"MIME-Version: 1.0\n"
@@ -65,7 +65,7 @@ msgstr "„%s“: nedá sa zrušiť väzba (unbind)"
#: builtins/bind.def:283
#, c-format
msgid "`%s': unknown function name"
msgstr "„%s“: neznáme meno funkcie"
msgstr "„%s“: neznámy názov funkcie"
#: builtins/bind.def:291
#, c-format
@@ -235,7 +235,7 @@ msgstr "%s: nejednoznačné určenie úlohy"
#: builtins/complete.def:251
#, c-format
msgid "%s: invalid action name"
msgstr "%s: neplatné meno akcie"
msgstr "%s: neplatný názov akcie"
#: builtins/complete.def:381 builtins/complete.def:524
#, c-format
@@ -652,7 +652,7 @@ msgstr "nie je možné zároveň nastaviť aj zrušiť voľby shellu"
#: builtins/shopt.def:292
#, c-format
msgid "%s: invalid shell option name"
msgstr "%s: neplatné meno voľby shellu"
msgstr "%s: neplatný názov voľby shellu"
#: builtins/source.def:115
msgid "filename argument required"
@@ -1505,15 +1505,15 @@ msgstr ""
" Inak je alias definovaný pre každý NÁZOV, ktorého HODNOTA je zadaná.\n"
" Medzera na konci HODNOTY spôsobí, že sa v ďalšom slove\n"
" skontroluje substitúcia aliasu pri expanzii aliasu. Alias vracia\n"
" true ak nie je zadaný NÁZOVm pre ktorý nebol definovaný žiadny alias."
" true ak nie je zadaný NÁZOV, pre ktorý nebol definovaný žiadny alias."
#: builtins.c:257
msgid ""
"Remove NAMEs from the list of defined aliases. If the -a option is given,\n"
" then remove all alias definitions."
msgstr ""
"Odstrániť NÁZVY zo zoznamu definovaných aliasov. Ak je uvedená voľba -a,\n"
" odstrániť všetky definície aliasov."
"Odstráni NÁZVY zo zoznamu definovaných aliasov. Ak je uvedená voľba -a,\n"
" odstráni všetky definície aliasov."
#: builtins.c:266
msgid ""
@@ -1543,30 +1543,30 @@ msgid ""
" -s List key sequences that invoke macros and their values\n"
" in a form that can be reused as input."
msgstr ""
"Zviazať sekvenciu klávesov s funkciou alebo makrom Readline alebo\n"
" nastaviť premennú Readline. Syntax argumentu je rovnaká ako tá,\n"
"Naviaže sekvenciu klávesov na funkciu alebo makro Readline alebo\n"
" nastaviť premennú Readline. Syntax argumentu je rovnaká ako tá\n"
" v ~/.inputrc, ale musí sa podať ako jediný argument:\n"
" bind '\"\\C-x\\C-r\": re-read-init-file'.\n"
" bind akceptuje nasledovné voľby:\n"
" -m klávmap Použiť „klávmap“ ako mapu klávesov počas trvania\n"
" -m klávmap Použije „klávmap“ ako mapu klávesov počas trvania\n"
" tohto príkazu. Prijateľné názvy klávesových máp sú\n"
" emacs emacs-standard, emacs-meta, emacs-ctlx, vi,\n"
" vi-move, vi-command a vi-insert.\n"
" -l Vypísať názvy funkcií.\n"
" -P Vypísať názvy funkcií a väzby.\n"
" -p Vypísať názvy funkcií a väzby v tvare, ktorý je\n"
" -l Vypíše názvy funkcií.\n"
" -P Vypíše názvy funkcií a väzby.\n"
" -p Vypíše názvy funkcií a väzby v tvare, ktorý je\n"
" možné znova použiť ako vstup.\n"
" -r kláv_sek Odstrániť väzbu pre kláv_sek.\n"
" -r kláv_sek Odstráni väzbu pre kláv_sek.\n"
" -x kláv_sek:príkaz_shellu\tSpôsobí vykonanie PRÍKAZU_SHELLU po\n"
" \t\t\t\tzadaní KLÁV_SEK.\n"
" -f súboru Načítať klávesové väzby z SÚBORU.\n"
" -q názov-funkcie Zist, ktoré klávesy vyvolávajú túto funkciu.\n"
" -u názov-funkcie Zruš väzby všetkých kláves naviazaných na túto funkciu.\n"
" -V Vypísať názvy premenných a hodnoty\n"
" -v Vypísať názvy premenných a hodnoty v tvare, ktorý je\n"
" -f súboru Načíta klávesové väzby z SÚBORU.\n"
" -q názov-funkcie Zistí, ktoré klávesy vyvolávajú túto funkciu.\n"
" -u názov-funkcie Zruší väzby všetkých kláves naviazaných na túto funkciu.\n"
" -V Vypíše názvy premenných a hodnoty\n"
" -v Vypíše názvy premenných a hodnoty v tvare, ktorý je\n"
" možné znova použiť ako vstup.\n"
" -S Vypísať klávesové sekvencie, ktoré vyvolávajú makrá a ich hodnoty\n"
" -s Vypísať klávesové sekvencie, ktoré vyvolávajú makrá a ich hodnoty\n"
" -S Vypíše klávesové sekvencie, ktoré vyvolávajú makrá a ich hodnoty\n"
" -s Vypíše klávesové sekvencie, ktoré vyvolávajú makrá a ich hodnoty\n"
" v tvare, ktorý je možné znova použiť ako vstup."
#: builtins.c:297
@@ -1574,15 +1574,15 @@ msgid ""
"Exit from within a FOR, WHILE or UNTIL loop. If N is specified,\n"
" break N levels."
msgstr ""
"Vyskoč zvnútra cyklu FOR, WHILE alebo UNTIL. Ak je uvedené N,\n"
" vyskoč o N úrovní."
"Vyskočí zvnútra cyklu FOR, WHILE alebo UNTIL. Ak je uvedené N,\n"
" vyskočí o N úrovní."
#: builtins.c:304
msgid ""
"Resume the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n"
" If N is specified, resume at the N-th enclosing loop."
msgstr ""
"Pokračovať v nasledujúcej iterácii cyklu FOR, WHILE alebo UNTIL.\n"
"Pokračuje v nasledujúcej iterácii cyklu FOR, WHILE alebo UNTIL.\n"
"Ak je uvedené N, pokračovať v ďalšej iterácii slučky o N úrovní vyššej."
#: builtins.c:311
@@ -1591,7 +1591,7 @@ msgid ""
" shell builtin to be a function, but need the functionality of the\n"
" builtin within the function itself."
msgstr ""
"Spust vstavaný príkaz (builtin) shellu. Toto je užitočné, keď\n"
"Spustí vstavaný príkaz (builtin) shellu. Toto je užitočné, keď\n"
" chcete premenovať vstavaný príkaz shellu na funkciu, ale\n"
" potrebujete funkcionalitu samotného vstavaného príkazu\n"
" vnútri funkcie."
@@ -1629,12 +1629,12 @@ msgid ""
" instead of following symbolic links; the -L option forces symbolic links\n"
" to be followed."
msgstr ""
"Zmen aktuálny adresár na ADR. Premenná $HOME je štandardný\n"
"Zmení aktuálny adresár na ADR. Premenná $HOME je štandardný\n"
" ADR. Premenná CDPATH definuje cesty, v ktorých sa hľadá adresár\n"
" obsahujúci ADR. Alternatívne názvy adresárov vCDPATH sú\n"
" oddelené dvojbodkou (:). Prázdny (null) názov adresára zodpovedá\n"
" aktuálnemu adresáru, t.j. „.“. Ak ADR začína lomkou (/), CDPATH\n"
" sa nepoužije. Ak adreár nebol nájdený a je nastavená voľba shellu\n"
" sa nepoužije. Ak adresár nebol nájdený a je nastavená voľba shellu\n"
" „cdable_vars“ skúste toto slovo ako názov premennej. Ak táto\n"
" premenná má hodnotu, vykoná cd na hodnotu premennej.\n"
" Voľba -P vraví, že sa má použiť fyzická štruktúra adresárov a nie\n"
@@ -1647,7 +1647,7 @@ msgid ""
" the physical directory, without any symbolic links; the -L option\n"
" makes pwd follow symbolic links."
msgstr ""
"Vypísať aktuálny pracovný adresár. S voľbou -P pwd vypíše\n"
"Vypíše aktuálny pracovný adresár. S voľbou -P pwd vypíše\n"
" fyzický adresár bez symbolických odkazov; s voľbou -L\n"
" bude pwd nasledovať symbolické odkazy."
@@ -1657,11 +1657,11 @@ msgstr "Bez účinku; príkaz nič nerobí. Vráti návratový kód nula."
#: builtins.c:364
msgid "Return a successful result."
msgstr "Vrátiť úspešný výsledok."
msgstr "Vráti úspešný výsledok."
#: builtins.c:370
msgid "Return an unsuccessful result."
msgstr "Vrátiť neúspešný výsledok."
msgstr "Vráti neúspešný výsledok."
#: builtins.c:376
msgid ""
@@ -1672,10 +1672,10 @@ msgid ""
" the -V or -v option is given, a string is printed describing COMMAND.\n"
" The -V option produces a more verbose description."
msgstr ""
"Spust PRÍKAZ s ARG ignorujúc funkcie shellu. Ak máte funkciu shellu\n"
"Spustí PRÍKAZ s ARG ignorujúc funkcie shellu. Ak máte funkciu shellu\n"
" zvanú „ls“ a chcete zavolať príkaz „ls“, môžete napísať\n"
" „command ls“. Ak je zadaná voľba -p, použije sa štandardná hodnota\n"
" PATH, ktorá zaručene nájde všetky štandardné utility. Ak je zadaná\n"
" PATH, ktorá zaručene nájde všetky štandardné nástroje. Ak je zadaná\n"
" voľba -V alebo -v, vypíše sa popis PRÍKAZU.\n"
" Voľba -V poskytuje podrobnejší výstup."
@@ -1706,7 +1706,7 @@ msgid ""
" Using `+' instead of `-' turns off the given attribute instead. When\n"
" used in a function, makes NAMEs local, as with the `local' command."
msgstr ""
"Deklarovať premenné a/alebo dať im argumenty. Ak nie sú zadané\n"
"Deklaruje premenné a/alebo im dodá argumenty. Ak nie sú zadané\n"
" NÁZVY, zobraziť hodnoty premenných. Voľba -p zobrazí atribúty\n"
" a hotnoty každého NÁZVU.\n"
" \n"
@@ -1732,7 +1732,7 @@ msgstr ""
#: builtins.c:416
msgid "Obsolete. See `declare'."
msgstr "Zastarelé. Pozri „declare“."
msgstr "Zastaralé. Pozri „declare“."
#: builtins.c:422
msgid ""
@@ -1740,9 +1740,9 @@ msgid ""
" can only be used within a function; it makes the variable NAME\n"
" have a visible scope restricted to that function and its children."
msgstr ""
"Vytvor lokálnu premennú s NÁZVOM a prideliť jej HODNOTU. LOCAL\n"
"Vytvorí lokálnu premennú s NÁZVOM a priradí jej HODNOTU. LOCAL\n"
" je možné použiť iba v rámci funkcie; spôsobí obmedzenie viditeľnosti\n"
" premennej NÁZOV iba na túto funkciu a jej deti."
" premennej NÁZOV iba na túto funkciu a jej potomkov."
#: builtins.c:431
msgid ""
@@ -1765,7 +1765,7 @@ msgid ""
" You can explicitly turn off the interpretation of the above characters\n"
" with the -E option."
msgstr ""
"Vypísať ARGumenty. S voľbou -n bude posledný znak nového\n"
"Vypíše ARGumenty. S voľbou -n bude posledný znak nového\n"
" riadka potlačený. S voľbou -e sa zapne interpretácia\n"
" nasledovných znakov začínajúcich spätnou lomkou:\n"
" \t\\a\tvýstraha (zvonček)\n"
@@ -1786,7 +1786,7 @@ msgstr ""
#: builtins.c:456
msgid "Output the ARGs. If -n is specified, the trailing newline is suppressed."
msgstr "Vypísať ARGumenty. S voľbou -n bude posledný znak nového riadka potlačený."
msgstr "Vypíše ARGumenty. S voľbou -n bude posledný znak nového riadka potlačený."
#: builtins.c:463
msgid ""
@@ -1804,15 +1804,15 @@ msgid ""
" or not it is enabled. The -s option restricts the output to the POSIX.2\n"
" `special' builtins. The -n option displays a list of all disabled builtins."
msgstr ""
"Zapnúť a vypnúť vstavené (builtin) príkazy shellu. Toto vám umožní\n"
" použiť prákaz s rovnakým názvom ako má vstavaný príkaz shellu\n"
"Zapína a vypína vstavené (builtin) príkazy shellu. Toto vám umožní\n"
" použiť príkaz s rovnakým názvom ako má vstavaný príkaz shellu\n"
" bez toho, aby ste uvádzali plnú cestu. S voľbou -n budú NÁZVY\n"
" vypnuté; inak budú NÁZVY zapnuté. Napríklad ak chcete použiť\n"
" „test“, ktorý sa nachádza v $PATH namiesto vstavaného príkazu,\n"
" napíšte „enable -n test“. Na systémoch, ktoré podporujú dynamické\n"
" nahrávanie je možné použiť voľbu -f na načítanie nových vstavaných\n"
" príkazov zo zdieľaného objektu NˇAZOVSÚBORU. Voľba -d zmaže\n"
" vstavaný príkaz, ktorý bol predtým načítaný pomocou -f. Nie sú\n"
" príkazov zo zdieľaného objektu NÁZOVSÚBORU. Voľba -d zmaže\n"
" vstavaný príkaz, ktorý bol predtým načítaný pomocou -f. Ak nie sú\n"
" zadané žiadne názvy okrem volieb alebo je zadaná voľba -p , vypíše\n"
" sa zoznam vstavaných príkazov. Voľba -a znamená, že sa má vypísať\n"
" každý vstavaný príkaz a či je zapnutý alebo vypnutý. Voľba -s obmedzí\n"
@@ -1821,7 +1821,7 @@ msgstr ""
#: builtins.c:481
msgid "Read ARGs as input to the shell and execute the resulting command(s)."
msgstr "Prečítať ARGumenty ako vstup do shellu a vykon výsledné príkazy."
msgstr "Prečíta ARGumenty ako vstup do shellu a vykoná výsledné príkazy."
#: builtins.c:487
msgid ""
@@ -2103,7 +2103,7 @@ msgid ""
" process IDs, and, if you have reached the limit on processes that\n"
" you can create, you don't have to start a process to kill another one."
msgstr ""
"Poslať procesom s uvedeným PID (alebo JOBSPEC) signál SIGSPEC. Ak\n"
"Pošle procesom s uvedeným PID (alebo JOBSPEC) signál SIGSPEC. Ak\n"
" nie je SIGSPEC uvedená, predpokladá sa SIGTERM. Argument „-l“\n"
" vypíše názvy signálov; ak sú argumenty uvedené po „-l“, predpokladá\n"
" sa, že sú to čísla signálov ktorých názvy sa majú zobraziť. Kill je\n"
@@ -2626,12 +2626,17 @@ msgid ""
" Arguments on the command line along with NAME are passed to the\n"
" function as $0 .. $n."
msgstr ""
"Vytvoriť jednoduchý príkaz, ktorý sa vyvolá pomocou NÁZVU a spustí\n"
" PRÍKAZY. Argumenty príkazového riadka sa spolu s NÁZVOM dodajú\n"
" funkcii v premenných $0 až $n."
#: builtins.c:1198
msgid ""
"Run a set of commands in a group. This is one way to redirect an\n"
" entire set of commands."
msgstr ""
"Spustiť množinu príkazov v skupine. Toto je jeden zo spôsobov ako\n"
" presmerovať celú možinu príkazov."
#: builtins.c:1205
msgid ""
@@ -2641,12 +2646,19 @@ msgid ""
" the background, as if the job specification had been supplied as an\n"
" argument to `bg'."
msgstr ""
"Ekvivalentné argumentu JOB_SPEC príkazu „fg“ Obnoví beh\n"
" zastavenej úlohy alebo úlohyu bežiacej v pozadí. JOB_SPEC môže\n"
" určiť buď názov alebo číslo úlohy. Ak po JOB_SPEC nasleduje „&“, úloha\n"
" sa umiestni do pozadia, ako keby bola špecifikácia úlohy zadaná ako\n"
" argument príkazu „bg“."
#: builtins.c:1215
msgid ""
"The EXPRESSION is evaluated according to the rules for arithmetic\n"
" evaluation. Equivalent to \"let EXPRESSION\"."
msgstr ""
"VÝRAZ sa vyhodnotí podľa pravidiel aritmetického vyhodnocovania.\n"
" Ekvivalentné s „let VÝRAZ“."
#: builtins.c:1222
msgid ""
@@ -2664,6 +2676,19 @@ msgid ""
" && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n"
" determine the expression's value."
msgstr ""
"Vráti 0 alebo 1 v závislosti na vyhodnotení výrazu podmienky VÝRAZ.\n"
" Výrazy sa skladajú z rovnakých zložiek ako pri vstavanom príkaze\n"
" „test“ a je možné ich kombinovať pomocou nasledovných operátorov\n"
" \n"
" \t( VÝRAZ )\tVracia hodnoru výrazu VÝRAZ\n"
" \t! VÝRAZ\tPravdivý, ak je VÝRAZ nepravdivý; inak pravdivý\n"
" \tVÝR1 && VÝR2\tPravdivý ak je VÝR1 a zároveň VÝR2 pravdivý; inak nepravdivý\n"
" \tVÝR1 || VÝR2\tPravdivý ak je VÝR1 alebo VÝR2 pravdivý; inak nepravdivý\n"
" \n"
" Ak sú použité operátory „==“ a „!=“, reťazec napravo od operátora\n"
" sa použije ako vzor a vykoná sa hľadanie zhody reťazcov. Operátory\n"
" && a || nevyhodnocujú VÝR2 ak hodnota VÝR1 postačuje na určenie\n"
" hodnoty výrazu."
#: builtins.c:1240
msgid ""
@@ -2716,6 +2741,54 @@ msgid ""
" HISTIGNORE\tA colon-separated list of patterns used to decide which\n"
" \t\tcommands should be saved on the history list.\n"
msgstr ""
"BASH_VERSION\tInformácie o verzii tohto Bash.\n"
" CDPATH\tBodkočiarkami oddelený zoznam adresárov, v ktorých sa budú\n"
" \t\thľadať adresáre dané ako argument príkazu „cd“.\n"
" GLOBIGNORE\tBodkočiarkami oddelený zoznam vzorov popisujúcich názvy\n"
" \t\tsúborov, ktoré má expanzia názvov ciest ignorovať.\n"
" HISTFILE\tNázov súboru, kde je uložená vaša história príkazov.\n"
" HISTFILESIZE\tMaximálny počet riadkov, ktorý môže obsahovať.\n"
" HISTSIZE\tMaximálny počet riadkov, su ktorým môže pristupovať\n"
" \t\tbežiaci shell.\n"
" HOME\tÚplná cesta k vášmu prihlasovaciemu adresáru.\n"
" HOSTNAME\tNázov stroja, na ktorom sa momentálne nachádzate.\n"
" HOSTTYPE\tTyp procesora, na ktorom beží táto verzia Bash.\n"
" IGNOREEOF\tRiadi činnosť shellu po prijatí znaku EOF ako\n"
" \t\tjediného na vstupe. Ak je voľba nastavená, jej hodnota je\n"
" \t\tpočet znakov EOF, ktoré budú za sebou prijaté na prázdnom\n"
" \t\triadku predtým, než sa shell ukončí (štadnardne 10). Ak voľba\n"
" \t\tNie je nastavená, EOF značí koniec vstupu.\n"
" MACHTYPE\tReťazec popisujúci systém, na ktorom Bash práve beží.\n"
" MAILCHECK\tAko často v sekundách Bash kontroluje novú poštu.\n"
" MAILPATH\tBodkočiarkami oddelený zoznam názvov súborov,\n"
" \t\tv ktorých Bash kontroluje novú poštu.\n"
" OSTYPE\tVerzia Unixu na ktorej tento Bash beží.\n"
" PATH\tBodkočiarkami oddelený zoznam adresárov, v ktorých sa\n"
" \t\tmajú hľadať príkazy.\n"
" PROMPT_COMMAND\tPríkaz, ktorý sa má vykonať pred každým\n"
" \t\tvypísaním primárnej výzvy.\n"
" PS1\t\tReťazec primárnej výzvy.\n"
" PS2\t\tReťazec sekundárnej výzvy.\n"
" PWD\t\tPlná cesta k aktuálnemu adresáru.\n"
" SHELLOPTS\tBodkočiarkami oddelený zoznam zapnutých volieb shellu.\n"
" TERM\tNázov aktuálneho typu terminálu.\n"
" TIMEFORMAT\tFormát výstupu štatistiky doby behu, ktorú zobrazuje\n"
" \t\trezervované slovo „time“.\n"
" auto_resume\tNenulová hodnota značí príkaz, ktorý keď sa vyskytuje na samostatnom\n"
" \t\triadku, vyhľadá sa v zozname momentálne zastavených\n"
" \t\túloh. Ak sa je tam nachádza, úloha sa prenesie do popredia.\n"
" \t\tHodnota „exact“ znamená, že slovo príkazu sa musí presne\n"
" \t\tzhodovať s príkazom v zozname zastavených úloh. Hodnota\n"
" \t\t„substring“ znamená, že slovo príkazu sa musí zhodovať s\n"
" \t\tpodreťazcom úlohy. Akákoľvek iná hodnota znamená, že\n"
" \t\tpríkaz musí byť predponou zastavenej úlohy.\n"
" histchars\tZnaky riadiace dopĺňanie histórie a rýchle\n"
" \t\tnahrádzanie. prvý znak je znak nahrádzania z\n"
" \t\thistórie, zvyčajne „!“. Druhý je znak „rýchleho\n"
" \t\tnahrádzania“, zvyčajne „^“. Tretí je znak\n"
" \t\t„komentára histórie“, zvyčajne „#“.\n"
" HISTIGNORE\tBodkočiarkami oddelený zoznam vzoriek, ktoré\n"
" \t\tsa používajú na rozhodovanie, či sa príkaz uloží do histórie.\n"
#: builtins.c:1295
msgid ""
@@ -2739,6 +2812,23 @@ msgid ""
" \n"
" You can see the directory stack with the `dirs' command."
msgstr ""
"Pridá adresár na vrchol zásobníka adresárov alebo ho otočí tak, že\n"
" nový vrchol zásobníka sa stane aktuálnym pracovným adresárom.\n"
" Bez argumentov vymení vrchné dva adresáre.\n"
" \n"
" +N\tOtočí zásobník tak, že N-tý adresár (počítajúc zľava zoznamu,\n"
" \tktorý zobrazuje „dirs“, počínajúc nulou) je na vrchu.\n"
" \n"
" -N\tOtočí zásobník tak, že N-tý adresár (počítajúc sprava zoznamu,\n"
" \tktorý zobrazuje „dirs“, počínajúc nulou) je na vrchu.\n"
" \n"
" -n\tpotlačí normálnu zmenu adresára pri odstraňovaní položiek\n"
" \tzo zásobníka, takže sa zmení iba zásobník.\n"
" \n"
" adr\tpridá ADR na vrchol zásobníka adresárov, čím sa tento stane\n"
" \tnovým aktuálnym pracovným adresárom.\n"
" \n"
" Zásobník adresárov môžete zobraziť príkazom „dirs“."
#: builtins.c:1321
msgid ""
@@ -2759,6 +2849,22 @@ msgid ""
" \n"
" You can see the directory stack with the `dirs' command."
msgstr ""
"Odstráni položky zo zásobníka adresárov. Bez argumentov odstráni\n"
" vrchnú položku zo zásobníka a zmení adresár na adresár, ktorý\n"
" sa následne nachádza na vrchu zásobníka.\n"
" \n"
" +N\todstráni N-tú položku položku počítajúc zľava zoznamu,\n"
" \tktorý zobrazuje „dirs“, počínajúc nulou. Napríklad: „popd +0“\n"
" \todstráni prvý adresár, „popd +1“ druhý.\n"
" \n"
" -N\todstráni N-tú položku položku počítajúc sprava zoznamu,\n"
" \tktorý zobrazuje „dirs“, počínajúc nulou. Napríklad: „popd -0“\n"
" \todstráni posledný adresár, „popd -1“ predposledný.\n"
" \n"
" -n\tpotlačí normálnu zmenu adresára pri odstraňovaní položiek\n"
" \tzo zásobníka, takže sa zmení iba zásobník.\n"
" \n"
" Zásobník adresárov môžete zobraziť príkazom „dirs“."
#: builtins.c:1344
msgid ""
@@ -2780,6 +2886,23 @@ msgid ""
" -N\tdisplays the Nth entry counting from the right of the list shown by\n"
" \tdirs when invoked without options, starting with zero."
msgstr ""
"Zobrazí zoznam momentálne zapamätaných adresárov. Adresáre\n"
" sa do zoznamu dostávajú príkazom „pushd“; zo zoznamu ich môžete\n"
" vyberať postupne príkazom „popd“.\n"
" \n"
" Voľba -l určuje, že „dirs“ nemá vypisovať skrátené verzie adresárov\n"
" relatívne vzhľadom na váš domovský adresár. To znamená, že\n"
" „~/bin“ sa môže zobraziť ako „/homes/bfox/bin“. Voľba -v spôsobí,\n"
" že „dirs“ vypíše zásobník adresárov vo formáte jedna položka na,\n"
" riadok a pred adresár vypíše jej pozíciu v zásobníku. Voľba -p robí\n"
" to sité, ale nepripája pozíciu v zásobníku.\n"
" Voľba -c vyprázdni zásobník adresárov zmazaním všetkých položiek.\n"
" \n"
" +N\tzobrazuje N-tú položku počítajúc zľava zoznamu, ktorý zobrazuje\n"
" \tdirs vyvolaný bez volieb, počínajúc nulou.\n"
" \n"
" -N\tzobrazuje N-tú položku počítajúc sprava zoznamu, ktorý zobrazuje\n"
" \tdirs vyvolaný bez volieb, počínajúc nulou."
#: builtins.c:1367
msgid ""
@@ -2792,6 +2915,14 @@ msgid ""
" settable options is displayed, with an indication of whether or\n"
" not each is set."
msgstr ""
"Obráti hodnoty premenných riadiacich voliteľné správanie.\n"
" Voľba -s znamená zapnúť (nastaviť) naždého NÁZVU_VOĽBY;\n"
" voľba -u ruší nastavenie každého NÁZVU_VOĽBY. Voľba -q\n"
" potlačí výpis; stav ukončenia indikuje, či je každý NÁZOV_VOĽBY\n"
" nastavený alebo nenastavený. Voľba -o obmedzuje NÁZOV_VOĽBY\n"
" na tie, ktoré sú definované pre použitie so „set -o“. Bez volieb\n"
" alebo s voľbou -p sa vypíše zoznam nastaviteľných volieb\n"
" s označením, či je každá nastavená alebo nenastavená."
#: builtins.c:1380
msgid ""
@@ -2806,6 +2937,16 @@ msgid ""
" If the -v option is supplied, the output is placed into the value of the\n"
" shell variable VAR rather than being sent to the standard output."
msgstr ""
"printf formátuje a vypisuje ARGUMENTY podľa FORMÁTu. FORMÁT\n"
" je reťazec znakov, ktorý obsahuje tri typy objektov: čisté znaky, ktoré\n"
" sa jednoducho skopírujú na štandardný výstup, únikové klauzuly, ktoré\n"
" sa nahradia zodpovedajúcim výstupom a skopírujú na štandardný výstup\n"
" a špecifikácie formátu, z ktorých každá spôsobí vypísanie nasledovného\n"
" argumentu. Okrem štandardných formátov printf(1), %b znamená\n"
" rozšíriť únikové klauzuly backspace v zodpovedajúcom argumente a %q\n"
" znamená dať argument do zátvoriek tak, aby ho bolo možné použiť ako\n"
" vstup shellu. Ak je daná voľba -v, výstup sa umiestni do hodnoty\n"
" premennej shellu VAR namiesto vypísania na štandardný výstup."
#: builtins.c:1396
msgid ""
@@ -2815,6 +2956,10 @@ msgid ""
" reused as input. The -r option removes a completion specification for\n"
" each NAME, or, if no NAMEs are supplied, all completion specifications."
msgstr ""
"Pre každý NÁZOV určí, koľko argumentov sa má doplniť.\n"
" Ak je daná voľba -p alebo žiadne voľby, vypíšu sa existujúce špecifikácie doplnení v takom formáte, že je ich možné použiť na\n"
" vstupe. Voľba -r odstráni špecifikáciu doplnenia pre každý NÁZOV,\n"
" alebo, ak nebol uvedený žiadny NÁZOV, pre všetky špecifikácie."
#: builtins.c:1408
msgid ""
@@ -2823,3 +2968,6 @@ msgid ""
" If the optional WORD argument is supplied, matches against WORD are\n"
" generated."
msgstr ""
"Zobrazí možné dokončenie v závislosti na voľbách. Slúži na použitie\n"
" z shell funkcií tvoriacich možné dokončenia Ak je daný voliteľný parameter\n"
" SLOVO, tvoria sa zhody so SLOVOm."
+1 -1
View File
@@ -1,4 +1,4 @@
BUILD_DIR=/usr/local/build/chet/bash/bash-current
BUILD_DIR=/usr/local/build/bash/bash-current
THIS_SH=$BUILD_DIR/bash
PATH=$PATH:$BUILD_DIR
+3
View File
@@ -8,6 +8,7 @@ shopt -u checkhash
shopt -u checkjobs
shopt -u checkwinsize
shopt -s cmdhist
shopt -u compat31
shopt -u dotglob
shopt -u execfail
shopt -s expand_aliases
@@ -57,6 +58,7 @@ shopt -u cdable_vars
shopt -u checkhash
shopt -u checkjobs
shopt -u checkwinsize
shopt -u compat31
shopt -u dotglob
shopt -u execfail
shopt -u extdebug
@@ -83,6 +85,7 @@ cdable_vars off
checkhash off
checkjobs off
checkwinsize off
compat31 off
dotglob off
execfail off
extdebug off