commit bash-20120706 snapshot

This commit is contained in:
Chet Ramey
2012-08-13 11:54:32 -04:00
parent 87c1f4ece2
commit 9f178efb2e
44 changed files with 34972 additions and 16191 deletions
+26
View File
@@ -13956,6 +13956,14 @@ braces.c
- mkseq: try and be smarter about not overallocating elements in
the return array if the increment is not 1 or -1
6/7
---
parse.y
- history_delimiting_chars: if the parser says we're in the middle of
a compound assignment (PST_COMPASSIGN), just return a space to avoid
adding a stray semicolon to the history entry. Fixes bug reported
by "Davide Brini" <dave_br@gmx.com>
6/8
---
bashline.c
@@ -14163,3 +14171,21 @@ builtins/declare.def
Enforce restriction that nameref variables cannot be arrays.
Implement semi-peculiar ksh93 semantics for typeset +n ref=value
7/5
---
variables.c
- unbind_variable: unset whatever a nameref resolves to, leaving the
nameref variable itself alone
- unbind_nameref: new function, unsets a nameref variable, not the
variable it references
variables.h
- unbind_nameref: extern declaration
builtins/set.def
- unset_builtin: modify to add -n option, which calls unbind_nameref
leaving unbind_variable for the usual case. This required slight
changes and additions to the test suite
doc/{bash.1,bashref.texi}
- document namerefs and typeset/declare/local/unset -n
+14183
View File
File diff suppressed because it is too large Load Diff
+82
View File
@@ -0,0 +1,82 @@
Starting bash with the `--posix' command-line option or executing
`set -o posix' while bash is running will cause bash to conform more
closely to the Posix.2 standard by changing the behavior to match that
specified by Posix.2 in areas where the bash default differs.
The following list is what's changed when `posix mode' is in effect:
1. When a command in the hash table no longer exists, bash will re-search
$PATH to find the new location. This is also available with
`shopt -s checkhash'.
2. The >& redirection does not redirect stdout and stderr.
3. The message printed by the job control code and builtins when a job
exits with a non-zero status is `Done(status)'.
4. Reserved words may not be aliased.
5. The Posix.2 PS1 and PS2 expansions of `!' -> history number and
`!!' -> `!' are enabled, and parameter expansion is performed on
the value regardless of the setting of the `promptvars' option.
6. Interactive comments are enabled by default. (Note that bash has
them on by default anyway.)
7. The Posix.2 startup files are executed ($ENV) rather than the normal
bash files.
8. Tilde expansion is only performed on assignments preceding a command
name, rather than on all assignment statements on the line.
9. The default history file is ~/.sh_history (default value of $HISTFILE).
10. The output of `kill -l' prints all the signal names on a single line,
separated by spaces.
11. Non-interactive shells exit if `file' in `. file' is not found.
12. Redirection operators do not perform pathname expansion on the word
in the redirection unless the shell is interactive
13. Function names must be valid shell identifiers. That is, they may not
contain characters other than letters, digits, and underscores, and
may not start with a digit. Declaring a function with an illegal name
causes a fatal syntax error in non-interactive shells.
14. Posix.2 `special' builtins are found before shell functions during command
lookup.
15. If a Posix.2 special builtin returns an error status, a non-interactive
shell exits. The fatal errors are those listed in the POSIX.2 standard,
and include things like passing incorrect options, redirection errors,
variable assignment errors for assignments preceding the command name,
and so on.
16. The environment passed to executed commands is not sorted. Neither is
the output of `set'. This is not strictly Posix.2 behavior, but sh
does it this way. Ksh does not. It's not necessary to sort the
environment; no program should rely on it being sorted.
17. If the `cd' builtin finds a directory to change to using $CDPATH, the
value it assigns to $PWD does not contain any symbolic links, as if
`cd -P' had been executed.
18. A non-interactive shell exits with an error status if a variable
assignment error occurs when no command name follows the assignment
statements. A variable assignment error occurs, for example, when
trying to assign a value to a read-only variable.
19. A non-interactive shell exits with an error status if the iteration
variable in a for statement or the selection variable in a select
statement is a read-only variable.
20. Process substitution is not available.
21. Assignment statements preceding POSIX.2 `special' builtins persist in
the shell environment after the builtin completes.
There is other Posix.2 behavior that bash does not implement. Specifically:
1. Assignment statements affect the execution environment of all builtins,
not just special ones.
+544
View File
@@ -0,0 +1,544 @@
This file is set.def, from which is created set.c.
It implements the "set" and "unset" builtins in Bash.
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 1, 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, 675 Mass Ave, Cambridge, MA 02139, USA.
$PRODUCES set.c
#include <stdio.h>
#include "../shell.h"
#include "../flags.h"
#include "bashgetopt.h"
extern int interactive;
extern int noclobber, posixly_correct;
#if defined (READLINE)
extern int rl_editing_mode, no_line_editing;
#endif /* READLINE */
$BUILTIN set
$FUNCTION set_builtin
$SHORT_DOC set [--abefhkmnptuvxldBCHP] [-o option] [arg ...]
-a Mark variables which are modified or created for export.
-b Notify of job termination immediately.
-e Exit immediately if a command exits with a non-zero status.
-f Disable file name generation (globbing).
-h Locate and remember function commands as functions are
defined. Function commands are normally looked up when
the function is executed.
-i Force the shell to be an "interactive" one. Interactive shells
always read `~/.bashrc' on startup.
-k All keyword arguments are placed in the environment for a
command, not just those that precede the command name.
-m Job control is enabled.
-n Read commands but do not execute them.
-o option-name
Set the variable corresponding to option-name:
allexport same as -a
braceexpand same as -B
#if defined (READLINE)
emacs use an emacs-style line editing interface
#endif /* READLINE */
errexit same as -e
histexpand same as -H
ignoreeof the shell will not exit upon reading EOF
interactive-comments
allow comments to appear in interactive commands
monitor same as -m
noclobber disallow redirection to existing files
noexec same as -n
noglob same as -f
nohash same as -d
notify save as -b
nounset same as -u
physical same as -P
posix change the behavior of bash where the default
operation differs from the 1003.2 standard to
match the standard
privileged same as -p
verbose same as -v
#if defined (READLINE)
vi use a vi-style line editing interface
#endif /* READLINE */
xtrace same as -x
-p Turned on whenever the real and effective user ids do not match.
Disables processing of the $ENV file and importing of shell
functions. Turning this option off causes the effective uid and
gid to be set to the real uid and gid.
-t Exit after reading and executing one command.
-u Treat unset variables as an error when substituting.
-v Print shell input lines as they are read.
-x Print commands and their arguments as they are executed.
-l Save and restore the binding of the NAME in a FOR command.
-d Disable the hashing of commands that are looked up for execution.
Normally, commands are remembered in a hash table, and once
found, do not have to be looked up again.
#if defined (BRACE_EXPANSION)
-B the shell will perform brace expansion
#endif /* BRACE_EXPANSION */
#if defined (BANG_HISTORY)
-H Enable ! style history substitution. This flag is on
by default.
#endif /* BANG_HISTORY */
-C If set, disallow existing regular files to be overwritten
by redirection of output.
-P If set, do not follow symbolic links when executing commands
such as cd which change the current directory.
Using + rather than - causes these flags to be turned off. The
flags can also be used upon invocation of the shell. The current
set of flags may be found in $-. The remaining n ARGs are positional
parameters and are assigned, in order, to $1, $2, .. $n. If no
ARGs are given, all shell variables are printed.
$END
/* An a-list used to match long options for set -o to the corresponding
option letter. */
struct {
char *name;
int letter;
} o_options[] = {
{ "allexport", 'a' },
#if defined (BRACE_EXPANSION)
{ "braceexpand",'B' },
#endif
{ "errexit", 'e' },
{ "histexpand", 'H' },
{ "monitor", 'm' },
{ "noexec", 'n' },
{ "noglob", 'f' },
{ "nohash", 'd' },
#if defined (JOB_CONTROL)
{ "notify", 'b' },
#endif /* JOB_CONTROL */
{"nounset", 'u' },
{"physical", 'P' },
{"privileged", 'p' },
{"verbose", 'v' },
{"xtrace", 'x' },
{(char *)NULL, 0},
};
#define MINUS_O_FORMAT "%-15s\t%s\n"
void
list_minus_o_opts ()
{
register int i;
char *on = "on", *off = "off";
printf (MINUS_O_FORMAT, "noclobber", (noclobber == 1) ? on : off);
if (find_variable ("ignoreeof") || find_variable ("IGNOREEOF"))
printf (MINUS_O_FORMAT, "ignoreeof", on);
else
printf (MINUS_O_FORMAT, "ignoreeof", off);
printf (MINUS_O_FORMAT, "interactive-comments",
interactive_comments ? on : off);
printf (MINUS_O_FORMAT, "posix", posixly_correct ? on : off);
#if defined (READLINE)
if (no_line_editing)
{
printf (MINUS_O_FORMAT, "emacs", off);
printf (MINUS_O_FORMAT, "vi", off);
}
else
{
/* Magic. This code `knows' how readline handles rl_editing_mode. */
printf (MINUS_O_FORMAT, "emacs", (rl_editing_mode == 1) ? on : off);
printf (MINUS_O_FORMAT, "vi", (rl_editing_mode == 0) ? on : off);
}
#endif /* READLINE */
for (i = 0; o_options[i].name; i++)
{
int *on_or_off, zero = 0;
on_or_off = find_flag (o_options[i].letter);
if (on_or_off == FLAG_UNKNOWN)
on_or_off = &zero;
printf (MINUS_O_FORMAT, o_options[i].name, (*on_or_off == 1) ? on : off);
}
}
set_minus_o_option (on_or_off, option_name)
int on_or_off;
char *option_name;
{
int option_char = -1;
if (STREQ (option_name, "noclobber"))
{
if (on_or_off == FLAG_ON)
bind_variable ("noclobber", "");
else
unbind_variable ("noclobber");
stupidly_hack_special_variables ("noclobber");
}
else if (STREQ (option_name, "ignoreeof"))
{
unbind_variable ("ignoreeof");
unbind_variable ("IGNOREEOF");
if (on_or_off == FLAG_ON)
bind_variable ("IGNOREEOF", "10");
stupidly_hack_special_variables ("IGNOREEOF");
}
#if defined (READLINE)
else if ((STREQ (option_name, "emacs")) || (STREQ (option_name, "vi")))
{
if (on_or_off == FLAG_ON)
{
rl_variable_bind ("editing-mode", option_name);
if (interactive)
with_input_from_stdin ();
no_line_editing = 0;
}
else
{
int isemacs = (rl_editing_mode == 1);
if ((isemacs && STREQ (option_name, "emacs")) ||
(!isemacs && STREQ (option_name, "vi")))
{
if (interactive)
with_input_from_stream (stdin, "stdin");
no_line_editing = 1;
}
else
builtin_error ("not in %s editing mode", option_name);
}
}
#endif /* READLINE */
else if (STREQ (option_name, "interactive-comments"))
interactive_comments = (on_or_off == FLAG_ON);
else if (STREQ (option_name, "posix"))
{
posixly_correct = (on_or_off == FLAG_ON);
unbind_variable ("POSIXLY_CORRECT");
unbind_variable ("POSIX_PEDANTIC");
if (on_or_off == FLAG_ON)
{
bind_variable ("POSIXLY_CORRECT", "");
stupidly_hack_special_variables ("POSIXLY_CORRECT");
}
}
else
{
register int i;
for (i = 0; o_options[i].name; i++)
{
if (STREQ (option_name, o_options[i].name))
{
option_char = o_options[i].letter;
break;
}
}
if (option_char == -1)
{
builtin_error ("%s: unknown option name", option_name);
return (EXECUTION_FAILURE);
}
if (change_flag (option_char, on_or_off) == FLAG_ERROR)
{
bad_option (option_name);
return (EXECUTION_FAILURE);
}
}
return (EXECUTION_SUCCESS);
}
/* Set some flags from the word values in the input list. If LIST is empty,
then print out the values of the variables instead. If LIST contains
non-flags, then set $1 - $9 to the successive words of LIST. */
set_builtin (list)
WORD_LIST *list;
{
int on_or_off, flag_name, force_assignment = 0;
if (!list)
{
SHELL_VAR **vars;
vars = all_shell_variables ();
if (vars)
{
print_var_list (vars);
free (vars);
}
vars = all_shell_functions ();
if (vars)
{
print_var_list (vars);
free (vars);
}
return (EXECUTION_SUCCESS);
}
/* Check validity of flag arguments. */
if (*list->word->word == '-' || *list->word->word == '+')
{
register char *arg;
WORD_LIST *save_list = list;
while (list && (arg = list->word->word))
{
char c;
if (arg[0] != '-' && arg[0] != '+')
break;
/* `-' or `--' signifies end of flag arguments. */
if (arg[0] == '-' &&
(!arg[1] || (arg[1] == '-' && !arg[2])))
break;
while (c = *++arg)
{
if (find_flag (c) == FLAG_UNKNOWN && c != 'o')
{
char s[2];
s[0] = c; s[1] = '\0';
bad_option (s);
if (c == '?')
builtin_usage ();
return (c == '?' ? EXECUTION_SUCCESS : EXECUTION_FAILURE);
}
}
list = list->next;
}
list = save_list;
}
/* Do the set command. While the list consists of words starting with
'-' or '+' treat them as flags, otherwise, start assigning them to
$1 ... $n. */
while (list)
{
char *string = list->word->word;
/* If the argument is `--' or `-' then signal the end of the list
and remember the remaining arguments. */
if (string[0] == '-' && (!string[1] || (string[1] == '-' && !string[2])))
{
list = list->next;
/* `set --' unsets the positional parameters. */
if (string[1] == '-')
force_assignment = 1;
/* Until told differently, the old shell behaviour of
`set - [arg ...]' being equivalent to `set +xv [arg ...]'
stands. Posix.2 says the behaviour is marked as obsolescent. */
else
{
change_flag ('x', '+');
change_flag ('v', '+');
}
break;
}
if ((on_or_off = *string) &&
(on_or_off == '-' || on_or_off == '+'))
{
int i = 1;
while (flag_name = string[i++])
{
if (flag_name == '?')
{
builtin_usage ();
return (EXECUTION_SUCCESS);
}
else if (flag_name == 'o') /* -+o option-name */
{
char *option_name;
WORD_LIST *opt;
opt = list->next;
if (!opt)
{
list_minus_o_opts ();
continue;
}
option_name = opt->word->word;
if (!option_name || !*option_name || (*option_name == '-'))
{
list_minus_o_opts ();
continue;
}
list = list->next; /* Skip over option name. */
if (set_minus_o_option (on_or_off, option_name) != EXECUTION_SUCCESS)
return (EXECUTION_FAILURE);
}
else
{
if (change_flag (flag_name, on_or_off) == FLAG_ERROR)
{
char opt[3];
opt[0] = on_or_off;
opt[1] = flag_name;
opt[2] = '\0';
bad_option (opt);
builtin_usage ();
return (EXECUTION_FAILURE);
}
}
}
}
else
{
break;
}
list = list->next;
}
/* Assigning $1 ... $n */
if (list || force_assignment)
remember_args (list, 1);
return (EXECUTION_SUCCESS);
}
$BUILTIN unset
$FUNCTION unset_builtin
$SHORT_DOC unset [-f] [-v] [name ...]
For each NAME, remove the corresponding variable or function. Given
the `-v', unset will only act on variables. Given the `-f' flag,
unset will only act on functions. With neither flag, unset first
tries to unset a variable, and if that fails, then tries to unset a
function. Some variables (such as PATH and IFS) cannot be unset; also
see readonly.
$END
#define NEXT_VARIABLE() any_failed++; list = list->next; continue;
unset_builtin (list)
WORD_LIST *list;
{
int unset_function, unset_variable, unset_array, opt, any_failed;
char *name;
unset_function = unset_variable = unset_array = any_failed = 0;
reset_internal_getopt ();
while ((opt = internal_getopt (list, "fv")) != -1)
{
switch (opt)
{
case 'f':
unset_function = 1;
break;
case 'v':
unset_variable = 1;
break;
default:
builtin_usage ();
return (EXECUTION_FAILURE);
}
}
list = loptend;
if (unset_function && unset_variable)
{
builtin_error ("cannot simultaneously unset a function and a variable");
return (EXECUTION_FAILURE);
}
while (list)
{
SHELL_VAR *var;
int tem;
#if defined (ARRAY_VARS)
char *t;
#endif
name = list->word->word;
#if defined (ARRAY_VARS)
if (!unset_function && valid_array_reference (name))
{
t = strchr (name, '[');
*t++ = '\0';
unset_array++;
}
#endif
var = unset_function ? find_function (name) : find_variable (name);
if (var && !unset_function && non_unsettable_p (var))
{
builtin_error ("%s: cannot unset", name);
NEXT_VARIABLE ();
}
/* Posix.2 says that unsetting readonly variables is an error. */
if (var && readonly_p (var))
{
builtin_error ("%s: cannot unset: readonly %s",
name, unset_function ? "function" : "variable");
NEXT_VARIABLE ();
}
/* Unless the -f option is supplied, the name refers to a variable. */
#if defined (ARRAY_VARS)
if (var && unset_array)
{
if (array_p (var) == 0)
{
builtin_error ("%s: not an array variable", name);
NEXT_VARIABLE ();
}
else
tem = unbind_array_element (var, t);
}
else
#endif /* ARRAY_VARS */
tem = makunbound (name, unset_function ? shell_functions : shell_variables);
/* This is what Posix.2 draft 11+ says. ``If neither -f nor -v
is specified, the name refers to a variable; if a variable by
that name does not exist, a function by that name, if any,
shall be unset.'' */
if ((tem == -1) && !unset_function && !unset_variable)
tem = makunbound (name, shell_functions);
if (tem == -1)
any_failed++;
else if (!unset_function)
stupidly_hack_special_variables (name);
list = list->next;
}
if (any_failed)
return (EXECUTION_FAILURE);
else
return (EXECUTION_SUCCESS);
}
+50
View File
@@ -0,0 +1,50 @@
/* unwind_prot.h - Macros and functions for hacking unwind protection. */
/* Copyright (C) 1993 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, 675 Mass Ave, Cambridge, MA 02139, USA. */
#if !defined (_UNWIND_PROT_H)
#define _UNWIND_PROT_H
/* Run a function without interrupts. */
extern void begin_unwind_frame ();
extern void discard_unwind_frame ();
extern void run_unwind_frame ();
extern void add_unwind_protect ();
extern void remove_unwind_protect ();
extern void run_unwind_protects ();
extern void unwind_protect_var ();
/* Define for people who like their code to look a certain way. */
#define end_unwind_frame()
/* How to protect an integer. */
#define unwind_protect_int(X) unwind_protect_var (&(X), (char *)(X), sizeof (int))
/* How to protect a pointer to a string. */
#define unwind_protect_string(X) \
unwind_protect_var ((int *)&(X), (X), sizeof (char *))
/* How to protect any old pointer. */
#define unwind_protect_pointer(X) unwind_protect_string (X)
/* How to protect the contents of a jmp_buf. */
#define unwind_protect_jmp_buf(X) \
unwind_protect_var ((int *)(X), (char *)(X), sizeof (procenv_t))
#endif /* _UNWIND_PROT_H */
+42
View File
@@ -0,0 +1,42 @@
# This file is a shell script that caches the results of configure
# tests for CYGWIN32 so they don't need to be done when cross-compiling.
# AC_FUNC_GETPGRP should also define GETPGRP_VOID
ac_cv_func_getpgrp_void=${ac_cv_func_getpgrp_void='yes'}
# AC_FUNC_SETVBUF_REVERSED should not define anything else
ac_cv_func_setvbuf_reversed=${ac_cv_func_setvbuf_reversed='no'}
# on CYGWIN32, system calls do not restart
ac_cv_sys_restartable_syscalls=${ac_cv_sys_restartable_syscalls='no'}
bash_cv_sys_restartable_syscalls=${bash_cv_sys_restartable_syscalls='no'}
# these may be necessary, but they are currently commented out
#ac_cv_c_bigendian=${ac_cv_c_bigendian='no'}
ac_cv_sizeof_char_p=${ac_cv_sizeof_char_p='4'}
ac_cv_sizeof_int=${ac_cv_sizeof_int='4'}
ac_cv_sizeof_long=${ac_cv_sizeof_long='4'}
ac_cv_sizeof_double=${ac_cv_sizeof_double='8'}
bash_cv_dup2_broken=${bash_cv_dup2_broken='no'}
bash_cv_pgrp_pipe=${bash_cv_pgrp_pipe='no'}
bash_cv_type_rlimit=${bash_cv_type_rlimit='long'}
bash_cv_decl_under_sys_siglist=${bash_cv_decl_under_sys_siglist='no'}
bash_cv_under_sys_siglist=${bash_cv_under_sys_siglist='no'}
bash_cv_sys_siglist=${bash_cv_sys_siglist='no'}
bash_cv_opendir_not_robust=${bash_cv_opendir_not_robust='no'}
bash_cv_getenv_redef=${bash_cv_getenv_redef='yes'}
bash_cv_printf_declared=${bash_cv_printf_declared='yes'}
bash_cv_ulimit_maxfds=${bash_cv_ulimit_maxfds='no'}
bash_cv_getcwd_calls_popen=${bash_cv_getcwd_calls_popen='no'}
bash_cv_must_reinstall_sighandlers=${bash_cv_must_reinstall_sighandlers='no'}
bash_cv_job_control_missing=${bash_cv_job_control_missing='present'}
bash_cv_sys_named_pipes=${bash_cv_sys_named_pipes='missing'}
bash_cv_func_sigsetjmp=${bash_cv_func_sigsetjmp='missing'}
bash_cv_mail_dir=${bash_cv_mail_dir='unknown'}
bash_cv_func_strcoll_broken=${bash_cv_func_strcoll_broken='no'}
bash_cv_type_int32_t=${bash_cv_type_int32_t='int'}
bash_cv_type_u_int32_t=${bash_cv_type_u_int32_t='int'}
ac_cv_type_bits64_t=${ac_cv_type_bits64_t='no'}
# end of cross-build/cygwin32.cache
+1745
View File
File diff suppressed because it is too large Load Diff
+447 -393
View File
File diff suppressed because it is too large Load Diff
+103 -28
View File
@@ -3,7 +3,7 @@
</HEAD>
<BODY><TABLE WIDTH=100%>
<TR>
<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2012 February 4<TH ALIGN=RIGHT width=33%>BASH(1)
<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2012 July 5<TH ALIGN=RIGHT width=33%>BASH(1)
</TR>
</TABLE>
<BR><A HREF="#index">Index</A>
@@ -654,7 +654,7 @@ command:
<B>
</B>
! case do done elif else esac fi for function if in select then until while { } time [[ ]]
! case coproc do done elif else esac fi for function if in select then until while { } time [[ ]]
</DL>
@@ -1202,6 +1202,7 @@ command (see
below).
The file descriptors can be utilized as arguments to shell commands
and redirections using standard word expansions.
The file descriptors are not available in subshells.
The process ID of the shell spawned to execute the coprocess is
available as the value of the variable <I>NAME</I>_PID.
The <B>wait</B>
@@ -1592,6 +1593,41 @@ appended to the array beginning at one greater than the array's maximum index
associative array.
When applied to a string-valued variable, <I>value</I> is expanded and
appended to the variable's value.
<P>
A variable can be assigned the <I>nameref</I> attribute using the
<B>-n</B> option to the <B>declare</B> or <B>local</B> builtin commands
(see the descriptions of <B>declare</B> and <B>local</B> below)
to create a <I>nameref</I>, or a reference to another variable.
This allows variables to be manipulated indirectly.
Whenever the nameref variable is referenced or assigned to, the operation
is actually performed on the variable specified by the nameref variable's
value.
A nameref is commonly used within shell functions to refer to a variable
whose name is passed as an argument to the function.
For instance, if a variable name is passed to a shell function as its first
argument, running
<P>
<DL COMPACT><DT><DD>
<TT>declare -n ref=$1</TT>
</DL>
<P>
inside the function creates a nameref variable <B>ref</B> whose value is
the variable name passed as the first argument.
References and assignments to <B>ref</B> are treated as references and
assignments to the variable whose name was passed as <B>$1</B>.
If the control variable in a <B>for</B> loop has the nameref attribute,
the list of words can be a list of shell variables, and a name reference
will be established for each word in the list, in turn, when the loop is
executed.
Array variables cannot be given the <B>-n</B> attribute.
However, nameref variables can reference array variables and subscripted
array variables.
Namerefs can be unset using the <B>-n</B> option to the <B>unset</B> builtin.
Otherwise, if <B>unset</B> is executed with the name of a nameref variable
as an argument, the variable referenced by the nameref variable will be unset.
<A NAME="lbAU">&nbsp;</A>
<H4>Positional Parameters</H4>
@@ -2529,7 +2565,7 @@ The name of the file in which command history is saved (see
</FONT>
below). The default value is <A HREF="file:~/.bash_history"><I>~/.bash_history</I></A>. If unset, the
command history is not saved when an interactive shell exits.
command history is not saved when a shell exits.
<DT><B>HISTFILESIZE</B>
<DD>
@@ -2538,7 +2574,7 @@ variable is assigned a value, the history file is truncated, if
necessary,
to contain no more than that number of lines by removing the oldest entries.
The history file is also truncated to this size after
writing it when an interactive shell exits.
writing it when a shell exits.
If the value is 0, the history file is truncated to zero size.
Non-numeric values and numeric values less than zero inhibit truncation.
The shell sets the default value to the value of <B>HISTSIZE</B>
@@ -2958,11 +2994,12 @@ after
</FONT>
seconds when input is coming from a terminal.
In an interactive shell, the value is interpreted as the
number of seconds to wait for input after issuing the primary prompt.
number of seconds to wait for a line of input after issuing the
primary prompt.
<B>Bash</B>
terminates after waiting for that number of seconds if input does
not arrive.
terminates after waiting for that number of seconds if a complete
line of input does not arrive.
<DT><B>TMPDIR</B>
<DD>
@@ -3041,6 +3078,7 @@ be indexed or assigned contiguously.
Indexed arrays are referenced using integers (including arithmetic
expressions) and are zero-based; associative arrays are referenced
using arbitrary strings.
Unless otherwise noted, indexed array indices must be non-negative integers.
<P>
An indexed array is created automatically if any variable is assigned to
@@ -3451,12 +3489,14 @@ or when
is followed by a character which is not to be
interpreted as part of its name.
The <I>parameter</I> is a shell parameter as described above
<B>PARAMETERS</B>) or an array reference (<B>Arrays</B>).
</DL>
<P>
If the first character of <I>parameter</I> is an exclamation point (<B>!</B>),
a level of variable indirection is introduced.
it introduces a level of variable indirection.
<B>Bash</B> uses the value of the variable formed from the rest of
<I>parameter</I> as the name of the variable; this variable is then
expanded and that value is used in the rest of the substitution, rather
@@ -3472,7 +3512,8 @@ In each of the cases below, <I>word</I> is subject to tilde expansion,
parameter expansion, command substitution, and arithmetic expansion.
<P>
When not performing substring expansion, using the forms documented below,
When not performing substring expansion, using the forms documented below
(e.g., <B>:-</B>),
<B>bash</B> tests for a parameter that is unset or null. Omitting the colon
results in a test only for a parameter that is unset.
<P>
@@ -3532,33 +3573,50 @@ is substituted.
<DT>${<I>parameter</I><B>:</B><I>offset</I><B>:</B><I>length</I>}<DD>
<B>Substring Expansion</B>.
Expands to up to <I>length</I> characters of <I>parameter</I>
Expands to up to <I>length</I> characters of the value of <I>parameter</I>
starting at the character specified by <I>offset</I>.
If <I>length</I> is omitted, expands to the substring of
<I>parameter</I> starting at the character specified by <I>offset</I>.
If <I>parameter</I> is <B>@</B>, an indexed array subscripted by
<B>@</B> or <B>*</B>, or an associative array name, the results differ as
described below.
If <I>length</I> is omitted, expands to the substring of the value of
<I>parameter</I> starting at the character specified by <I>offset</I>
and extending to the end of the value.
<I>length</I> and <I>offset</I> are arithmetic expressions (see
<FONT SIZE=-1><B>ARITHMETIC EVALUATION</B>
</FONT>
below).
<P>
If <I>offset</I> evaluates to a number less than zero, the value
is used as an offset from the end of the value of <I>parameter</I>.
If <I>length</I> evaluates to a number less than zero, and <I>parameter</I>
is not <B>@</B> and not an indexed or associative array, it is interpreted
as an offset from the end of the value of <I>parameter</I> rather than
a number of characters, and the expansion is the characters between the
two offsets.
is used as an offset in characters
from the end of the value of <I>parameter</I>.
If <I>length</I> evaluates to a number less than zero,
it is interpreted as an offset in characters
from the end of the value of <I>parameter</I> rather than
a number of characters, and the expansion is the characters between
<I>offset</I> and that result.
Note that a negative offset must be separated from the colon by at least
one space to avoid being confused with the <B>:-</B> expansion.
<P>
If <I>parameter</I> is <B>@</B>, the result is <I>length</I> positional
parameters beginning at <I>offset</I>.
A negative <I>offset</I> is taken relative to one greater than the greatest
positional parameter, so an offset of -1 evaluates to the last positional
parameter.
It is an expansion error if <I>length</I> evaluates to a number less than
zero.
<P>
If <I>parameter</I> is an indexed array name subscripted by @ or *,
the result is the <I>length</I>
members of the array beginning with ${<I>parameter</I>[<I>offset</I>]}.
A negative <I>offset</I> is taken relative to one greater than the maximum
index of the specified array.
It is an expansion error if <I>length</I> evaluates to a number less than
zero.
<P>
Substring expansion applied to an associative array produces undefined
results.
Note that a negative offset must be separated from the colon by at least
one space to avoid being confused with the :- expansion.
<P>
Substring indexing is zero-based unless the positional parameters
are used, in which case the indexing starts at 1 by default.
If <I>offset</I> is 0, and the positional parameters are used, <B>$0</B> is
@@ -4421,13 +4479,13 @@ File descriptor 2 is duplicated.
<DD>
If <I>host</I> is a valid hostname or Internet address, and <I>port</I>
is an integer port number or service name, <B>bash</B> attempts to open
a TCP connection to the corresponding socket.
the corresponding TCP socket.
<DT><B>/dev/udp/</B><I>host</I>/<I>port</I>
<DD>
If <I>host</I> is a valid hostname or Internet address, and <I>port</I>
is an integer port number or service name, <B>bash</B> attempts to open
a UDP connection to the corresponding socket.
the corresponding UDP socket.
</DL></DL>
@@ -8100,7 +8158,7 @@ These timestamps are optionally displayed depending on the value of the
</FONT>
variable.
When an interactive shell exits, the last
When a shell with history enabled exits, the last
<FONT SIZE=-1><B>$HISTSIZE</B>
</FONT>
@@ -9301,9 +9359,9 @@ must be >= 1. If
is greater than the number of enclosing loops, the last enclosing loop
(the ``top-level'' loop) is resumed.
The return value is 0 unless <I>n</I> is not greater than or equal to 1.
<DT><B>declare</B> [<B>-aAfFgilrtux</B>] [<B>-p</B>] [<I>name</I>[=<I>value</I>] ...]<DD>
<DT><B>declare</B> [<B>-aAfFgilnrtux</B>] [<B>-p</B>] [<I>name</I>[=<I>value</I>] ...]<DD>
<DT><B>typeset</B> [<B>-aAfFgilrtux</B>] [<B>-p</B>] [<I>name</I>[=<I>value</I>] ...]<DD>
<DT><B>typeset</B> [<B>-aAfFgilnrtux</B>] [<B>-p</B>] [<I>name</I>[=<I>value</I>] ...]<DD>
Declare variables and/or give them attributes.
If no <I>name</I>s are given then display the values of variables.
@@ -9383,6 +9441,16 @@ above) is performed when the variable is assigned a value.
When the variable is assigned a value, all upper-case characters are
converted to lower-case.
The upper-case attribute is disabled.
<DT><B>-n</B>
<DD>
Give each <I>name</I> the <I>nameref</I> attribute, making
it a name reference to another variable.
That other variable is defined by the value of <I>name</I>.
All references and assignments to <I>name</I>, except for changing the
<B>-n</B> attribute itself, are performed on the variable referenced by
<I>name</I>'s value.
The <B>-n</B> attribute cannot be applied to array variables.
<DT><B>-r</B>
<DD>
@@ -12570,7 +12638,7 @@ value is true unless a supplied
<I>name</I>
is not a defined alias.
<DT><B>unset</B> [-<B>fv</B>] [<I>name</I> ...]<DD>
<DT><B>unset</B> [-<B>fv</B>] [-<B>n</B>] [<I>name</I> ...]<DD>
For each
<I>name</I>,
@@ -12591,6 +12659,13 @@ is specified, each
refers to a shell function, and the function definition
is removed.
If the
<B>-n</B>
option is supplied, and <I>name</I> is a variable with the <I>nameref</I>
attribute, <I>name</I> will be unset rather than the variable it
references.
<B>-n</B> has no effect if the <B>-f</B> option is supplied.
If no options are supplied, each <I>name</I> refers to a variable; if
there is no variable by that name, any function with that name is
unset.
@@ -12930,7 +13005,7 @@ There may be only one active coprocess at a time.
<HR>
<TABLE WIDTH=100%>
<TR>
<TH ALIGN=LEFT width=33%>GNU Bash 4.2<TH ALIGN=CENTER width=33%>2012 February 4<TH ALIGN=RIGHT width=33%>BASH(1)
<TH ALIGN=LEFT width=33%>GNU Bash 4.2<TH ALIGN=CENTER width=33%>2012 July 5<TH ALIGN=RIGHT width=33%>BASH(1)
</TR>
</TABLE>
<HR>
@@ -13036,6 +13111,6 @@ There may be only one active coprocess at a time.
</DL>
<HR>
This document was created by man2html from bash.1.<BR>
Time: 05 March 2012 21:31:01 EST
Time: 05 July 2012 20:43:10 EDT
</BODY>
</HTML>
+6514 -6424
View File
File diff suppressed because it is too large Load Diff
+100 -100
View File
@@ -75,163 +75,163 @@
@xrdef{Shell Functions-pg}{16}
@xrdef{Shell Parameters-title}{Shell Parameters}
@xrdef{Shell Parameters-snt}{Section@tie 3.4}
@xrdef{Shell Parameters-pg}{18}
@xrdef{Positional Parameters-title}{Positional Parameters}
@xrdef{Positional Parameters-snt}{Section@tie 3.4.1}
@xrdef{Shell Parameters-pg}{18}
@xrdef{Positional Parameters-pg}{18}
@xrdef{Special Parameters-title}{Special Parameters}
@xrdef{Special Parameters-snt}{Section@tie 3.4.2}
@xrdef{Positional Parameters-pg}{19}
@xrdef{Special Parameters-pg}{19}
@xrdef{Shell Expansions-title}{Shell Expansions}
@xrdef{Shell Expansions-snt}{Section@tie 3.5}
@xrdef{Special Parameters-pg}{19}
@xrdef{Brace Expansion-title}{Brace Expansion}
@xrdef{Brace Expansion-snt}{Section@tie 3.5.1}
@xrdef{Shell Expansions-pg}{20}
@xrdef{Brace Expansion-pg}{20}
@xrdef{Tilde Expansion-title}{Tilde Expansion}
@xrdef{Tilde Expansion-snt}{Section@tie 3.5.2}
@xrdef{Brace Expansion-pg}{21}
@xrdef{Tilde Expansion-pg}{21}
@xrdef{Shell Parameter Expansion-title}{Shell Parameter Expansion}
@xrdef{Shell Parameter Expansion-snt}{Section@tie 3.5.3}
@xrdef{Shell Parameter Expansion-pg}{22}
@xrdef{Command Substitution-title}{Command Substitution}
@xrdef{Command Substitution-snt}{Section@tie 3.5.4}
@xrdef{Command Substitution-pg}{27}
@xrdef{Arithmetic Expansion-title}{Arithmetic Expansion}
@xrdef{Arithmetic Expansion-snt}{Section@tie 3.5.5}
@xrdef{Process Substitution-title}{Process Substitution}
@xrdef{Process Substitution-snt}{Section@tie 3.5.6}
@xrdef{Command Substitution-pg}{25}
@xrdef{Arithmetic Expansion-pg}{25}
@xrdef{Process Substitution-pg}{25}
@xrdef{Word Splitting-title}{Word Splitting}
@xrdef{Word Splitting-snt}{Section@tie 3.5.7}
@xrdef{Arithmetic Expansion-pg}{28}
@xrdef{Process Substitution-pg}{28}
@xrdef{Word Splitting-pg}{28}
@xrdef{Filename Expansion-title}{Filename Expansion}
@xrdef{Filename Expansion-snt}{Section@tie 3.5.8}
@xrdef{Word Splitting-pg}{26}
@xrdef{Filename Expansion-pg}{26}
@xrdef{Pattern Matching-title}{Pattern Matching}
@xrdef{Pattern Matching-snt}{Section@tie 3.5.8.1}
@xrdef{Pattern Matching-pg}{27}
@xrdef{Filename Expansion-pg}{29}
@xrdef{Pattern Matching-pg}{29}
@xrdef{Quote Removal-title}{Quote Removal}
@xrdef{Quote Removal-snt}{Section@tie 3.5.9}
@xrdef{Redirections-title}{Redirections}
@xrdef{Redirections-snt}{Section@tie 3.6}
@xrdef{Quote Removal-pg}{28}
@xrdef{Redirections-pg}{28}
@xrdef{Quote Removal-pg}{30}
@xrdef{Redirections-pg}{31}
@xrdef{Executing Commands-title}{Executing Commands}
@xrdef{Executing Commands-snt}{Section@tie 3.7}
@xrdef{Simple Command Expansion-title}{Simple Command Expansion}
@xrdef{Simple Command Expansion-snt}{Section@tie 3.7.1}
@xrdef{Executing Commands-pg}{34}
@xrdef{Simple Command Expansion-pg}{34}
@xrdef{Command Search and Execution-title}{Command Search and Execution}
@xrdef{Command Search and Execution-snt}{Section@tie 3.7.2}
@xrdef{Executing Commands-pg}{32}
@xrdef{Simple Command Expansion-pg}{32}
@xrdef{Command Execution Environment-title}{Command Execution Environment}
@xrdef{Command Execution Environment-snt}{Section@tie 3.7.3}
@xrdef{Command Search and Execution-pg}{33}
@xrdef{Command Execution Environment-pg}{33}
@xrdef{Command Search and Execution-pg}{35}
@xrdef{Environment-title}{Environment}
@xrdef{Environment-snt}{Section@tie 3.7.4}
@xrdef{Environment-pg}{34}
@xrdef{Command Execution Environment-pg}{36}
@xrdef{Exit Status-title}{Exit Status}
@xrdef{Exit Status-snt}{Section@tie 3.7.5}
@xrdef{Signals-title}{Signals}
@xrdef{Signals-snt}{Section@tie 3.7.6}
@xrdef{Exit Status-pg}{35}
@xrdef{Signals-pg}{35}
@xrdef{Environment-pg}{37}
@xrdef{Exit Status-pg}{37}
@xrdef{Shell Scripts-title}{Shell Scripts}
@xrdef{Shell Scripts-snt}{Section@tie 3.8}
@xrdef{Shell Scripts-pg}{36}
@xrdef{Signals-pg}{38}
@xrdef{Shell Scripts-pg}{38}
@xrdef{Shell Builtin Commands-title}{Shell Builtin Commands}
@xrdef{Shell Builtin Commands-snt}{Chapter@tie 4}
@xrdef{Bourne Shell Builtins-title}{Bourne Shell Builtins}
@xrdef{Bourne Shell Builtins-snt}{Section@tie 4.1}
@xrdef{Shell Builtin Commands-pg}{37}
@xrdef{Bourne Shell Builtins-pg}{37}
@xrdef{Shell Builtin Commands-pg}{41}
@xrdef{Bourne Shell Builtins-pg}{41}
@xrdef{Bash Builtins-title}{Bash Builtin Commands}
@xrdef{Bash Builtins-snt}{Section@tie 4.2}
@xrdef{Bash Builtins-pg}{44}
@xrdef{Bash Builtins-pg}{48}
@xrdef{Modifying Shell Behavior-title}{Modifying Shell Behavior}
@xrdef{Modifying Shell Behavior-snt}{Section@tie 4.3}
@xrdef{The Set Builtin-title}{The Set Builtin}
@xrdef{The Set Builtin-snt}{Section@tie 4.3.1}
@xrdef{Modifying Shell Behavior-pg}{54}
@xrdef{The Set Builtin-pg}{54}
@xrdef{Modifying Shell Behavior-pg}{58}
@xrdef{The Set Builtin-pg}{58}
@xrdef{The Shopt Builtin-title}{The Shopt Builtin}
@xrdef{The Shopt Builtin-snt}{Section@tie 4.3.2}
@xrdef{The Shopt Builtin-pg}{58}
@xrdef{The Shopt Builtin-pg}{62}
@xrdef{Special Builtins-title}{Special Builtins}
@xrdef{Special Builtins-snt}{Section@tie 4.4}
@xrdef{Special Builtins-pg}{63}
@xrdef{Special Builtins-pg}{67}
@xrdef{Shell Variables-title}{Shell Variables}
@xrdef{Shell Variables-snt}{Chapter@tie 5}
@xrdef{Bourne Shell Variables-title}{Bourne Shell Variables}
@xrdef{Bourne Shell Variables-snt}{Section@tie 5.1}
@xrdef{Bash Variables-title}{Bash Variables}
@xrdef{Bash Variables-snt}{Section@tie 5.2}
@xrdef{Shell Variables-pg}{65}
@xrdef{Bourne Shell Variables-pg}{65}
@xrdef{Bash Variables-pg}{65}
@xrdef{Shell Variables-pg}{69}
@xrdef{Bourne Shell Variables-pg}{69}
@xrdef{Bash Variables-pg}{69}
@xrdef{Bash Features-title}{Bash Features}
@xrdef{Bash Features-snt}{Chapter@tie 6}
@xrdef{Invoking Bash-title}{Invoking Bash}
@xrdef{Invoking Bash-snt}{Section@tie 6.1}
@xrdef{Bash Features-pg}{75}
@xrdef{Invoking Bash-pg}{75}
@xrdef{Bash Features-pg}{79}
@xrdef{Invoking Bash-pg}{79}
@xrdef{Bash Startup Files-title}{Bash Startup Files}
@xrdef{Bash Startup Files-snt}{Section@tie 6.2}
@xrdef{Bash Startup Files-pg}{77}
@xrdef{Bash Startup Files-pg}{81}
@xrdef{Interactive Shells-title}{Interactive Shells}
@xrdef{Interactive Shells-snt}{Section@tie 6.3}
@xrdef{What is an Interactive Shell?-title}{What is an Interactive Shell?}
@xrdef{What is an Interactive Shell?-snt}{Section@tie 6.3.1}
@xrdef{Interactive Shells-pg}{78}
@xrdef{Interactive Shells-pg}{82}
@xrdef{Is this Shell Interactive?-title}{Is this Shell Interactive?}
@xrdef{Is this Shell Interactive?-snt}{Section@tie 6.3.2}
@xrdef{Interactive Shell Behavior-title}{Interactive Shell Behavior}
@xrdef{Interactive Shell Behavior-snt}{Section@tie 6.3.3}
@xrdef{What is an Interactive Shell?-pg}{79}
@xrdef{Is this Shell Interactive?-pg}{79}
@xrdef{Interactive Shell Behavior-pg}{79}
@xrdef{What is an Interactive Shell?-pg}{83}
@xrdef{Is this Shell Interactive?-pg}{83}
@xrdef{Interactive Shell Behavior-pg}{83}
@xrdef{Bash Conditional Expressions-title}{Bash Conditional Expressions}
@xrdef{Bash Conditional Expressions-snt}{Section@tie 6.4}
@xrdef{Bash Conditional Expressions-pg}{80}
@xrdef{Bash Conditional Expressions-pg}{84}
@xrdef{Shell Arithmetic-title}{Shell Arithmetic}
@xrdef{Shell Arithmetic-snt}{Section@tie 6.5}
@xrdef{Shell Arithmetic-pg}{82}
@xrdef{Shell Arithmetic-pg}{86}
@xrdef{Aliases-title}{Aliases}
@xrdef{Aliases-snt}{Section@tie 6.6}
@xrdef{Aliases-pg}{83}
@xrdef{Aliases-pg}{87}
@xrdef{Arrays-title}{Arrays}
@xrdef{Arrays-snt}{Section@tie 6.7}
@xrdef{Arrays-pg}{84}
@xrdef{Arrays-pg}{88}
@xrdef{The Directory Stack-title}{The Directory Stack}
@xrdef{The Directory Stack-snt}{Section@tie 6.8}
@xrdef{Directory Stack Builtins-title}{Directory Stack Builtins}
@xrdef{Directory Stack Builtins-snt}{Section@tie 6.8.1}
@xrdef{The Directory Stack-pg}{85}
@xrdef{Directory Stack Builtins-pg}{85}
@xrdef{The Directory Stack-pg}{89}
@xrdef{Directory Stack Builtins-pg}{89}
@xrdef{Controlling the Prompt-title}{Controlling the Prompt}
@xrdef{Controlling the Prompt-snt}{Section@tie 6.9}
@xrdef{Controlling the Prompt-pg}{87}
@xrdef{Controlling the Prompt-pg}{91}
@xrdef{The Restricted Shell-title}{The Restricted Shell}
@xrdef{The Restricted Shell-snt}{Section@tie 6.10}
@xrdef{Bash POSIX Mode-title}{Bash POSIX Mode}
@xrdef{Bash POSIX Mode-snt}{Section@tie 6.11}
@xrdef{The Restricted Shell-pg}{88}
@xrdef{Bash POSIX Mode-pg}{88}
@xrdef{The Restricted Shell-pg}{92}
@xrdef{Bash POSIX Mode-pg}{92}
@xrdef{Job Control-title}{Job Control}
@xrdef{Job Control-snt}{Chapter@tie 7}
@xrdef{Job Control Basics-title}{Job Control Basics}
@xrdef{Job Control Basics-snt}{Section@tie 7.1}
@xrdef{Job Control-pg}{93}
@xrdef{Job Control Basics-pg}{93}
@xrdef{Job Control-pg}{97}
@xrdef{Job Control Basics-pg}{97}
@xrdef{Job Control Builtins-title}{Job Control Builtins}
@xrdef{Job Control Builtins-snt}{Section@tie 7.2}
@xrdef{Job Control Builtins-pg}{94}
@xrdef{Job Control Builtins-pg}{98}
@xrdef{Job Control Variables-title}{Job Control Variables}
@xrdef{Job Control Variables-snt}{Section@tie 7.3}
@xrdef{Job Control Variables-pg}{96}
@xrdef{Job Control Variables-pg}{100}
@xrdef{Command Line Editing-title}{Command Line Editing}
@xrdef{Command Line Editing-snt}{Chapter@tie 8}
@xrdef{Introduction and Notation-title}{Introduction to Line Editing}
@@ -240,145 +240,145 @@
@xrdef{Readline Interaction-snt}{Section@tie 8.2}
@xrdef{Readline Bare Essentials-title}{Readline Bare Essentials}
@xrdef{Readline Bare Essentials-snt}{Section@tie 8.2.1}
@xrdef{Command Line Editing-pg}{97}
@xrdef{Introduction and Notation-pg}{97}
@xrdef{Readline Interaction-pg}{97}
@xrdef{Command Line Editing-pg}{101}
@xrdef{Introduction and Notation-pg}{101}
@xrdef{Readline Interaction-pg}{101}
@xrdef{Readline Movement Commands-title}{Readline Movement Commands}
@xrdef{Readline Movement Commands-snt}{Section@tie 8.2.2}
@xrdef{Readline Killing Commands-title}{Readline Killing Commands}
@xrdef{Readline Killing Commands-snt}{Section@tie 8.2.3}
@xrdef{Readline Bare Essentials-pg}{98}
@xrdef{Readline Movement Commands-pg}{98}
@xrdef{Readline Bare Essentials-pg}{102}
@xrdef{Readline Movement Commands-pg}{102}
@xrdef{Readline Arguments-title}{Readline Arguments}
@xrdef{Readline Arguments-snt}{Section@tie 8.2.4}
@xrdef{Searching-title}{Searching for Commands in the History}
@xrdef{Searching-snt}{Section@tie 8.2.5}
@xrdef{Readline Killing Commands-pg}{99}
@xrdef{Readline Arguments-pg}{99}
@xrdef{Searching-pg}{99}
@xrdef{Readline Killing Commands-pg}{103}
@xrdef{Readline Arguments-pg}{103}
@xrdef{Searching-pg}{103}
@xrdef{Readline Init File-title}{Readline Init File}
@xrdef{Readline Init File-snt}{Section@tie 8.3}
@xrdef{Readline Init File Syntax-title}{Readline Init File Syntax}
@xrdef{Readline Init File Syntax-snt}{Section@tie 8.3.1}
@xrdef{Readline Init File-pg}{100}
@xrdef{Readline Init File Syntax-pg}{100}
@xrdef{Readline Init File-pg}{104}
@xrdef{Readline Init File Syntax-pg}{104}
@xrdef{Conditional Init Constructs-title}{Conditional Init Constructs}
@xrdef{Conditional Init Constructs-snt}{Section@tie 8.3.2}
@xrdef{Conditional Init Constructs-pg}{107}
@xrdef{Conditional Init Constructs-pg}{111}
@xrdef{Sample Init File-title}{Sample Init File}
@xrdef{Sample Init File-snt}{Section@tie 8.3.3}
@xrdef{Sample Init File-pg}{108}
@xrdef{Sample Init File-pg}{112}
@xrdef{Bindable Readline Commands-title}{Bindable Readline Commands}
@xrdef{Bindable Readline Commands-snt}{Section@tie 8.4}
@xrdef{Commands For Moving-title}{Commands For Moving}
@xrdef{Commands For Moving-snt}{Section@tie 8.4.1}
@xrdef{Commands For History-title}{Commands For Manipulating The History}
@xrdef{Commands For History-snt}{Section@tie 8.4.2}
@xrdef{Bindable Readline Commands-pg}{111}
@xrdef{Commands For Moving-pg}{111}
@xrdef{Commands For History-pg}{112}
@xrdef{Bindable Readline Commands-pg}{115}
@xrdef{Commands For Moving-pg}{115}
@xrdef{Commands For History-pg}{116}
@xrdef{Commands For Text-title}{Commands For Changing Text}
@xrdef{Commands For Text-snt}{Section@tie 8.4.3}
@xrdef{Commands For Text-pg}{113}
@xrdef{Commands For Text-pg}{117}
@xrdef{Commands For Killing-title}{Killing And Yanking}
@xrdef{Commands For Killing-snt}{Section@tie 8.4.4}
@xrdef{Commands For Killing-pg}{114}
@xrdef{Commands For Killing-pg}{118}
@xrdef{Numeric Arguments-title}{Specifying Numeric Arguments}
@xrdef{Numeric Arguments-snt}{Section@tie 8.4.5}
@xrdef{Numeric Arguments-pg}{115}
@xrdef{Numeric Arguments-pg}{119}
@xrdef{Commands For Completion-title}{Letting Readline Type For You}
@xrdef{Commands For Completion-snt}{Section@tie 8.4.6}
@xrdef{Commands For Completion-pg}{116}
@xrdef{Commands For Completion-pg}{120}
@xrdef{Keyboard Macros-title}{Keyboard Macros}
@xrdef{Keyboard Macros-snt}{Section@tie 8.4.7}
@xrdef{Keyboard Macros-pg}{117}
@xrdef{Keyboard Macros-pg}{121}
@xrdef{Miscellaneous Commands-title}{Some Miscellaneous Commands}
@xrdef{Miscellaneous Commands-snt}{Section@tie 8.4.8}
@xrdef{Miscellaneous Commands-pg}{118}
@xrdef{Miscellaneous Commands-pg}{122}
@xrdef{Readline vi Mode-title}{Readline vi Mode}
@xrdef{Readline vi Mode-snt}{Section@tie 8.5}
@xrdef{Programmable Completion-title}{Programmable Completion}
@xrdef{Programmable Completion-snt}{Section@tie 8.6}
@xrdef{Readline vi Mode-pg}{120}
@xrdef{Programmable Completion-pg}{120}
@xrdef{Readline vi Mode-pg}{124}
@xrdef{Programmable Completion-pg}{124}
@xrdef{Programmable Completion Builtins-title}{Programmable Completion Builtins}
@xrdef{Programmable Completion Builtins-snt}{Section@tie 8.7}
@xrdef{Programmable Completion Builtins-pg}{122}
@xrdef{Programmable Completion Builtins-pg}{126}
@xrdef{A Programmable Completion Example-title}{A Programmable Completion Example}
@xrdef{A Programmable Completion Example-snt}{Section@tie 8.8}
@xrdef{A Programmable Completion Example-pg}{126}
@xrdef{A Programmable Completion Example-pg}{130}
@xrdef{Using History Interactively-title}{Using History Interactively}
@xrdef{Using History Interactively-snt}{Chapter@tie 9}
@xrdef{Bash History Facilities-title}{Bash History Facilities}
@xrdef{Bash History Facilities-snt}{Section@tie 9.1}
@xrdef{Bash History Builtins-title}{Bash History Builtins}
@xrdef{Bash History Builtins-snt}{Section@tie 9.2}
@xrdef{Using History Interactively-pg}{129}
@xrdef{Bash History Facilities-pg}{129}
@xrdef{Bash History Builtins-pg}{129}
@xrdef{Using History Interactively-pg}{133}
@xrdef{Bash History Facilities-pg}{133}
@xrdef{Bash History Builtins-pg}{133}
@xrdef{History Interaction-title}{History Expansion}
@xrdef{History Interaction-snt}{Section@tie 9.3}
@xrdef{Event Designators-title}{Event Designators}
@xrdef{Event Designators-snt}{Section@tie 9.3.1}
@xrdef{History Interaction-pg}{131}
@xrdef{History Interaction-pg}{135}
@xrdef{Word Designators-title}{Word Designators}
@xrdef{Word Designators-snt}{Section@tie 9.3.2}
@xrdef{Event Designators-pg}{132}
@xrdef{Word Designators-pg}{132}
@xrdef{Event Designators-pg}{136}
@xrdef{Word Designators-pg}{136}
@xrdef{Modifiers-title}{Modifiers}
@xrdef{Modifiers-snt}{Section@tie 9.3.3}
@xrdef{Modifiers-pg}{133}
@xrdef{Modifiers-pg}{137}
@xrdef{Installing Bash-title}{Installing Bash}
@xrdef{Installing Bash-snt}{Chapter@tie 10}
@xrdef{Basic Installation-title}{Basic Installation}
@xrdef{Basic Installation-snt}{Section@tie 10.1}
@xrdef{Compilers and Options-title}{Compilers and Options}
@xrdef{Compilers and Options-snt}{Section@tie 10.2}
@xrdef{Installing Bash-pg}{135}
@xrdef{Basic Installation-pg}{135}
@xrdef{Installing Bash-pg}{139}
@xrdef{Basic Installation-pg}{139}
@xrdef{Compiling For Multiple Architectures-title}{Compiling For Multiple Architectures}
@xrdef{Compiling For Multiple Architectures-snt}{Section@tie 10.3}
@xrdef{Installation Names-title}{Installation Names}
@xrdef{Installation Names-snt}{Section@tie 10.4}
@xrdef{Specifying the System Type-title}{Specifying the System Type}
@xrdef{Specifying the System Type-snt}{Section@tie 10.5}
@xrdef{Compilers and Options-pg}{136}
@xrdef{Compiling For Multiple Architectures-pg}{136}
@xrdef{Installation Names-pg}{136}
@xrdef{Specifying the System Type-pg}{136}
@xrdef{Compilers and Options-pg}{140}
@xrdef{Compiling For Multiple Architectures-pg}{140}
@xrdef{Installation Names-pg}{140}
@xrdef{Specifying the System Type-pg}{140}
@xrdef{Sharing Defaults-title}{Sharing Defaults}
@xrdef{Sharing Defaults-snt}{Section@tie 10.6}
@xrdef{Operation Controls-title}{Operation Controls}
@xrdef{Operation Controls-snt}{Section@tie 10.7}
@xrdef{Optional Features-title}{Optional Features}
@xrdef{Optional Features-snt}{Section@tie 10.8}
@xrdef{Sharing Defaults-pg}{137}
@xrdef{Operation Controls-pg}{137}
@xrdef{Optional Features-pg}{137}
@xrdef{Sharing Defaults-pg}{141}
@xrdef{Operation Controls-pg}{141}
@xrdef{Optional Features-pg}{141}
@xrdef{Reporting Bugs-title}{Reporting Bugs}
@xrdef{Reporting Bugs-snt}{Appendix@tie @char65{}}
@xrdef{Reporting Bugs-pg}{143}
@xrdef{Reporting Bugs-pg}{147}
@xrdef{Major Differences From The Bourne Shell-title}{Major Differences From The Bourne Shell}
@xrdef{Major Differences From The Bourne Shell-snt}{Appendix@tie @char66{}}
@xrdef{Major Differences From The Bourne Shell-pg}{145}
@xrdef{Major Differences From The Bourne Shell-pg}{149}
@xrdef{GNU Free Documentation License-title}{GNU Free Documentation License}
@xrdef{GNU Free Documentation License-snt}{Appendix@tie @char67{}}
@xrdef{GNU Free Documentation License-pg}{151}
@xrdef{GNU Free Documentation License-pg}{155}
@xrdef{Indexes-title}{Indexes}
@xrdef{Indexes-snt}{Appendix@tie @char68{}}
@xrdef{Builtin Index-title}{Index of Shell Builtin Commands}
@xrdef{Builtin Index-snt}{Section@tie @char68.1}
@xrdef{Indexes-pg}{159}
@xrdef{Builtin Index-pg}{159}
@xrdef{Indexes-pg}{163}
@xrdef{Builtin Index-pg}{163}
@xrdef{Reserved Word Index-title}{Index of Shell Reserved Words}
@xrdef{Reserved Word Index-snt}{Section@tie @char68.2}
@xrdef{Variable Index-title}{Parameter and Variable Index}
@xrdef{Variable Index-snt}{Section@tie @char68.3}
@xrdef{Reserved Word Index-pg}{160}
@xrdef{Variable Index-pg}{160}
@xrdef{Reserved Word Index-pg}{164}
@xrdef{Variable Index-pg}{164}
@xrdef{Function Index-title}{Function Index}
@xrdef{Function Index-snt}{Section@tie @char68.4}
@xrdef{Function Index-pg}{162}
@xrdef{Function Index-pg}{166}
@xrdef{Concept Index-title}{Concept Index}
@xrdef{Concept Index-snt}{Section@tie @char68.5}
@xrdef{Concept Index-pg}{164}
@xrdef{Concept Index-pg}{168}
+59 -59
View File
@@ -1,59 +1,59 @@
\entry{:}{37}{\code {:}}
\entry{.}{37}{\code {.}}
\entry{break}{37}{\code {break}}
\entry{cd}{38}{\code {cd}}
\entry{continue}{38}{\code {continue}}
\entry{eval}{38}{\code {eval}}
\entry{exec}{38}{\code {exec}}
\entry{exit}{39}{\code {exit}}
\entry{export}{39}{\code {export}}
\entry{getopts}{39}{\code {getopts}}
\entry{hash}{40}{\code {hash}}
\entry{pwd}{40}{\code {pwd}}
\entry{readonly}{40}{\code {readonly}}
\entry{return}{41}{\code {return}}
\entry{shift}{41}{\code {shift}}
\entry{test}{41}{\code {test}}
\entry{[}{41}{\code {[}}
\entry{times}{42}{\code {times}}
\entry{trap}{42}{\code {trap}}
\entry{umask}{43}{\code {umask}}
\entry{unset}{43}{\code {unset}}
\entry{alias}{44}{\code {alias}}
\entry{bind}{44}{\code {bind}}
\entry{builtin}{45}{\code {builtin}}
\entry{caller}{45}{\code {caller}}
\entry{command}{46}{\code {command}}
\entry{declare}{46}{\code {declare}}
\entry{echo}{47}{\code {echo}}
\entry{enable}{48}{\code {enable}}
\entry{help}{48}{\code {help}}
\entry{let}{49}{\code {let}}
\entry{local}{49}{\code {local}}
\entry{logout}{49}{\code {logout}}
\entry{mapfile}{49}{\code {mapfile}}
\entry{printf}{50}{\code {printf}}
\entry{read}{50}{\code {read}}
\entry{readarray}{52}{\code {readarray}}
\entry{source}{52}{\code {source}}
\entry{type}{52}{\code {type}}
\entry{typeset}{52}{\code {typeset}}
\entry{ulimit}{53}{\code {ulimit}}
\entry{unalias}{54}{\code {unalias}}
\entry{set}{54}{\code {set}}
\entry{shopt}{58}{\code {shopt}}
\entry{dirs}{85}{\code {dirs}}
\entry{popd}{86}{\code {popd}}
\entry{pushd}{86}{\code {pushd}}
\entry{bg}{94}{\code {bg}}
\entry{fg}{94}{\code {fg}}
\entry{jobs}{94}{\code {jobs}}
\entry{kill}{95}{\code {kill}}
\entry{wait}{95}{\code {wait}}
\entry{disown}{95}{\code {disown}}
\entry{suspend}{95}{\code {suspend}}
\entry{compgen}{122}{\code {compgen}}
\entry{complete}{123}{\code {complete}}
\entry{compopt}{126}{\code {compopt}}
\entry{fc}{129}{\code {fc}}
\entry{history}{130}{\code {history}}
\entry{:}{41}{\code {:}}
\entry{.}{41}{\code {.}}
\entry{break}{41}{\code {break}}
\entry{cd}{42}{\code {cd}}
\entry{continue}{42}{\code {continue}}
\entry{eval}{42}{\code {eval}}
\entry{exec}{42}{\code {exec}}
\entry{exit}{43}{\code {exit}}
\entry{export}{43}{\code {export}}
\entry{getopts}{43}{\code {getopts}}
\entry{hash}{44}{\code {hash}}
\entry{pwd}{44}{\code {pwd}}
\entry{readonly}{44}{\code {readonly}}
\entry{return}{45}{\code {return}}
\entry{shift}{45}{\code {shift}}
\entry{test}{45}{\code {test}}
\entry{[}{45}{\code {[}}
\entry{times}{46}{\code {times}}
\entry{trap}{46}{\code {trap}}
\entry{umask}{47}{\code {umask}}
\entry{unset}{47}{\code {unset}}
\entry{alias}{48}{\code {alias}}
\entry{bind}{48}{\code {bind}}
\entry{builtin}{49}{\code {builtin}}
\entry{caller}{49}{\code {caller}}
\entry{command}{50}{\code {command}}
\entry{declare}{50}{\code {declare}}
\entry{echo}{51}{\code {echo}}
\entry{enable}{52}{\code {enable}}
\entry{help}{53}{\code {help}}
\entry{let}{53}{\code {let}}
\entry{local}{53}{\code {local}}
\entry{logout}{53}{\code {logout}}
\entry{mapfile}{53}{\code {mapfile}}
\entry{printf}{54}{\code {printf}}
\entry{read}{55}{\code {read}}
\entry{readarray}{56}{\code {readarray}}
\entry{source}{56}{\code {source}}
\entry{type}{56}{\code {type}}
\entry{typeset}{57}{\code {typeset}}
\entry{ulimit}{57}{\code {ulimit}}
\entry{unalias}{58}{\code {unalias}}
\entry{set}{58}{\code {set}}
\entry{shopt}{62}{\code {shopt}}
\entry{dirs}{89}{\code {dirs}}
\entry{popd}{90}{\code {popd}}
\entry{pushd}{90}{\code {pushd}}
\entry{bg}{98}{\code {bg}}
\entry{fg}{98}{\code {fg}}
\entry{jobs}{98}{\code {jobs}}
\entry{kill}{99}{\code {kill}}
\entry{wait}{99}{\code {wait}}
\entry{disown}{99}{\code {disown}}
\entry{suspend}{99}{\code {suspend}}
\entry{compgen}{126}{\code {compgen}}
\entry{complete}{127}{\code {complete}}
\entry{compopt}{130}{\code {compopt}}
\entry{fc}{133}{\code {fc}}
\entry{history}{134}{\code {history}}
+59 -59
View File
@@ -1,80 +1,80 @@
\initial {.}
\entry {\code {.}}{37}
\entry {\code {.}}{41}
\initial {:}
\entry {\code {:}}{37}
\entry {\code {:}}{41}
\initial {[}
\entry {\code {[}}{41}
\entry {\code {[}}{45}
\initial {A}
\entry {\code {alias}}{44}
\entry {\code {alias}}{48}
\initial {B}
\entry {\code {bg}}{94}
\entry {\code {bind}}{44}
\entry {\code {break}}{37}
\entry {\code {builtin}}{45}
\entry {\code {bg}}{98}
\entry {\code {bind}}{48}
\entry {\code {break}}{41}
\entry {\code {builtin}}{49}
\initial {C}
\entry {\code {caller}}{45}
\entry {\code {cd}}{38}
\entry {\code {command}}{46}
\entry {\code {compgen}}{122}
\entry {\code {complete}}{123}
\entry {\code {compopt}}{126}
\entry {\code {continue}}{38}
\entry {\code {caller}}{49}
\entry {\code {cd}}{42}
\entry {\code {command}}{50}
\entry {\code {compgen}}{126}
\entry {\code {complete}}{127}
\entry {\code {compopt}}{130}
\entry {\code {continue}}{42}
\initial {D}
\entry {\code {declare}}{46}
\entry {\code {dirs}}{85}
\entry {\code {disown}}{95}
\entry {\code {declare}}{50}
\entry {\code {dirs}}{89}
\entry {\code {disown}}{99}
\initial {E}
\entry {\code {echo}}{47}
\entry {\code {enable}}{48}
\entry {\code {eval}}{38}
\entry {\code {exec}}{38}
\entry {\code {exit}}{39}
\entry {\code {export}}{39}
\entry {\code {echo}}{51}
\entry {\code {enable}}{52}
\entry {\code {eval}}{42}
\entry {\code {exec}}{42}
\entry {\code {exit}}{43}
\entry {\code {export}}{43}
\initial {F}
\entry {\code {fc}}{129}
\entry {\code {fg}}{94}
\entry {\code {fc}}{133}
\entry {\code {fg}}{98}
\initial {G}
\entry {\code {getopts}}{39}
\entry {\code {getopts}}{43}
\initial {H}
\entry {\code {hash}}{40}
\entry {\code {help}}{48}
\entry {\code {history}}{130}
\entry {\code {hash}}{44}
\entry {\code {help}}{53}
\entry {\code {history}}{134}
\initial {J}
\entry {\code {jobs}}{94}
\entry {\code {jobs}}{98}
\initial {K}
\entry {\code {kill}}{95}
\entry {\code {kill}}{99}
\initial {L}
\entry {\code {let}}{49}
\entry {\code {local}}{49}
\entry {\code {logout}}{49}
\entry {\code {let}}{53}
\entry {\code {local}}{53}
\entry {\code {logout}}{53}
\initial {M}
\entry {\code {mapfile}}{49}
\entry {\code {mapfile}}{53}
\initial {P}
\entry {\code {popd}}{86}
\entry {\code {printf}}{50}
\entry {\code {pushd}}{86}
\entry {\code {pwd}}{40}
\entry {\code {popd}}{90}
\entry {\code {printf}}{54}
\entry {\code {pushd}}{90}
\entry {\code {pwd}}{44}
\initial {R}
\entry {\code {read}}{50}
\entry {\code {readarray}}{52}
\entry {\code {readonly}}{40}
\entry {\code {return}}{41}
\entry {\code {read}}{55}
\entry {\code {readarray}}{56}
\entry {\code {readonly}}{44}
\entry {\code {return}}{45}
\initial {S}
\entry {\code {set}}{54}
\entry {\code {shift}}{41}
\entry {\code {shopt}}{58}
\entry {\code {source}}{52}
\entry {\code {suspend}}{95}
\entry {\code {set}}{58}
\entry {\code {shift}}{45}
\entry {\code {shopt}}{62}
\entry {\code {source}}{56}
\entry {\code {suspend}}{99}
\initial {T}
\entry {\code {test}}{41}
\entry {\code {times}}{42}
\entry {\code {trap}}{42}
\entry {\code {type}}{52}
\entry {\code {typeset}}{52}
\entry {\code {test}}{45}
\entry {\code {times}}{46}
\entry {\code {trap}}{46}
\entry {\code {type}}{56}
\entry {\code {typeset}}{57}
\initial {U}
\entry {\code {ulimit}}{53}
\entry {\code {umask}}{43}
\entry {\code {unalias}}{54}
\entry {\code {unset}}{43}
\entry {\code {ulimit}}{57}
\entry {\code {umask}}{47}
\entry {\code {unalias}}{58}
\entry {\code {unset}}{47}
\initial {W}
\entry {\code {wait}}{95}
\entry {\code {wait}}{99}
+68 -68
View File
@@ -42,77 +42,77 @@
\entry{parameters}{18}{parameters}
\entry{variable, shell}{18}{variable, shell}
\entry{shell variable}{18}{shell variable}
\entry{parameters, positional}{18}{parameters, positional}
\entry{parameters, positional}{19}{parameters, positional}
\entry{parameters, special}{19}{parameters, special}
\entry{expansion}{20}{expansion}
\entry{brace expansion}{20}{brace expansion}
\entry{expansion, brace}{20}{expansion, brace}
\entry{brace expansion}{21}{brace expansion}
\entry{expansion, brace}{21}{expansion, brace}
\entry{tilde expansion}{21}{tilde expansion}
\entry{expansion, tilde}{21}{expansion, tilde}
\entry{parameter expansion}{22}{parameter expansion}
\entry{expansion, parameter}{22}{expansion, parameter}
\entry{command substitution}{25}{command substitution}
\entry{expansion, arithmetic}{25}{expansion, arithmetic}
\entry{arithmetic expansion}{25}{arithmetic expansion}
\entry{process substitution}{25}{process substitution}
\entry{word splitting}{26}{word splitting}
\entry{expansion, filename}{26}{expansion, filename}
\entry{expansion, pathname}{26}{expansion, pathname}
\entry{filename expansion}{26}{filename expansion}
\entry{pathname expansion}{26}{pathname expansion}
\entry{pattern matching}{27}{pattern matching}
\entry{matching, pattern}{27}{matching, pattern}
\entry{redirection}{28}{redirection}
\entry{command expansion}{32}{command expansion}
\entry{command execution}{33}{command execution}
\entry{command search}{33}{command search}
\entry{execution environment}{33}{execution environment}
\entry{environment}{34}{environment}
\entry{exit status}{35}{exit status}
\entry{signal handling}{35}{signal handling}
\entry{shell script}{36}{shell script}
\entry{special builtin}{63}{special builtin}
\entry{login shell}{77}{login shell}
\entry{interactive shell}{77}{interactive shell}
\entry{startup files}{77}{startup files}
\entry{interactive shell}{78}{interactive shell}
\entry{shell, interactive}{78}{shell, interactive}
\entry{expressions, conditional}{80}{expressions, conditional}
\entry{arithmetic, shell}{82}{arithmetic, shell}
\entry{shell arithmetic}{82}{shell arithmetic}
\entry{expressions, arithmetic}{82}{expressions, arithmetic}
\entry{evaluation, arithmetic}{82}{evaluation, arithmetic}
\entry{arithmetic evaluation}{82}{arithmetic evaluation}
\entry{alias expansion}{83}{alias expansion}
\entry{arrays}{84}{arrays}
\entry{directory stack}{85}{directory stack}
\entry{prompting}{87}{prompting}
\entry{restricted shell}{88}{restricted shell}
\entry{POSIX Mode}{88}{POSIX Mode}
\entry{job control}{93}{job control}
\entry{foreground}{93}{foreground}
\entry{background}{93}{background}
\entry{suspending jobs}{93}{suspending jobs}
\entry{Readline, how to use}{96}{Readline, how to use}
\entry{interaction, readline}{97}{interaction, readline}
\entry{notation, readline}{98}{notation, readline}
\entry{command editing}{98}{command editing}
\entry{editing command lines}{98}{editing command lines}
\entry{killing text}{99}{killing text}
\entry{yanking text}{99}{yanking text}
\entry{kill ring}{99}{kill ring}
\entry{initialization file, readline}{100}{initialization file, readline}
\entry{variables, readline}{101}{variables, readline}
\entry{programmable completion}{120}{programmable completion}
\entry{completion builtins}{122}{completion builtins}
\entry{History, how to use}{128}{History, how to use}
\entry{command history}{129}{command history}
\entry{history list}{129}{history list}
\entry{history builtins}{129}{history builtins}
\entry{history expansion}{131}{history expansion}
\entry{event designators}{132}{event designators}
\entry{history events}{132}{history events}
\entry{installation}{135}{installation}
\entry{configuration}{135}{configuration}
\entry{Bash installation}{135}{Bash installation}
\entry{Bash configuration}{135}{Bash configuration}
\entry{command substitution}{27}{command substitution}
\entry{expansion, arithmetic}{28}{expansion, arithmetic}
\entry{arithmetic expansion}{28}{arithmetic expansion}
\entry{process substitution}{28}{process substitution}
\entry{word splitting}{28}{word splitting}
\entry{expansion, filename}{29}{expansion, filename}
\entry{expansion, pathname}{29}{expansion, pathname}
\entry{filename expansion}{29}{filename expansion}
\entry{pathname expansion}{29}{pathname expansion}
\entry{pattern matching}{29}{pattern matching}
\entry{matching, pattern}{29}{matching, pattern}
\entry{redirection}{31}{redirection}
\entry{command expansion}{34}{command expansion}
\entry{command execution}{35}{command execution}
\entry{command search}{35}{command search}
\entry{execution environment}{36}{execution environment}
\entry{environment}{37}{environment}
\entry{exit status}{37}{exit status}
\entry{signal handling}{38}{signal handling}
\entry{shell script}{38}{shell script}
\entry{special builtin}{67}{special builtin}
\entry{login shell}{81}{login shell}
\entry{interactive shell}{81}{interactive shell}
\entry{startup files}{81}{startup files}
\entry{interactive shell}{82}{interactive shell}
\entry{shell, interactive}{82}{shell, interactive}
\entry{expressions, conditional}{84}{expressions, conditional}
\entry{arithmetic, shell}{86}{arithmetic, shell}
\entry{shell arithmetic}{86}{shell arithmetic}
\entry{expressions, arithmetic}{86}{expressions, arithmetic}
\entry{evaluation, arithmetic}{86}{evaluation, arithmetic}
\entry{arithmetic evaluation}{86}{arithmetic evaluation}
\entry{alias expansion}{87}{alias expansion}
\entry{arrays}{88}{arrays}
\entry{directory stack}{89}{directory stack}
\entry{prompting}{91}{prompting}
\entry{restricted shell}{92}{restricted shell}
\entry{POSIX Mode}{92}{POSIX Mode}
\entry{job control}{97}{job control}
\entry{foreground}{97}{foreground}
\entry{background}{97}{background}
\entry{suspending jobs}{97}{suspending jobs}
\entry{Readline, how to use}{100}{Readline, how to use}
\entry{interaction, readline}{101}{interaction, readline}
\entry{notation, readline}{102}{notation, readline}
\entry{command editing}{102}{command editing}
\entry{editing command lines}{102}{editing command lines}
\entry{killing text}{103}{killing text}
\entry{yanking text}{103}{yanking text}
\entry{kill ring}{103}{kill ring}
\entry{initialization file, readline}{104}{initialization file, readline}
\entry{variables, readline}{105}{variables, readline}
\entry{programmable completion}{124}{programmable completion}
\entry{completion builtins}{126}{completion builtins}
\entry{History, how to use}{132}{History, how to use}
\entry{command history}{133}{command history}
\entry{history list}{133}{history list}
\entry{history builtins}{133}{history builtins}
\entry{history expansion}{135}{history expansion}
\entry{event designators}{136}{event designators}
\entry{history events}{136}{history events}
\entry{installation}{139}{installation}
\entry{configuration}{139}{configuration}
\entry{Bash installation}{139}{Bash installation}
\entry{Bash configuration}{139}{Bash configuration}
+67 -67
View File
@@ -1,23 +1,23 @@
\initial {A}
\entry {alias expansion}{83}
\entry {arithmetic evaluation}{82}
\entry {arithmetic expansion}{25}
\entry {arithmetic, shell}{82}
\entry {arrays}{84}
\entry {alias expansion}{87}
\entry {arithmetic evaluation}{86}
\entry {arithmetic expansion}{28}
\entry {arithmetic, shell}{86}
\entry {arrays}{88}
\initial {B}
\entry {background}{93}
\entry {Bash configuration}{135}
\entry {Bash installation}{135}
\entry {background}{97}
\entry {Bash configuration}{139}
\entry {Bash installation}{139}
\entry {Bourne shell}{5}
\entry {brace expansion}{20}
\entry {brace expansion}{21}
\entry {builtin}{3}
\initial {C}
\entry {command editing}{98}
\entry {command execution}{33}
\entry {command expansion}{32}
\entry {command history}{129}
\entry {command search}{33}
\entry {command substitution}{25}
\entry {command editing}{102}
\entry {command execution}{35}
\entry {command expansion}{34}
\entry {command history}{133}
\entry {command search}{35}
\entry {command substitution}{27}
\entry {command timing}{8}
\entry {commands, compound}{9}
\entry {commands, conditional}{10}
@@ -28,109 +28,109 @@
\entry {commands, shell}{8}
\entry {commands, simple}{8}
\entry {comments, shell}{7}
\entry {completion builtins}{122}
\entry {configuration}{135}
\entry {completion builtins}{126}
\entry {configuration}{139}
\entry {control operator}{3}
\entry {coprocess}{15}
\initial {D}
\entry {directory stack}{85}
\entry {directory stack}{89}
\initial {E}
\entry {editing command lines}{98}
\entry {environment}{34}
\entry {evaluation, arithmetic}{82}
\entry {event designators}{132}
\entry {execution environment}{33}
\entry {exit status}{3, 35}
\entry {editing command lines}{102}
\entry {environment}{37}
\entry {evaluation, arithmetic}{86}
\entry {event designators}{136}
\entry {execution environment}{36}
\entry {exit status}{3, 37}
\entry {expansion}{20}
\entry {expansion, arithmetic}{25}
\entry {expansion, brace}{20}
\entry {expansion, filename}{26}
\entry {expansion, arithmetic}{28}
\entry {expansion, brace}{21}
\entry {expansion, filename}{29}
\entry {expansion, parameter}{22}
\entry {expansion, pathname}{26}
\entry {expansion, pathname}{29}
\entry {expansion, tilde}{21}
\entry {expressions, arithmetic}{82}
\entry {expressions, conditional}{80}
\entry {expressions, arithmetic}{86}
\entry {expressions, conditional}{84}
\initial {F}
\entry {field}{3}
\entry {filename}{3}
\entry {filename expansion}{26}
\entry {foreground}{93}
\entry {filename expansion}{29}
\entry {foreground}{97}
\entry {functions, shell}{16}
\initial {H}
\entry {history builtins}{129}
\entry {history events}{132}
\entry {history expansion}{131}
\entry {history list}{129}
\entry {History, how to use}{128}
\entry {history builtins}{133}
\entry {history events}{136}
\entry {history expansion}{135}
\entry {history list}{133}
\entry {History, how to use}{132}
\initial {I}
\entry {identifier}{3}
\entry {initialization file, readline}{100}
\entry {installation}{135}
\entry {interaction, readline}{97}
\entry {interactive shell}{77, 78}
\entry {initialization file, readline}{104}
\entry {installation}{139}
\entry {interaction, readline}{101}
\entry {interactive shell}{81, 82}
\entry {internationalization}{7}
\initial {J}
\entry {job}{3}
\entry {job control}{3, 93}
\entry {job control}{3, 97}
\initial {K}
\entry {kill ring}{99}
\entry {killing text}{99}
\entry {kill ring}{103}
\entry {killing text}{103}
\initial {L}
\entry {localization}{7}
\entry {login shell}{77}
\entry {login shell}{81}
\initial {M}
\entry {matching, pattern}{27}
\entry {matching, pattern}{29}
\entry {metacharacter}{3}
\initial {N}
\entry {name}{3}
\entry {native languages}{7}
\entry {notation, readline}{98}
\entry {notation, readline}{102}
\initial {O}
\entry {operator, shell}{3}
\initial {P}
\entry {parameter expansion}{22}
\entry {parameters}{18}
\entry {parameters, positional}{18}
\entry {parameters, positional}{19}
\entry {parameters, special}{19}
\entry {pathname expansion}{26}
\entry {pattern matching}{27}
\entry {pathname expansion}{29}
\entry {pattern matching}{29}
\entry {pipeline}{8}
\entry {POSIX}{3}
\entry {POSIX Mode}{88}
\entry {POSIX Mode}{92}
\entry {process group}{3}
\entry {process group ID}{3}
\entry {process substitution}{25}
\entry {programmable completion}{120}
\entry {prompting}{87}
\entry {process substitution}{28}
\entry {programmable completion}{124}
\entry {prompting}{91}
\initial {Q}
\entry {quoting}{6}
\entry {quoting, ANSI}{6}
\initial {R}
\entry {Readline, how to use}{96}
\entry {redirection}{28}
\entry {Readline, how to use}{100}
\entry {redirection}{31}
\entry {reserved word}{3}
\entry {restricted shell}{88}
\entry {restricted shell}{92}
\entry {return status}{4}
\initial {S}
\entry {shell arithmetic}{82}
\entry {shell arithmetic}{86}
\entry {shell function}{16}
\entry {shell script}{36}
\entry {shell script}{38}
\entry {shell variable}{18}
\entry {shell, interactive}{78}
\entry {shell, interactive}{82}
\entry {signal}{4}
\entry {signal handling}{35}
\entry {special builtin}{4, 63}
\entry {startup files}{77}
\entry {suspending jobs}{93}
\entry {signal handling}{38}
\entry {special builtin}{4, 67}
\entry {startup files}{81}
\entry {suspending jobs}{97}
\initial {T}
\entry {tilde expansion}{21}
\entry {token}{4}
\entry {translation, native languages}{7}
\initial {V}
\entry {variable, shell}{18}
\entry {variables, readline}{101}
\entry {variables, readline}{105}
\initial {W}
\entry {word}{4}
\entry {word splitting}{26}
\entry {word splitting}{28}
\initial {Y}
\entry {yanking text}{99}
\entry {yanking text}{103}
BIN
View File
Binary file not shown.
+106 -106
View File
@@ -1,106 +1,106 @@
\entry{beginning-of-line (C-a)}{111}{\code {beginning-of-line (C-a)}}
\entry{end-of-line (C-e)}{111}{\code {end-of-line (C-e)}}
\entry{forward-char (C-f)}{111}{\code {forward-char (C-f)}}
\entry{backward-char (C-b)}{111}{\code {backward-char (C-b)}}
\entry{forward-word (M-f)}{111}{\code {forward-word (M-f)}}
\entry{backward-word (M-b)}{111}{\code {backward-word (M-b)}}
\entry{shell-forward-word ()}{111}{\code {shell-forward-word ()}}
\entry{shell-backward-word ()}{111}{\code {shell-backward-word ()}}
\entry{clear-screen (C-l)}{111}{\code {clear-screen (C-l)}}
\entry{redraw-current-line ()}{111}{\code {redraw-current-line ()}}
\entry{accept-line (Newline or Return)}{112}{\code {accept-line (Newline or Return)}}
\entry{previous-history (C-p)}{112}{\code {previous-history (C-p)}}
\entry{next-history (C-n)}{112}{\code {next-history (C-n)}}
\entry{beginning-of-history (M-<)}{112}{\code {beginning-of-history (M-<)}}
\entry{end-of-history (M->)}{112}{\code {end-of-history (M->)}}
\entry{reverse-search-history (C-r)}{112}{\code {reverse-search-history (C-r)}}
\entry{forward-search-history (C-s)}{112}{\code {forward-search-history (C-s)}}
\entry{non-incremental-reverse-search-history (M-p)}{112}{\code {non-incremental-reverse-search-history (M-p)}}
\entry{non-incremental-forward-search-history (M-n)}{112}{\code {non-incremental-forward-search-history (M-n)}}
\entry{history-search-forward ()}{112}{\code {history-search-forward ()}}
\entry{history-search-backward ()}{112}{\code {history-search-backward ()}}
\entry{history-substr-search-forward ()}{112}{\code {history-substr-search-forward ()}}
\entry{history-substr-search-backward ()}{113}{\code {history-substr-search-backward ()}}
\entry{yank-nth-arg (M-C-y)}{113}{\code {yank-nth-arg (M-C-y)}}
\entry{yank-last-arg (M-. or M-_)}{113}{\code {yank-last-arg (M-. or M-_)}}
\entry{delete-char (C-d)}{113}{\code {delete-char (C-d)}}
\entry{backward-delete-char (Rubout)}{113}{\code {backward-delete-char (Rubout)}}
\entry{forward-backward-delete-char ()}{113}{\code {forward-backward-delete-char ()}}
\entry{quoted-insert (C-q or C-v)}{113}{\code {quoted-insert (C-q or C-v)}}
\entry{self-insert (a, b, A, 1, !, ...{})}{113}{\code {self-insert (a, b, A, 1, !, \dots {})}}
\entry{transpose-chars (C-t)}{114}{\code {transpose-chars (C-t)}}
\entry{transpose-words (M-t)}{114}{\code {transpose-words (M-t)}}
\entry{upcase-word (M-u)}{114}{\code {upcase-word (M-u)}}
\entry{downcase-word (M-l)}{114}{\code {downcase-word (M-l)}}
\entry{capitalize-word (M-c)}{114}{\code {capitalize-word (M-c)}}
\entry{overwrite-mode ()}{114}{\code {overwrite-mode ()}}
\entry{kill-line (C-k)}{114}{\code {kill-line (C-k)}}
\entry{backward-kill-line (C-x Rubout)}{114}{\code {backward-kill-line (C-x Rubout)}}
\entry{unix-line-discard (C-u)}{114}{\code {unix-line-discard (C-u)}}
\entry{kill-whole-line ()}{114}{\code {kill-whole-line ()}}
\entry{kill-word (M-d)}{114}{\code {kill-word (M-d)}}
\entry{backward-kill-word (M-DEL)}{115}{\code {backward-kill-word (M-\key {DEL})}}
\entry{shell-kill-word ()}{115}{\code {shell-kill-word ()}}
\entry{shell-backward-kill-word ()}{115}{\code {shell-backward-kill-word ()}}
\entry{unix-word-rubout (C-w)}{115}{\code {unix-word-rubout (C-w)}}
\entry{unix-filename-rubout ()}{115}{\code {unix-filename-rubout ()}}
\entry{delete-horizontal-space ()}{115}{\code {delete-horizontal-space ()}}
\entry{kill-region ()}{115}{\code {kill-region ()}}
\entry{copy-region-as-kill ()}{115}{\code {copy-region-as-kill ()}}
\entry{copy-backward-word ()}{115}{\code {copy-backward-word ()}}
\entry{copy-forward-word ()}{115}{\code {copy-forward-word ()}}
\entry{yank (C-y)}{115}{\code {yank (C-y)}}
\entry{yank-pop (M-y)}{115}{\code {yank-pop (M-y)}}
\entry{digit-argument (M-0, M-1, ...{} M--)}{115}{\code {digit-argument (\kbd {M-0}, \kbd {M-1}, \dots {} \kbd {M--})}}
\entry{universal-argument ()}{115}{\code {universal-argument ()}}
\entry{complete (TAB)}{116}{\code {complete (\key {TAB})}}
\entry{possible-completions (M-?)}{116}{\code {possible-completions (M-?)}}
\entry{insert-completions (M-*)}{116}{\code {insert-completions (M-*)}}
\entry{menu-complete ()}{116}{\code {menu-complete ()}}
\entry{menu-complete-backward ()}{116}{\code {menu-complete-backward ()}}
\entry{delete-char-or-list ()}{116}{\code {delete-char-or-list ()}}
\entry{complete-filename (M-/)}{116}{\code {complete-filename (M-/)}}
\entry{possible-filename-completions (C-x /)}{116}{\code {possible-filename-completions (C-x /)}}
\entry{complete-username (M-~)}{117}{\code {complete-username (M-~)}}
\entry{possible-username-completions (C-x ~)}{117}{\code {possible-username-completions (C-x ~)}}
\entry{complete-variable (M-$)}{117}{\code {complete-variable (M-$)}}
\entry{possible-variable-completions (C-x $)}{117}{\code {possible-variable-completions (C-x $)}}
\entry{complete-hostname (M-@)}{117}{\code {complete-hostname (M-@)}}
\entry{possible-hostname-completions (C-x @)}{117}{\code {possible-hostname-completions (C-x @)}}
\entry{complete-command (M-!)}{117}{\code {complete-command (M-!)}}
\entry{possible-command-completions (C-x !)}{117}{\code {possible-command-completions (C-x !)}}
\entry{dynamic-complete-history (M-TAB)}{117}{\code {dynamic-complete-history (M-\key {TAB})}}
\entry{dabbrev-expand ()}{117}{\code {dabbrev-expand ()}}
\entry{complete-into-braces (M-{\tt \char 123})}{117}{\code {complete-into-braces (M-{\tt \char 123})}}
\entry{start-kbd-macro (C-x ()}{117}{\code {start-kbd-macro (C-x ()}}
\entry{end-kbd-macro (C-x ))}{117}{\code {end-kbd-macro (C-x ))}}
\entry{call-last-kbd-macro (C-x e)}{117}{\code {call-last-kbd-macro (C-x e)}}
\entry{print-last-kbd-macro ()}{118}{\code {print-last-kbd-macro ()}}
\entry{re-read-init-file (C-x C-r)}{118}{\code {re-read-init-file (C-x C-r)}}
\entry{abort (C-g)}{118}{\code {abort (C-g)}}
\entry{do-uppercase-version (M-a, M-b, M-x, ...{})}{118}{\code {do-uppercase-version (M-a, M-b, M-\var {x}, \dots {})}}
\entry{prefix-meta (ESC)}{118}{\code {prefix-meta (\key {ESC})}}
\entry{undo (C-_ or C-x C-u)}{118}{\code {undo (C-_ or C-x C-u)}}
\entry{revert-line (M-r)}{118}{\code {revert-line (M-r)}}
\entry{tilde-expand (M-&)}{118}{\code {tilde-expand (M-&)}}
\entry{set-mark (C-@)}{118}{\code {set-mark (C-@)}}
\entry{exchange-point-and-mark (C-x C-x)}{118}{\code {exchange-point-and-mark (C-x C-x)}}
\entry{character-search (C-])}{118}{\code {character-search (C-])}}
\entry{character-search-backward (M-C-])}{118}{\code {character-search-backward (M-C-])}}
\entry{skip-csi-sequence ()}{118}{\code {skip-csi-sequence ()}}
\entry{insert-comment (M-#)}{119}{\code {insert-comment (M-#)}}
\entry{dump-functions ()}{119}{\code {dump-functions ()}}
\entry{dump-variables ()}{119}{\code {dump-variables ()}}
\entry{dump-macros ()}{119}{\code {dump-macros ()}}
\entry{glob-complete-word (M-g)}{119}{\code {glob-complete-word (M-g)}}
\entry{glob-expand-word (C-x *)}{119}{\code {glob-expand-word (C-x *)}}
\entry{glob-list-expansions (C-x g)}{119}{\code {glob-list-expansions (C-x g)}}
\entry{display-shell-version (C-x C-v)}{119}{\code {display-shell-version (C-x C-v)}}
\entry{shell-expand-line (M-C-e)}{119}{\code {shell-expand-line (M-C-e)}}
\entry{history-expand-line (M-^)}{119}{\code {history-expand-line (M-^)}}
\entry{magic-space ()}{120}{\code {magic-space ()}}
\entry{alias-expand-line ()}{120}{\code {alias-expand-line ()}}
\entry{history-and-alias-expand-line ()}{120}{\code {history-and-alias-expand-line ()}}
\entry{insert-last-argument (M-. or M-_)}{120}{\code {insert-last-argument (M-. or M-_)}}
\entry{operate-and-get-next (C-o)}{120}{\code {operate-and-get-next (C-o)}}
\entry{edit-and-execute-command (C-xC-e)}{120}{\code {edit-and-execute-command (C-xC-e)}}
\entry{beginning-of-line (C-a)}{115}{\code {beginning-of-line (C-a)}}
\entry{end-of-line (C-e)}{115}{\code {end-of-line (C-e)}}
\entry{forward-char (C-f)}{115}{\code {forward-char (C-f)}}
\entry{backward-char (C-b)}{115}{\code {backward-char (C-b)}}
\entry{forward-word (M-f)}{115}{\code {forward-word (M-f)}}
\entry{backward-word (M-b)}{115}{\code {backward-word (M-b)}}
\entry{shell-forward-word ()}{115}{\code {shell-forward-word ()}}
\entry{shell-backward-word ()}{115}{\code {shell-backward-word ()}}
\entry{clear-screen (C-l)}{115}{\code {clear-screen (C-l)}}
\entry{redraw-current-line ()}{115}{\code {redraw-current-line ()}}
\entry{accept-line (Newline or Return)}{116}{\code {accept-line (Newline or Return)}}
\entry{previous-history (C-p)}{116}{\code {previous-history (C-p)}}
\entry{next-history (C-n)}{116}{\code {next-history (C-n)}}
\entry{beginning-of-history (M-<)}{116}{\code {beginning-of-history (M-<)}}
\entry{end-of-history (M->)}{116}{\code {end-of-history (M->)}}
\entry{reverse-search-history (C-r)}{116}{\code {reverse-search-history (C-r)}}
\entry{forward-search-history (C-s)}{116}{\code {forward-search-history (C-s)}}
\entry{non-incremental-reverse-search-history (M-p)}{116}{\code {non-incremental-reverse-search-history (M-p)}}
\entry{non-incremental-forward-search-history (M-n)}{116}{\code {non-incremental-forward-search-history (M-n)}}
\entry{history-search-forward ()}{116}{\code {history-search-forward ()}}
\entry{history-search-backward ()}{116}{\code {history-search-backward ()}}
\entry{history-substr-search-forward ()}{116}{\code {history-substr-search-forward ()}}
\entry{history-substr-search-backward ()}{117}{\code {history-substr-search-backward ()}}
\entry{yank-nth-arg (M-C-y)}{117}{\code {yank-nth-arg (M-C-y)}}
\entry{yank-last-arg (M-. or M-_)}{117}{\code {yank-last-arg (M-. or M-_)}}
\entry{delete-char (C-d)}{117}{\code {delete-char (C-d)}}
\entry{backward-delete-char (Rubout)}{117}{\code {backward-delete-char (Rubout)}}
\entry{forward-backward-delete-char ()}{117}{\code {forward-backward-delete-char ()}}
\entry{quoted-insert (C-q or C-v)}{117}{\code {quoted-insert (C-q or C-v)}}
\entry{self-insert (a, b, A, 1, !, ...{})}{117}{\code {self-insert (a, b, A, 1, !, \dots {})}}
\entry{transpose-chars (C-t)}{118}{\code {transpose-chars (C-t)}}
\entry{transpose-words (M-t)}{118}{\code {transpose-words (M-t)}}
\entry{upcase-word (M-u)}{118}{\code {upcase-word (M-u)}}
\entry{downcase-word (M-l)}{118}{\code {downcase-word (M-l)}}
\entry{capitalize-word (M-c)}{118}{\code {capitalize-word (M-c)}}
\entry{overwrite-mode ()}{118}{\code {overwrite-mode ()}}
\entry{kill-line (C-k)}{118}{\code {kill-line (C-k)}}
\entry{backward-kill-line (C-x Rubout)}{118}{\code {backward-kill-line (C-x Rubout)}}
\entry{unix-line-discard (C-u)}{118}{\code {unix-line-discard (C-u)}}
\entry{kill-whole-line ()}{118}{\code {kill-whole-line ()}}
\entry{kill-word (M-d)}{118}{\code {kill-word (M-d)}}
\entry{backward-kill-word (M-DEL)}{119}{\code {backward-kill-word (M-\key {DEL})}}
\entry{shell-kill-word ()}{119}{\code {shell-kill-word ()}}
\entry{shell-backward-kill-word ()}{119}{\code {shell-backward-kill-word ()}}
\entry{unix-word-rubout (C-w)}{119}{\code {unix-word-rubout (C-w)}}
\entry{unix-filename-rubout ()}{119}{\code {unix-filename-rubout ()}}
\entry{delete-horizontal-space ()}{119}{\code {delete-horizontal-space ()}}
\entry{kill-region ()}{119}{\code {kill-region ()}}
\entry{copy-region-as-kill ()}{119}{\code {copy-region-as-kill ()}}
\entry{copy-backward-word ()}{119}{\code {copy-backward-word ()}}
\entry{copy-forward-word ()}{119}{\code {copy-forward-word ()}}
\entry{yank (C-y)}{119}{\code {yank (C-y)}}
\entry{yank-pop (M-y)}{119}{\code {yank-pop (M-y)}}
\entry{digit-argument (M-0, M-1, ...{} M--)}{119}{\code {digit-argument (\kbd {M-0}, \kbd {M-1}, \dots {} \kbd {M--})}}
\entry{universal-argument ()}{119}{\code {universal-argument ()}}
\entry{complete (TAB)}{120}{\code {complete (\key {TAB})}}
\entry{possible-completions (M-?)}{120}{\code {possible-completions (M-?)}}
\entry{insert-completions (M-*)}{120}{\code {insert-completions (M-*)}}
\entry{menu-complete ()}{120}{\code {menu-complete ()}}
\entry{menu-complete-backward ()}{120}{\code {menu-complete-backward ()}}
\entry{delete-char-or-list ()}{120}{\code {delete-char-or-list ()}}
\entry{complete-filename (M-/)}{120}{\code {complete-filename (M-/)}}
\entry{possible-filename-completions (C-x /)}{120}{\code {possible-filename-completions (C-x /)}}
\entry{complete-username (M-~)}{121}{\code {complete-username (M-~)}}
\entry{possible-username-completions (C-x ~)}{121}{\code {possible-username-completions (C-x ~)}}
\entry{complete-variable (M-$)}{121}{\code {complete-variable (M-$)}}
\entry{possible-variable-completions (C-x $)}{121}{\code {possible-variable-completions (C-x $)}}
\entry{complete-hostname (M-@)}{121}{\code {complete-hostname (M-@)}}
\entry{possible-hostname-completions (C-x @)}{121}{\code {possible-hostname-completions (C-x @)}}
\entry{complete-command (M-!)}{121}{\code {complete-command (M-!)}}
\entry{possible-command-completions (C-x !)}{121}{\code {possible-command-completions (C-x !)}}
\entry{dynamic-complete-history (M-TAB)}{121}{\code {dynamic-complete-history (M-\key {TAB})}}
\entry{dabbrev-expand ()}{121}{\code {dabbrev-expand ()}}
\entry{complete-into-braces (M-{\tt \char 123})}{121}{\code {complete-into-braces (M-{\tt \char 123})}}
\entry{start-kbd-macro (C-x ()}{121}{\code {start-kbd-macro (C-x ()}}
\entry{end-kbd-macro (C-x ))}{121}{\code {end-kbd-macro (C-x ))}}
\entry{call-last-kbd-macro (C-x e)}{121}{\code {call-last-kbd-macro (C-x e)}}
\entry{print-last-kbd-macro ()}{122}{\code {print-last-kbd-macro ()}}
\entry{re-read-init-file (C-x C-r)}{122}{\code {re-read-init-file (C-x C-r)}}
\entry{abort (C-g)}{122}{\code {abort (C-g)}}
\entry{do-uppercase-version (M-a, M-b, M-x, ...{})}{122}{\code {do-uppercase-version (M-a, M-b, M-\var {x}, \dots {})}}
\entry{prefix-meta (ESC)}{122}{\code {prefix-meta (\key {ESC})}}
\entry{undo (C-_ or C-x C-u)}{122}{\code {undo (C-_ or C-x C-u)}}
\entry{revert-line (M-r)}{122}{\code {revert-line (M-r)}}
\entry{tilde-expand (M-&)}{122}{\code {tilde-expand (M-&)}}
\entry{set-mark (C-@)}{122}{\code {set-mark (C-@)}}
\entry{exchange-point-and-mark (C-x C-x)}{122}{\code {exchange-point-and-mark (C-x C-x)}}
\entry{character-search (C-])}{122}{\code {character-search (C-])}}
\entry{character-search-backward (M-C-])}{122}{\code {character-search-backward (M-C-])}}
\entry{skip-csi-sequence ()}{122}{\code {skip-csi-sequence ()}}
\entry{insert-comment (M-#)}{123}{\code {insert-comment (M-#)}}
\entry{dump-functions ()}{123}{\code {dump-functions ()}}
\entry{dump-variables ()}{123}{\code {dump-variables ()}}
\entry{dump-macros ()}{123}{\code {dump-macros ()}}
\entry{glob-complete-word (M-g)}{123}{\code {glob-complete-word (M-g)}}
\entry{glob-expand-word (C-x *)}{123}{\code {glob-expand-word (C-x *)}}
\entry{glob-list-expansions (C-x g)}{123}{\code {glob-list-expansions (C-x g)}}
\entry{display-shell-version (C-x C-v)}{123}{\code {display-shell-version (C-x C-v)}}
\entry{shell-expand-line (M-C-e)}{123}{\code {shell-expand-line (M-C-e)}}
\entry{history-expand-line (M-^)}{123}{\code {history-expand-line (M-^)}}
\entry{magic-space ()}{124}{\code {magic-space ()}}
\entry{alias-expand-line ()}{124}{\code {alias-expand-line ()}}
\entry{history-and-alias-expand-line ()}{124}{\code {history-and-alias-expand-line ()}}
\entry{insert-last-argument (M-. or M-_)}{124}{\code {insert-last-argument (M-. or M-_)}}
\entry{operate-and-get-next (C-o)}{124}{\code {operate-and-get-next (C-o)}}
\entry{edit-and-execute-command (C-xC-e)}{124}{\code {edit-and-execute-command (C-xC-e)}}
+106 -106
View File
@@ -1,126 +1,126 @@
\initial {A}
\entry {\code {abort (C-g)}}{118}
\entry {\code {accept-line (Newline or Return)}}{112}
\entry {\code {alias-expand-line ()}}{120}
\entry {\code {abort (C-g)}}{122}
\entry {\code {accept-line (Newline or Return)}}{116}
\entry {\code {alias-expand-line ()}}{124}
\initial {B}
\entry {\code {backward-char (C-b)}}{111}
\entry {\code {backward-delete-char (Rubout)}}{113}
\entry {\code {backward-kill-line (C-x Rubout)}}{114}
\entry {\code {backward-kill-word (M-\key {DEL})}}{115}
\entry {\code {backward-word (M-b)}}{111}
\entry {\code {beginning-of-history (M-<)}}{112}
\entry {\code {beginning-of-line (C-a)}}{111}
\entry {\code {backward-char (C-b)}}{115}
\entry {\code {backward-delete-char (Rubout)}}{117}
\entry {\code {backward-kill-line (C-x Rubout)}}{118}
\entry {\code {backward-kill-word (M-\key {DEL})}}{119}
\entry {\code {backward-word (M-b)}}{115}
\entry {\code {beginning-of-history (M-<)}}{116}
\entry {\code {beginning-of-line (C-a)}}{115}
\initial {C}
\entry {\code {call-last-kbd-macro (C-x e)}}{117}
\entry {\code {capitalize-word (M-c)}}{114}
\entry {\code {character-search (C-])}}{118}
\entry {\code {character-search-backward (M-C-])}}{118}
\entry {\code {clear-screen (C-l)}}{111}
\entry {\code {complete (\key {TAB})}}{116}
\entry {\code {complete-command (M-!)}}{117}
\entry {\code {complete-filename (M-/)}}{116}
\entry {\code {complete-hostname (M-@)}}{117}
\entry {\code {complete-into-braces (M-{\tt \char 123})}}{117}
\entry {\code {complete-username (M-~)}}{117}
\entry {\code {complete-variable (M-$)}}{117}
\entry {\code {copy-backward-word ()}}{115}
\entry {\code {copy-forward-word ()}}{115}
\entry {\code {copy-region-as-kill ()}}{115}
\entry {\code {call-last-kbd-macro (C-x e)}}{121}
\entry {\code {capitalize-word (M-c)}}{118}
\entry {\code {character-search (C-])}}{122}
\entry {\code {character-search-backward (M-C-])}}{122}
\entry {\code {clear-screen (C-l)}}{115}
\entry {\code {complete (\key {TAB})}}{120}
\entry {\code {complete-command (M-!)}}{121}
\entry {\code {complete-filename (M-/)}}{120}
\entry {\code {complete-hostname (M-@)}}{121}
\entry {\code {complete-into-braces (M-{\tt \char 123})}}{121}
\entry {\code {complete-username (M-~)}}{121}
\entry {\code {complete-variable (M-$)}}{121}
\entry {\code {copy-backward-word ()}}{119}
\entry {\code {copy-forward-word ()}}{119}
\entry {\code {copy-region-as-kill ()}}{119}
\initial {D}
\entry {\code {dabbrev-expand ()}}{117}
\entry {\code {delete-char (C-d)}}{113}
\entry {\code {delete-char-or-list ()}}{116}
\entry {\code {delete-horizontal-space ()}}{115}
\entry {\code {digit-argument (\kbd {M-0}, \kbd {M-1}, \dots {} \kbd {M--})}}{115}
\entry {\code {display-shell-version (C-x C-v)}}{119}
\entry {\code {do-uppercase-version (M-a, M-b, M-\var {x}, \dots {})}}{118}
\entry {\code {downcase-word (M-l)}}{114}
\entry {\code {dump-functions ()}}{119}
\entry {\code {dump-macros ()}}{119}
\entry {\code {dump-variables ()}}{119}
\entry {\code {dynamic-complete-history (M-\key {TAB})}}{117}
\entry {\code {dabbrev-expand ()}}{121}
\entry {\code {delete-char (C-d)}}{117}
\entry {\code {delete-char-or-list ()}}{120}
\entry {\code {delete-horizontal-space ()}}{119}
\entry {\code {digit-argument (\kbd {M-0}, \kbd {M-1}, \dots {} \kbd {M--})}}{119}
\entry {\code {display-shell-version (C-x C-v)}}{123}
\entry {\code {do-uppercase-version (M-a, M-b, M-\var {x}, \dots {})}}{122}
\entry {\code {downcase-word (M-l)}}{118}
\entry {\code {dump-functions ()}}{123}
\entry {\code {dump-macros ()}}{123}
\entry {\code {dump-variables ()}}{123}
\entry {\code {dynamic-complete-history (M-\key {TAB})}}{121}
\initial {E}
\entry {\code {edit-and-execute-command (C-xC-e)}}{120}
\entry {\code {end-kbd-macro (C-x ))}}{117}
\entry {\code {end-of-history (M->)}}{112}
\entry {\code {end-of-line (C-e)}}{111}
\entry {\code {exchange-point-and-mark (C-x C-x)}}{118}
\entry {\code {edit-and-execute-command (C-xC-e)}}{124}
\entry {\code {end-kbd-macro (C-x ))}}{121}
\entry {\code {end-of-history (M->)}}{116}
\entry {\code {end-of-line (C-e)}}{115}
\entry {\code {exchange-point-and-mark (C-x C-x)}}{122}
\initial {F}
\entry {\code {forward-backward-delete-char ()}}{113}
\entry {\code {forward-char (C-f)}}{111}
\entry {\code {forward-search-history (C-s)}}{112}
\entry {\code {forward-word (M-f)}}{111}
\entry {\code {forward-backward-delete-char ()}}{117}
\entry {\code {forward-char (C-f)}}{115}
\entry {\code {forward-search-history (C-s)}}{116}
\entry {\code {forward-word (M-f)}}{115}
\initial {G}
\entry {\code {glob-complete-word (M-g)}}{119}
\entry {\code {glob-expand-word (C-x *)}}{119}
\entry {\code {glob-list-expansions (C-x g)}}{119}
\entry {\code {glob-complete-word (M-g)}}{123}
\entry {\code {glob-expand-word (C-x *)}}{123}
\entry {\code {glob-list-expansions (C-x g)}}{123}
\initial {H}
\entry {\code {history-and-alias-expand-line ()}}{120}
\entry {\code {history-expand-line (M-^)}}{119}
\entry {\code {history-search-backward ()}}{112}
\entry {\code {history-search-forward ()}}{112}
\entry {\code {history-substr-search-backward ()}}{113}
\entry {\code {history-substr-search-forward ()}}{112}
\entry {\code {history-and-alias-expand-line ()}}{124}
\entry {\code {history-expand-line (M-^)}}{123}
\entry {\code {history-search-backward ()}}{116}
\entry {\code {history-search-forward ()}}{116}
\entry {\code {history-substr-search-backward ()}}{117}
\entry {\code {history-substr-search-forward ()}}{116}
\initial {I}
\entry {\code {insert-comment (M-#)}}{119}
\entry {\code {insert-completions (M-*)}}{116}
\entry {\code {insert-last-argument (M-. or M-_)}}{120}
\entry {\code {insert-comment (M-#)}}{123}
\entry {\code {insert-completions (M-*)}}{120}
\entry {\code {insert-last-argument (M-. or M-_)}}{124}
\initial {K}
\entry {\code {kill-line (C-k)}}{114}
\entry {\code {kill-region ()}}{115}
\entry {\code {kill-whole-line ()}}{114}
\entry {\code {kill-word (M-d)}}{114}
\entry {\code {kill-line (C-k)}}{118}
\entry {\code {kill-region ()}}{119}
\entry {\code {kill-whole-line ()}}{118}
\entry {\code {kill-word (M-d)}}{118}
\initial {M}
\entry {\code {magic-space ()}}{120}
\entry {\code {menu-complete ()}}{116}
\entry {\code {menu-complete-backward ()}}{116}
\entry {\code {magic-space ()}}{124}
\entry {\code {menu-complete ()}}{120}
\entry {\code {menu-complete-backward ()}}{120}
\initial {N}
\entry {\code {next-history (C-n)}}{112}
\entry {\code {non-incremental-forward-search-history (M-n)}}{112}
\entry {\code {non-incremental-reverse-search-history (M-p)}}{112}
\entry {\code {next-history (C-n)}}{116}
\entry {\code {non-incremental-forward-search-history (M-n)}}{116}
\entry {\code {non-incremental-reverse-search-history (M-p)}}{116}
\initial {O}
\entry {\code {operate-and-get-next (C-o)}}{120}
\entry {\code {overwrite-mode ()}}{114}
\entry {\code {operate-and-get-next (C-o)}}{124}
\entry {\code {overwrite-mode ()}}{118}
\initial {P}
\entry {\code {possible-command-completions (C-x !)}}{117}
\entry {\code {possible-completions (M-?)}}{116}
\entry {\code {possible-filename-completions (C-x /)}}{116}
\entry {\code {possible-hostname-completions (C-x @)}}{117}
\entry {\code {possible-username-completions (C-x ~)}}{117}
\entry {\code {possible-variable-completions (C-x $)}}{117}
\entry {\code {prefix-meta (\key {ESC})}}{118}
\entry {\code {previous-history (C-p)}}{112}
\entry {\code {print-last-kbd-macro ()}}{118}
\entry {\code {possible-command-completions (C-x !)}}{121}
\entry {\code {possible-completions (M-?)}}{120}
\entry {\code {possible-filename-completions (C-x /)}}{120}
\entry {\code {possible-hostname-completions (C-x @)}}{121}
\entry {\code {possible-username-completions (C-x ~)}}{121}
\entry {\code {possible-variable-completions (C-x $)}}{121}
\entry {\code {prefix-meta (\key {ESC})}}{122}
\entry {\code {previous-history (C-p)}}{116}
\entry {\code {print-last-kbd-macro ()}}{122}
\initial {Q}
\entry {\code {quoted-insert (C-q or C-v)}}{113}
\entry {\code {quoted-insert (C-q or C-v)}}{117}
\initial {R}
\entry {\code {re-read-init-file (C-x C-r)}}{118}
\entry {\code {redraw-current-line ()}}{111}
\entry {\code {reverse-search-history (C-r)}}{112}
\entry {\code {revert-line (M-r)}}{118}
\entry {\code {re-read-init-file (C-x C-r)}}{122}
\entry {\code {redraw-current-line ()}}{115}
\entry {\code {reverse-search-history (C-r)}}{116}
\entry {\code {revert-line (M-r)}}{122}
\initial {S}
\entry {\code {self-insert (a, b, A, 1, !, \dots {})}}{113}
\entry {\code {set-mark (C-@)}}{118}
\entry {\code {shell-backward-kill-word ()}}{115}
\entry {\code {shell-backward-word ()}}{111}
\entry {\code {shell-expand-line (M-C-e)}}{119}
\entry {\code {shell-forward-word ()}}{111}
\entry {\code {shell-kill-word ()}}{115}
\entry {\code {skip-csi-sequence ()}}{118}
\entry {\code {start-kbd-macro (C-x ()}}{117}
\entry {\code {self-insert (a, b, A, 1, !, \dots {})}}{117}
\entry {\code {set-mark (C-@)}}{122}
\entry {\code {shell-backward-kill-word ()}}{119}
\entry {\code {shell-backward-word ()}}{115}
\entry {\code {shell-expand-line (M-C-e)}}{123}
\entry {\code {shell-forward-word ()}}{115}
\entry {\code {shell-kill-word ()}}{119}
\entry {\code {skip-csi-sequence ()}}{122}
\entry {\code {start-kbd-macro (C-x ()}}{121}
\initial {T}
\entry {\code {tilde-expand (M-&)}}{118}
\entry {\code {transpose-chars (C-t)}}{114}
\entry {\code {transpose-words (M-t)}}{114}
\entry {\code {tilde-expand (M-&)}}{122}
\entry {\code {transpose-chars (C-t)}}{118}
\entry {\code {transpose-words (M-t)}}{118}
\initial {U}
\entry {\code {undo (C-_ or C-x C-u)}}{118}
\entry {\code {universal-argument ()}}{115}
\entry {\code {unix-filename-rubout ()}}{115}
\entry {\code {unix-line-discard (C-u)}}{114}
\entry {\code {unix-word-rubout (C-w)}}{115}
\entry {\code {upcase-word (M-u)}}{114}
\entry {\code {undo (C-_ or C-x C-u)}}{122}
\entry {\code {universal-argument ()}}{119}
\entry {\code {unix-filename-rubout ()}}{119}
\entry {\code {unix-line-discard (C-u)}}{118}
\entry {\code {unix-word-rubout (C-w)}}{119}
\entry {\code {upcase-word (M-u)}}{118}
\initial {Y}
\entry {\code {yank (C-y)}}{115}
\entry {\code {yank-last-arg (M-. or M-_)}}{113}
\entry {\code {yank-nth-arg (M-C-y)}}{113}
\entry {\code {yank-pop (M-y)}}{115}
\entry {\code {yank (C-y)}}{119}
\entry {\code {yank-last-arg (M-. or M-_)}}{117}
\entry {\code {yank-nth-arg (M-C-y)}}{117}
\entry {\code {yank-pop (M-y)}}{119}
+218 -41
View File
@@ -1,6 +1,6 @@
<HTML>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- Created on March, 5 2012 by texi2html 1.64 -->
<!-- Created on July, 5 2012 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 4.2, 29 January 2012).
the Bash shell (version 4.2, 5 July 2012).
</P><P>
This is Edition 4.2, last updated 29 January 2012,
This is Edition 4.2, last updated 5 July 2012,
of <CITE>The GNU Bash Reference Manual</CITE>,
for <CODE>Bash</CODE>, Version 4.2.
</P><P>
@@ -46,8 +46,8 @@ features that only appear in Bash. Some of the shells that Bash has
borrowed concepts from are the Bourne Shell (<TT>`sh'</TT>), the Korn Shell
(<TT>`ksh'</TT>), and the C-shell (<TT>`csh'</TT> and its successor,
<TT>`tcsh'</TT>). The following menu breaks the features up into
categories based upon which one of these other shells inspired the
feature.
categories, noting which features were inspired by other shells and
which are specific to Bash.
</P><P>
This manual is meant as a brief introduction to features found in
@@ -1248,6 +1248,8 @@ There may be an arbitrary number of <CODE>case</CODE> clauses, each terminated
by a <SAMP>`;;'</SAMP>, <SAMP>`;&#38;'</SAMP>, or <SAMP>`;;&#38;'</SAMP>.
The first pattern that matches determines the
command-list that is executed.
It's a common idiom to use <SAMP>`*'</SAMP> as the final pattern to define the
default case, since that pattern will always match.
</P><P>
Here is an example using <CODE>case</CODE> in a script that could be used to
@@ -1586,6 +1588,7 @@ This pipe is established before any redirections specified by the
command (see section <A HREF="bashref.html#SEC40">3.6 Redirections</A>).
The file descriptors can be utilized as arguments to shell commands
and redirections using standard word expansions.
The file descriptors are not available in subshells.
</P><P>
The process ID of the shell spawned to execute the coprocess is
@@ -1900,6 +1903,38 @@ When applied to a string-valued variable, <VAR>value</VAR> is expanded and
appended to the variable's value.
</P><P>
A variable can be assigned the <VAR>nameref</VAR> attribute using the
<SAMP>`-n'</SAMP> option to the \fBdeclare\fP or \fBlocal\fP builtin commands
(see section <A HREF="bashref.html#SEC61">4.2 Bash Builtin Commands</A>)
to create a <VAR>nameref</VAR>, or a reference to another variable.
This allows variables to be manipulated indirectly.
Whenever the nameref variable is referenced or assigned to, the operation
is actually performed on the variable specified by the nameref variable's
value.
A nameref is commonly used within shell functions to refer to a variable
whose name is passed as an argument to the function.
For instance, if a variable name is passed to a shell function as its first
argument, running
<TABLE><tr><td>&nbsp;</td><td class=example><pre>declare -n ref=$1
</pre></td></tr></table>inside the function creates a nameref variable <VAR>ref</VAR> whose value is
the variable name passed as the first argument.
References and assignments to <VAR>ref</VAR> are treated as references and
assignments to the variable whose name was passed as <CODE>$1</CODE>.
</P><P>
If the control variable in a <CODE>for</CODE> loop has the nameref attribute,
the list of words can be a list of shell variables, and a name reference
will be established for each word in the list, in turn, when the loop is
executed.
Array variables cannot be given the <SAMP>`-n'</SAMP> attribute.
However, nameref variables can reference array variables and subscripted
array variables.
Namerefs can be unset using the <SAMP>`-n'</SAMP> option to the <CODE>unset</CODE> builtin
(see section <A HREF="bashref.html#SEC60">4.1 Bourne Shell Builtins</A>).
Otherwise, if <CODE>unset</CODE> is executed with the name of a nameref variable
as an argument, the variable referenced by the nameref variable will be unset.
</P><P>
<A NAME="Positional Parameters"></A>
<HR SIZE="6">
<A NAME="SEC27"></A>
@@ -2342,22 +2377,23 @@ expansion.
</P><P>
The basic form of parameter expansion is ${<VAR>parameter</VAR>}.
The value of <VAR>parameter</VAR> is substituted. The braces are required
when <VAR>parameter</VAR>
The value of <VAR>parameter</VAR> is substituted.
The <VAR>parameter</VAR> is a shell parameter as described above
(see section <A HREF="bashref.html#SEC26">3.4 Shell Parameters</A>) or an array reference (see section <A HREF="bashref.html#SEC86">6.7 Arrays</A>).
The braces are required when <VAR>parameter</VAR>
is a positional parameter with more than one digit,
or when <VAR>parameter</VAR>
is followed by a character that is not to be
or when <VAR>parameter</VAR> is followed by a character that is not to be
interpreted as part of its name.
</P><P>
If the first character of <VAR>parameter</VAR> is an exclamation point (!),
a level of variable indirection is introduced.
it introduces a level of variable indirection.
Bash uses the value of the variable formed from the rest of
<VAR>parameter</VAR> as the name of the variable; this variable is then
expanded and that value is used in the rest of the substitution, rather
than the value of <VAR>parameter</VAR> itself.
This is known as <CODE>indirect expansion</CODE>.
The exceptions to this are the expansions of ${!<VAR>prefix</VAR><BR>}
The exceptions to this are the expansions of ${!<VAR>prefix</VAR>*}
and ${!<VAR>name</VAR>[@]}
described below.
The exclamation point must immediately follow the left brace in order to
@@ -2369,7 +2405,7 @@ parameter expansion, command substitution, and arithmetic expansion.
</P><P>
When not performing substring expansion, using the form described
below, Bash tests for a parameter that is unset or null.
below (e.g., <SAMP>`:-'</SAMP>), Bash tests for a parameter that is unset or null.
Omitting the colon results in a test only for a parameter that is unset.
Put another way, if the colon is included,
the operator tests for both <VAR>parameter</VAR>'s existence and that its value
@@ -2410,35 +2446,160 @@ is null or unset, nothing is substituted, otherwise the expansion of
<DT><CODE>${<VAR>parameter</VAR>:<VAR>offset</VAR>}</CODE>
<DD><DT><CODE>${<VAR>parameter</VAR>:<VAR>offset</VAR>:<VAR>length</VAR>}</CODE>
<DD>Expands to up to <VAR>length</VAR> characters of <VAR>parameter</VAR>
<DD>This is referred to as Substring Expansion.
It expands to up to <VAR>length</VAR> characters of the value of <VAR>parameter</VAR>
starting at the character specified by <VAR>offset</VAR>.
If <VAR>length</VAR> is omitted, expands to the substring of
<VAR>parameter</VAR> starting at the character specified by <VAR>offset</VAR>.
If <VAR>parameter</VAR> is <SAMP>`@'</SAMP>, an indexed array subscripted by
<SAMP>`@'</SAMP> or <SAMP>`*'</SAMP>, or an associative array name, the results differ as
described below.
If <VAR>length</VAR> is omitted, it expands to the substring of the value of
<VAR>parameter</VAR> starting at the character specified by <VAR>offset</VAR>
and extending to the end of the value.
<VAR>length</VAR> and <VAR>offset</VAR> are arithmetic expressions
(see section <A HREF="bashref.html#SEC84">6.5 Shell Arithmetic</A>).
This is referred to as Substring Expansion.
<P>
If <VAR>offset</VAR> evaluates to a number less than zero, the value
is used as an offset from the end of the value of <VAR>parameter</VAR>.
If <VAR>length</VAR> evaluates to a number less than zero, and <VAR>parameter</VAR>
is not <SAMP>`@'</SAMP> and not an indexed or associative array, it is interpreted
as an offset from the end of the value of <VAR>parameter</VAR> rather than
a number of characters, and the expansion is the characters between the
two offsets.
is used as an offset in characters
from the end of the value of <VAR>parameter</VAR>.
If <VAR>length</VAR> evaluates to a number less than zero,
it is interpreted as an offset in characters
from the end of the value of <VAR>parameter</VAR> rather than
a number of characters, and the expansion is the characters between
<VAR>offset</VAR> and that result.
Note that a negative offset must be separated from the colon by at least
one space to avoid being confused with the <SAMP>`:-'</SAMP> expansion.
</P><P>
Here are some examples illustrating substring expansion on parameters and
subscripted arrays:
</P><P>
@verbatim
$ string=01234567890abcdefgh
$ echo ${string:7}
7890abcdefgh
$ echo ${string:7:0}
</P><P>
$ echo ${string:7:2}
78
$ echo ${string:7:-2}
7890abcdef
$ echo ${string: -7}
bcdefgh
$ echo ${string: -7:0}
</P><P>
$ echo ${string: -7:2}
bc
$ echo ${string: -7:-2}
bcdef
$ set -- 01234567890abcdefgh
$ echo ${1:7}
7890abcdefgh
$ echo ${1:7:0}
</P><P>
$ echo ${1:7:2}
78
$ echo ${1:7:-2}
7890abcdef
$ echo ${1: -7}
bcdefgh
$ echo ${1: -7:0}
</P><P>
$ echo ${1: -7:2}
bc
$ echo ${1: -7:-2}
bcdef
$ array[0]=01234567890abcdefgh
$ echo ${array[0]:7}
7890abcdefgh
$ echo ${array[0]:7:0}
</P><P>
$ echo ${array[0]:7:2}
78
$ echo ${array[0]:7:-2}
7890abcdef
$ echo ${array[0]: -7}
bcdefgh
$ echo ${array[0]: -7:0}
</P><P>
$ echo ${array[0]: -7:2}
bc
$ echo ${array[0]: -7:-2}
bcdef
</P><P>
If <VAR>parameter</VAR> is <SAMP>`@'</SAMP>, the result is <VAR>length</VAR> positional
parameters beginning at <VAR>offset</VAR>.
A negative <VAR>offset</VAR> is taken relative to one greater than the greatest
positional parameter, so an offset of -1 evaluates to the last positional
parameter.
It is an expansion error if <VAR>length</VAR> evaluates to a number less than zero.
</P><P>
The following examples illustrate substring expansion using positional
parameters:
</P><P>
@verbatim
$ set -- 1 2 3 4 5 6 7 8 9 0 a b c d e f g h
$ echo ${7}
7 8 9 0 a b c d e f g h
$ echo ${7:0}
</P><P>
$ echo ${7:2}
7 8
$ echo ${7:-2}
bash: -2: substring expression &#60; 0
$ echo ${ -7:2}
b c
$ echo ${0}
./bash 1 2 3 4 5 6 7 8 9 0 a b c d e f g h
$ echo ${0:2}
./bash 1
$ echo ${ -7:0}
</P><P>
If <VAR>parameter</VAR> is an indexed array name subscripted
by <SAMP>`@'</SAMP> or <SAMP>`*'</SAMP>, the result is the <VAR>length</VAR>
members of the array beginning with <CODE>${<VAR>parameter</VAR>[<VAR>offset</VAR>]}</CODE>.
A negative <VAR>offset</VAR> is taken relative to one greater than the maximum
index of the specified array.
It is an expansion error if <VAR>length</VAR> evaluates to a number less than zero.
</P><P>
These examples show how you can use substring expansion with indexed
arrays:
</P><P>
@verbatim
$ array=(0 1 2 3 4 5 6 7 8 9 0 a b c d e f g h)
$ echo ${array[@]:7}
7 8 9 0 a b c d e f g h
$ echo ${array[@]:7:2}
7 8
$ echo ${array[@]: -7:2}
b c
$ echo ${array[@]: -7:-2}
bash: -2: substring expression &#60; 0
$ echo ${array[@]:0}
0 1 2 3 4 5 6 7 8 9 0 a b c d e f g h
$ echo ${array[@]:0:2}
0 1
$ echo ${array[@]: -7:0}
</P><P>
Substring expansion applied to an associative array produces undefined
results.
</P><P>
Note that a negative offset must be separated from the colon by at least
one space to avoid being confused with the <SAMP>`:-'</SAMP> expansion.
Substring indexing is zero-based unless the positional parameters
are used, in which case the indexing starts at 1 by default.
If <VAR>offset</VAR> is 0, and the positional parameters are used, <CODE>$@</CODE> is
@@ -3049,14 +3210,14 @@ redirections, as described in the following table:
<DT><CODE>/dev/tcp/<VAR>host</VAR>/<VAR>port</VAR></CODE>
<DD>If <VAR>host</VAR> is a valid hostname or Internet address, and <VAR>port</VAR>
is an integer port number or service name, Bash attempts to open a TCP
connection to the corresponding socket.
is an integer port number or service name, Bash attempts to open
the corresponding TCP socket.
<P>
<DT><CODE>/dev/udp/<VAR>host</VAR>/<VAR>port</VAR></CODE>
<DD>If <VAR>host</VAR> is a valid hostname or Internet address, and <VAR>port</VAR>
is an integer port number or service name, Bash attempts to open a UDP
connection to the corresponding socket.
is an integer port number or service name, Bash attempts to open
the corresponding UDP socket.
</DL>
<P>
@@ -4575,7 +4736,7 @@ results in permissions of <CODE>755</CODE>.
<DT><CODE>unset</CODE>
<DD><A NAME="IDX88"></A>
<TABLE><tr><td>&nbsp;</td><td class=example><pre>unset [-fv] [<VAR>name</VAR>]
<TABLE><tr><td>&nbsp;</td><td class=example><pre>unset [-fnv] [<VAR>name</VAR>]
</pre></td></tr></table><P>
Remove each variable or function <VAR>name</VAR>.
@@ -4583,6 +4744,10 @@ If the <SAMP>`-v'</SAMP> option is given, each
<VAR>name</VAR> refers to a shell variable and that variable is remvoved.
If the <SAMP>`-f'</SAMP> option is given, the <VAR>name</VAR>s refer to shell
functions, and the function definition is removed.
If the <SAMP>`-n'</SAMP> option is supplied, and <VAR>name</VAR> is a variable with
the <VAR>nameref</VAR> attribute, <VAR>name</VAR> will be unset rather than the
variable it references.
<SAMP>`-n'</SAMP> has no effect if the <SAMP>`-f'</SAMP> option is supplied.
If no options are supplied, each <VAR>name</VAR> refers to a variable; if
there is no variable by that name, any function with that name is
unset.
@@ -4805,7 +4970,7 @@ zero if <VAR>command</VAR> is found, and non-zero if not.
<DT><CODE>declare</CODE>
<DD><A NAME="IDX94"></A>
<TABLE><tr><td>&nbsp;</td><td class=example><pre>declare [-aAfFgilrtux] [-p] [<VAR>name</VAR>[=<VAR>value</VAR>] <small>...</small>]
<TABLE><tr><td>&nbsp;</td><td class=example><pre>declare [-aAfFgilnrtux] [-p] [<VAR>name</VAR>[=<VAR>value</VAR>] <small>...</small>]
</pre></td></tr></table><P>
Declare variables and give them attributes. If no <VAR>name</VAR>s
@@ -4868,6 +5033,16 @@ converted to lower-case.
The upper-case attribute is disabled.
<P>
<DT><CODE>-n</CODE>
<DD>Give each <VAR>name</VAR> the <VAR>nameref</VAR> attribute, making
it a name reference to another variable.
That other variable is defined by the value of <VAR>name</VAR>.
All references and assignments to <VAR>name</VAR>, except for changing the
<SAMP>`-n'</SAMP> attribute itself, are performed on the variable referenced by
<VAR>name</VAR>'s value.
The <SAMP>`-n'</SAMP> attribute cannot be applied to array variables.
<P>
<DT><CODE>-r</CODE>
<DD>Make <VAR>name</VAR>s readonly. These names cannot then be assigned values
by subsequent assignment statements or unset.
@@ -5347,7 +5522,7 @@ if any are not found.
<DT><CODE>typeset</CODE>
<DD><A NAME="IDX107"></A>
<TABLE><tr><td>&nbsp;</td><td class=example><pre>typeset [-afFgrxilrtux] [-p] [<VAR>name</VAR>[=<VAR>value</VAR>] <small>...</small>]
<TABLE><tr><td>&nbsp;</td><td class=example><pre>typeset [-afFgrxilnrtux] [-p] [<VAR>name</VAR>[=<VAR>value</VAR>] <small>...</small>]
</pre></td></tr></table><P>
The <CODE>typeset</CODE> command is supplied for compatibility with the Korn
@@ -6969,7 +7144,7 @@ When this variable is assigned a value, the history file is truncated,
if necessary, to contain no more than that number of lines
by removing the oldest entries.
The history file is also truncated to this size after
writing it when an interactive shell exits.
writing it when a shell exits.
If the value is 0, the history file is truncated to zero size.
Non-numeric values and numeric values less than zero inhibit truncation.
The shell sets the default value to the value of <CODE>HISTSIZE</CODE>
@@ -7374,10 +7549,11 @@ from a terminal.
<P>
In an interactive shell, the value is interpreted as
the number of seconds to wait for input after issuing the primary
prompt when the shell is interactive.
Bash terminates after that number of seconds if input does
not arrive.
the number of seconds to wait for a line of input after issuing
the primary prompt.
Bash
terminates after waiting for that number of seconds if a complete
line of input does not arrive.
</P><P>
<A NAME="IDX296"></A>
@@ -7952,7 +8128,7 @@ Command history (see section <A HREF="bashref.html#SEC122">9.1 Bash History Faci
and history expansion (see section <A HREF="bashref.html#SEC124">9.3 History Expansion</A>)
are enabled by default.
Bash will save the command history to the file named by <CODE>$HISTFILE</CODE>
when an interactive shell exits.
when a shell with history enabled exits.
<P>
<LI>
@@ -8469,6 +8645,7 @@ be indexed or assigned contiguously.
Indexed arrays are referenced using integers (including arithmetic
expressions (see section <A HREF="bashref.html#SEC84">6.5 Shell Arithmetic</A>)) and are zero-based;
associative arrays use arbitrary strings.
Unless otherwise noted, indexed array indices must be non-negative integers.
</P><P>
An indexed array is created automatically if any variable is assigned to
@@ -12645,7 +12822,7 @@ file named by the <CODE>HISTFILE</CODE> variable (default <TT>`~/.bash_history'<
The file named by the value of <CODE>HISTFILE</CODE> is truncated, if
necessary, to contain no more than the number of lines specified by
the value of the <CODE>HISTFILESIZE</CODE> variable.
When an interactive shell exits, the last
When a shell with history enabled exits, the last
<CODE>$HISTSIZE</CODE> lines are copied from the history list to the file
named by <CODE>$HISTFILE</CODE>.
If the <CODE>histappend</CODE> shell option is set (see section <A HREF="bashref.html#SEC61">4.2 Bash Builtin Commands</A>),
@@ -14089,7 +14266,7 @@ the value of <CODE>var</CODE>, is available (see section <A HREF="bashref.html#S
<P>
<LI>
The expansion <CODE>${!<VAR>prefix}*</VAR></CODE> expansion, which expands to
The expansion <CODE>${!<VAR>prefix</VAR>*}</CODE> expansion, which expands to
the names of all shell variables whose names begin with <VAR>prefix</VAR>,
is available (see section <A HREF="bashref.html#SEC32">3.5.3 Shell Parameter Expansion</A>).
<P>
@@ -16904,7 +17081,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>March, 5 2012</I>
This document was generated by <I>Chet Ramey</I> on <I>July, 5 2012</I>
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>
<P></P>
@@ -17066,7 +17243,7 @@ the following structure:
<BR>
<FONT SIZE="-1">
This document was generated
by <I>Chet Ramey</I> on <I>March, 5 2012</I>
by <I>Chet Ramey</I> on <I>July, 5 2012</I>
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>
+369 -227
View File
@@ -2,9 +2,9 @@ This is bashref.info, produced by makeinfo version 4.13 from
/usr/homes/chet/src/bash/src/doc/bashref.texi.
This text is a brief description of the features that are present in
the Bash shell (version 4.2, 29 January 2012).
the Bash shell (version 4.2, 5 July 2012).
This is Edition 4.2, last updated 29 January 2012, of `The GNU Bash
This is Edition 4.2, last updated 5 July 2012, of `The GNU Bash
Reference Manual', for `Bash', Version 4.2.
Copyright (C) 1988-2012 Free Software Foundation, Inc.
@@ -16,14 +16,9 @@ preserved on all copies.
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License,
Version 1.3 or any later version published by the Free Software
Foundation; with no Invariant Sections, with the Front-Cover texts
being "A GNU Manual", and with the Back-Cover Texts as in (a)
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."
Foundation; with no Invariant Sections, no Front-Cover Texts, and
no Back-Cover Texts. A copy of the license is included in the
section entitled "GNU Free Documentation License".
INFO-DIR-SECTION Basics
@@ -38,17 +33,17 @@ Bash Features
*************
This text is a brief description of the features that are present in
the Bash shell (version 4.2, 29 January 2012).
the Bash shell (version 4.2, 5 July 2012).
This is Edition 4.2, last updated 29 January 2012, of `The GNU Bash
This is Edition 4.2, last updated 5 July 2012, of `The GNU Bash
Reference Manual', for `Bash', Version 4.2.
Bash contains features that appear in other popular shells, and some
features that only appear in Bash. Some of the shells that Bash has
borrowed concepts from are the Bourne Shell (`sh'), the Korn Shell
(`ksh'), and the C-shell (`csh' and its successor, `tcsh'). The
following menu breaks the features up into categories based upon which
one of these other shells inspired the feature.
following menu breaks the features up into categories, noting which
features were inspired by other shells and which are specific to Bash.
This manual is meant as a brief introduction to features found in
Bash. The Bash manual page should be used as the definitive reference
@@ -804,7 +799,9 @@ File: bashref.info, Node: Conditional Constructs, Next: Command Grouping, Pre
There may be an arbitrary number of `case' clauses, each terminated
by a `;;', `;&', or `;;&'. The first pattern that matches
determines the command-list that is executed.
determines the command-list that is executed. It's a common idiom
to use `*' as the final pattern to define the default case, since
that pattern will always match.
Here is an example using `case' in a script that could be used to
describe one interesting feature of an animal:
@@ -1049,7 +1046,8 @@ a file descriptor in the executing shell, and that file descriptor is
assigned to `NAME'[1]. This pipe is established before any
redirections specified by the command (*note Redirections::). The file
descriptors can be utilized as arguments to shell commands and
redirections using standard word expansions.
redirections using standard word expansions. The file descriptors are
not available in subshells.
The process ID of the shell spawned to execute the coprocess is
available as the value of the variable `NAME'_PID. The `wait' builtin
@@ -1267,6 +1265,32 @@ key-value pairs in an associative array. When applied to a
string-valued variable, VALUE is expanded and appended to the
variable's value.
A variable can be assigned the NAMEREF attribute using the `-n'
option to the \fBdeclare\fP or \fBlocal\fP builtin commands (*note Bash
Builtins::) to create a NAMEREF, or a reference to another variable.
This allows variables to be manipulated indirectly. Whenever the
nameref variable is referenced or assigned to, the operation is
actually performed on the variable specified by the nameref variable's
value. A nameref is commonly used within shell functions to refer to a
variable whose name is passed as an argument to the function. For
instance, if a variable name is passed to a shell function as its first
argument, running
declare -n ref=$1
inside the function creates a nameref variable REF whose value is
the variable name passed as the first argument. References and
assignments to REF are treated as references and assignments to the
variable whose name was passed as `$1'.
If the control variable in a `for' loop has the nameref attribute,
the list of words can be a list of shell variables, and a name reference
will be established for each word in the list, in turn, when the loop is
executed. Array variables cannot be given the `-n' attribute.
However, nameref variables can reference array variables and subscripted
array variables. Namerefs can be unset using the `-n' option to the
`unset' builtin (*note Bourne Shell Builtins::). Otherwise, if `unset'
is executed with the name of a nameref variable as an argument, the
variable referenced by the nameref variable will be unset.

File: bashref.info, Node: Positional Parameters, Next: Special Parameters, Up: Shell Parameters
@@ -1548,28 +1572,29 @@ embedded arithmetic expansion, command substitution, or parameter
expansion.
The basic form of parameter expansion is ${PARAMETER}. The value of
PARAMETER is substituted. The braces are required when PARAMETER is a
positional parameter with more than one digit, or when PARAMETER is
followed by a character that is not to be interpreted as part of its
name.
PARAMETER is substituted. The PARAMETER is a shell parameter as
described above (*note Shell Parameters::) or an array reference (*note
Arrays::). The braces are required when PARAMETER is a positional
parameter with more than one digit, or when PARAMETER is followed by a
character that is not to be interpreted as part of its name.
If the first character of PARAMETER is an exclamation point (!), a
level of variable indirection is introduced. Bash uses the value of
the variable formed from the rest of PARAMETER as the name of the
variable; this variable is then expanded and that value is used in the
rest of the substitution, rather than the value of PARAMETER itself.
This is known as `indirect expansion'. The exceptions to this are the
expansions of ${!PREFIX
} and ${!NAME[@]} described below. The exclamation point must
immediately follow the left brace in order to introduce indirection.
If the first character of PARAMETER is an exclamation point (!), it
introduces a level of variable indirection. Bash uses the value of the
variable formed from the rest of PARAMETER as the name of the variable;
this variable is then expanded and that value is used in the rest of
the substitution, rather than the value of PARAMETER itself. This is
known as `indirect expansion'. The exceptions to this are the
expansions of ${!PREFIX*} and ${!NAME[@]} described below. The
exclamation point must immediately follow the left brace in order to
introduce indirection.
In each of the cases below, WORD is subject to tilde expansion,
parameter expansion, command substitution, and arithmetic expansion.
When not performing substring expansion, using the form described
below, Bash tests for a parameter that is unset or null. Omitting the
colon results in a test only for a parameter that is unset. Put
another way, if the colon is included, the operator tests for both
below (e.g., `:-'), Bash tests for a parameter that is unset or null.
Omitting the colon results in a test only for a parameter that is unset.
Put another way, if the colon is included, the operator tests for both
PARAMETER's existence and that its value is not null; if the colon is
omitted, the operator tests only for existence.
@@ -1595,28 +1620,133 @@ omitted, the operator tests only for existence.
`${PARAMETER:OFFSET}'
`${PARAMETER:OFFSET:LENGTH}'
Expands to up to LENGTH characters of PARAMETER starting at the
character specified by OFFSET. If LENGTH is omitted, expands to
the substring of PARAMETER starting at the character specified by
OFFSET. LENGTH and OFFSET are arithmetic expressions (*note Shell
Arithmetic::). This is referred to as Substring Expansion.
This is referred to as Substring Expansion. It expands to up to
LENGTH characters of the value of PARAMETER starting at the
character specified by OFFSET. If PARAMETER is `@', an indexed
array subscripted by `@' or `*', or an associative array name, the
results differ as described below. If LENGTH is omitted, it
expands to the substring of the value of PARAMETER starting at the
character specified by OFFSET and extending to the end of the
value. LENGTH and OFFSET are arithmetic expressions (*note Shell
Arithmetic::).
If OFFSET evaluates to a number less than zero, the value is used
as an offset from the end of the value of PARAMETER. If LENGTH
evaluates to a number less than zero, and PARAMETER is not `@' and
not an indexed or associative array, it is interpreted as an
offset from the end of the value of PARAMETER rather than a number
of characters, and the expansion is the characters between the two
offsets. If PARAMETER is `@', the result is LENGTH positional
parameters beginning at OFFSET. If PARAMETER is an indexed array
name subscripted by `@' or `*', the result is the LENGTH members
of the array beginning with `${PARAMETER[OFFSET]}'. A negative
OFFSET is taken relative to one greater than the maximum index of
the specified array. Substring expansion applied to an
associative array produces undefined results.
as an offset in characters from the end of the value of PARAMETER.
If LENGTH evaluates to a number less than zero, it is interpreted
as an offset in characters from the end of the value of PARAMETER
rather than a number of characters, and the expansion is the
characters between OFFSET and that result. Note that a negative
offset must be separated from the colon by at least one space to
avoid being confused with the `:-' expansion.
Here are some examples illustrating substring expansion on
parameters and subscripted arrays:
$ string=01234567890abcdefgh
$ echo ${string:7}
7890abcdefgh
$ echo ${string:7:0}
$ echo ${string:7:2}
78
$ echo ${string:7:-2}
7890abcdef
$ echo ${string: -7}
bcdefgh
$ echo ${string: -7:0}
$ echo ${string: -7:2}
bc
$ echo ${string: -7:-2}
bcdef
$ set -- 01234567890abcdefgh
$ echo ${1:7}
7890abcdefgh
$ echo ${1:7:0}
$ echo ${1:7:2}
78
$ echo ${1:7:-2}
7890abcdef
$ echo ${1: -7}
bcdefgh
$ echo ${1: -7:0}
$ echo ${1: -7:2}
bc
$ echo ${1: -7:-2}
bcdef
$ array[0]=01234567890abcdefgh
$ echo ${array[0]:7}
7890abcdefgh
$ echo ${array[0]:7:0}
$ echo ${array[0]:7:2}
78
$ echo ${array[0]:7:-2}
7890abcdef
$ echo ${array[0]: -7}
bcdefgh
$ echo ${array[0]: -7:0}
$ echo ${array[0]: -7:2}
bc
$ echo ${array[0]: -7:-2}
bcdef
If PARAMETER is `@', the result is LENGTH positional parameters
beginning at OFFSET. A negative OFFSET is taken relative to one
greater than the greatest positional parameter, so an offset of -1
evaluates to the last positional parameter. It is an expansion
error if LENGTH evaluates to a number less than zero.
The following examples illustrate substring expansion using
positional parameters:
$ set -- 1 2 3 4 5 6 7 8 9 0 a b c d e f g h
$ echo ${@:7}
7 8 9 0 a b c d e f g h
$ echo ${@:7:0}
$ echo ${@:7:2}
7 8
$ echo ${@:7:-2}
bash: -2: substring expression < 0
$ echo ${@: -7:2}
b c
$ echo ${@:0}
./bash 1 2 3 4 5 6 7 8 9 0 a b c d e f g h
$ echo ${@:0:2}
./bash 1
$ echo ${@: -7:0}
If PARAMETER is an indexed array name subscripted by `@' or `*',
the result is the LENGTH members of the array beginning with
`${PARAMETER[OFFSET]}'. A negative OFFSET is taken relative to
one greater than the maximum index of the specified array. It is
an expansion error if LENGTH evaluates to a number less than zero.
These examples show how you can use substring expansion with
indexed arrays:
$ array=(0 1 2 3 4 5 6 7 8 9 0 a b c d e f g h)
$ echo ${array[@]:7}
7 8 9 0 a b c d e f g h
$ echo ${array[@]:7:2}
7 8
$ echo ${array[@]: -7:2}
b c
$ echo ${array[@]: -7:-2}
bash: -2: substring expression < 0
$ echo ${array[@]:0}
0 1 2 3 4 5 6 7 8 9 0 a b c d e f g h
$ echo ${array[@]:0:2}
0 1
$ echo ${array[@]: -7:0}
Substring expansion applied to an associative array produces
undefined results.
Note that a negative offset must be separated from the colon by at
least one space to avoid being confused with the `:-' expansion.
Substring indexing is zero-based unless the positional parameters
are used, in which case the indexing starts at 1 by default. If
OFFSET is 0, and the positional parameters are used, `$@' is
@@ -2021,13 +2151,13 @@ redirections, as described in the following table:
`/dev/tcp/HOST/PORT'
If HOST is a valid hostname or Internet address, and PORT is an
integer port number or service name, Bash attempts to open a TCP
connection to the corresponding socket.
integer port number or service name, Bash attempts to open the
corresponding TCP socket.
`/dev/udp/HOST/PORT'
If HOST is a valid hostname or Internet address, and PORT is an
integer port number or service name, Bash attempts to open a UDP
connection to the corresponding socket.
integer port number or service name, Bash attempts to open the
corresponding UDP socket.
A failure to open or create a file causes the redirection to fail.
@@ -2990,16 +3120,19 @@ standard.
results in permissions of `755'.
`unset'
unset [-fv] [NAME]
unset [-fnv] [NAME]
Remove each variable or function NAME. If the `-v' option is
given, each NAME refers to a shell variable and that variable is
remvoved. If the `-f' option is given, the NAMEs refer to shell
functions, and the function definition is removed. If no options
are supplied, each NAME refers to a variable; if there is no
variable by that name, any function with that name is unset.
Readonly variables and functions may not be unset. The return
status is zero unless a NAME is readonly.
functions, and the function definition is removed. If the `-n'
option is supplied, and NAME is a variable with the NAMEREF
attribute, NAME will be unset rather than the variable it
references. `-n' has no effect if the `-f' option is supplied.
If no options are supplied, each NAME refers to a variable; if
there is no variable by that name, any function with that name is
unset. Readonly variables and functions may not be unset. The
return status is zero unless a NAME is readonly.

File: bashref.info, Node: Bash Builtins, Next: Modifying Shell Behavior, Prev: Bourne Shell Builtins, Up: Shell Builtin Commands
@@ -3150,7 +3283,7 @@ POSIX standard.
non-zero if not.
`declare'
declare [-aAfFgilrtux] [-p] [NAME[=VALUE] ...]
declare [-aAfFgilnrtux] [-p] [NAME[=VALUE] ...]
Declare variables and give them attributes. If no NAMEs are
given, then display the values of variables instead.
@@ -3198,6 +3331,14 @@ POSIX standard.
characters are converted to lower-case. The upper-case
attribute is disabled.
`-n'
Give each NAME the NAMEREF attribute, making it a name
reference to another variable. That other variable is
defined by the value of NAME. All references and assignments
to NAME, except for changing the `-n' attribute itself, are
performed on the variable referenced by NAME's value. The
`-n' attribute cannot be applied to array variables.
`-r'
Make NAMEs readonly. These names cannot then be assigned
values by subsequent assignment statements or unset.
@@ -3594,7 +3735,7 @@ POSIX standard.
if any are not found.
`typeset'
typeset [-afFgrxilrtux] [-p] [NAME[=VALUE] ...]
typeset [-afFgrxilnrtux] [-p] [NAME[=VALUE] ...]
The `typeset' command is supplied for compatibility with the Korn
shell. It is a synonym for the `declare' builtin command.
@@ -4724,11 +4865,11 @@ Variables::).
this variable is assigned a value, the history file is truncated,
if necessary, to contain no more than that number of lines by
removing the oldest entries. The history file is also truncated
to this size after writing it when an interactive shell exits. If
the value is 0, the history file is truncated to zero size.
Non-numeric values and numeric values less than zero inhibit
truncation. The shell sets the default value to the value of
`HISTSIZE' after reading any startup files.
to this size after writing it when a shell exits. If the value is
0, the history file is truncated to zero size. Non-numeric values
and numeric values less than zero inhibit truncation. The shell
sets the default value to the value of `HISTSIZE' after reading
any startup files.
`HISTIGNORE'
A colon-separated list of patterns used to decide which command
@@ -4988,9 +5129,9 @@ Variables::).
from a terminal.
In an interactive shell, the value is interpreted as the number of
seconds to wait for input after issuing the primary prompt when
the shell is interactive. Bash terminates after that number of
seconds if input does not arrive.
seconds to wait for a line of input after issuing the primary
prompt. Bash terminates after waiting for that number of seconds
if a complete line of input does not arrive.
`TMPDIR'
If set, Bash uses its value as the name of a directory in which
@@ -5366,7 +5507,7 @@ several ways.
7. Command history (*note Bash History Facilities::) and history
expansion (*note History Interaction::) are enabled by default.
Bash will save the command history to the file named by `$HISTFILE'
when an interactive shell exits.
when a shell with history enabled exits.
8. Alias expansion (*note Aliases::) is performed by default.
@@ -5710,7 +5851,8 @@ will explicitly declare an array. There is no maximum limit on the
size of an array, nor any requirement that members be indexed or
assigned contiguously. Indexed arrays are referenced using integers
(including arithmetic expressions (*note Shell Arithmetic::)) and are
zero-based; associative arrays use arbitrary strings.
zero-based; associative arrays use arbitrary strings. Unless otherwise
noted, indexed array indices must be non-negative integers.
An indexed array is created automatically if any variable is
assigned to using the syntax
@@ -8543,12 +8685,12 @@ the values of the shell variables `HISTIGNORE' and `HISTCONTROL'.
named by the `HISTFILE' variable (default `~/.bash_history'). The file
named by the value of `HISTFILE' is truncated, if necessary, to contain
no more than the number of lines specified by the value of the
`HISTFILESIZE' variable. When an interactive shell exits, the last
`$HISTSIZE' lines are copied from the history list to the file named by
`$HISTFILE'. If the `histappend' shell option is set (*note Bash
Builtins::), the lines are appended to the history file, otherwise the
history file is overwritten. If `HISTFILE' is unset, or if the history
file is unwritable, the history is not saved. After saving the
`HISTFILESIZE' variable. When a shell with history enabled exits, the
last `$HISTSIZE' lines are copied from the history list to the file
named by `$HISTFILE'. If the `histappend' shell option is set (*note
Bash Builtins::), the lines are appended to the history file, otherwise
the history file is overwritten. If `HISTFILE' is unset, or if the
history file is unwritable, the history is not saved. After saving the
history, the history file is truncated to contain no more than
`$HISTFILESIZE' lines. If `HISTFILESIZE' is unset, or set to null, a
non-numeric value, or a numeric value less than zero, the history file
@@ -9491,7 +9633,7 @@ the baseline reference.
PATTERN and replaces it with REPLACEMENT in the value of `var', is
available (*note Shell Parameter Expansion::).
* The expansion `${!PREFIX}*' expansion, which expands to the names
* The expansion `${!PREFIX*}' expansion, which expands to the names
of all shell variables whose names begin with PREFIX, is available
(*note Shell Parameter Expansion::).
@@ -10287,8 +10429,8 @@ D.1 Index of Shell Builtin Commands
(line 7)
* disown: Job Control Builtins.
(line 87)
* echo: Bash Builtins. (line 233)
* enable: Bash Builtins. (line 295)
* echo: Bash Builtins. (line 241)
* enable: Bash Builtins. (line 303)
* eval: Bourne Shell Builtins.
(line 85)
* exec: Bourne Shell Builtins.
@@ -10305,26 +10447,26 @@ D.1 Index of Shell Builtin Commands
(line 133)
* hash: Bourne Shell Builtins.
(line 176)
* help: Bash Builtins. (line 324)
* help: Bash Builtins. (line 332)
* history: Bash History Builtins.
(line 40)
* jobs: Job Control Builtins.
(line 27)
* kill: Job Control Builtins.
(line 59)
* let: Bash Builtins. (line 345)
* local: Bash Builtins. (line 353)
* logout: Bash Builtins. (line 364)
* mapfile: Bash Builtins. (line 369)
* let: Bash Builtins. (line 353)
* local: Bash Builtins. (line 361)
* logout: Bash Builtins. (line 372)
* mapfile: Bash Builtins. (line 377)
* popd: Directory Stack Builtins.
(line 39)
* printf: Bash Builtins. (line 417)
* printf: Bash Builtins. (line 425)
* pushd: Directory Stack Builtins.
(line 61)
* pwd: Bourne Shell Builtins.
(line 196)
* read: Bash Builtins. (line 463)
* readarray: Bash Builtins. (line 547)
* read: Bash Builtins. (line 471)
* readarray: Bash Builtins. (line 555)
* readonly: Bourne Shell Builtins.
(line 206)
* return: Bourne Shell Builtins.
@@ -10333,7 +10475,7 @@ D.1 Index of Shell Builtin Commands
* shift: Bourne Shell Builtins.
(line 241)
* shopt: The Shopt Builtin. (line 9)
* source: Bash Builtins. (line 556)
* source: Bash Builtins. (line 564)
* suspend: Job Control Builtins.
(line 99)
* test: Bourne Shell Builtins.
@@ -10342,12 +10484,12 @@ D.1 Index of Shell Builtin Commands
(line 330)
* trap: Bourne Shell Builtins.
(line 336)
* type: Bash Builtins. (line 561)
* typeset: Bash Builtins. (line 593)
* ulimit: Bash Builtins. (line 599)
* type: Bash Builtins. (line 569)
* typeset: Bash Builtins. (line 601)
* ulimit: Bash Builtins. (line 607)
* umask: Bourne Shell Builtins.
(line 383)
* unalias: Bash Builtins. (line 690)
* unalias: Bash Builtins. (line 698)
* unset: Bourne Shell Builtins.
(line 401)
* wait: Job Control Builtins.
@@ -10364,9 +10506,9 @@ D.2 Index of Shell Reserved Words
* !: Pipelines. (line 9)
* [[: Conditional Constructs.
(line 117)
(line 119)
* ]]: Conditional Constructs.
(line 117)
(line 119)
* case: Conditional Constructs.
(line 28)
* do: Looping Constructs. (line 12)
@@ -10386,7 +10528,7 @@ D.2 Index of Shell Reserved Words
* in: Conditional Constructs.
(line 28)
* select: Conditional Constructs.
(line 76)
(line 78)
* then: Conditional Constructs.
(line 7)
* time: Pipelines. (line 9)
@@ -10858,134 +11000,134 @@ D.5 Concept Index

Tag Table:
Node: Top1348
Node: Introduction3186
Node: What is Bash?3414
Node: What is a shell?4527
Node: Definitions7066
Node: Basic Shell Features9984
Node: Shell Syntax11203
Node: Shell Operation12233
Node: Quoting13527
Node: Escape Character14830
Node: Single Quotes15315
Node: Double Quotes15663
Node: ANSI-C Quoting16788
Node: Locale Translation18032
Node: Comments18928
Node: Shell Commands19546
Node: Simple Commands20418
Node: Pipelines21049
Node: Lists23748
Node: Compound Commands25477
Node: Looping Constructs26483
Node: Conditional Constructs28946
Node: Command Grouping39650
Node: Coprocesses41129
Node: GNU Parallel42803
Node: Shell Functions45271
Node: Shell Parameters50355
Node: Positional Parameters52960
Node: Special Parameters53860
Node: Shell Expansions56824
Node: Brace Expansion58750
Node: Tilde Expansion61504
Node: Shell Parameter Expansion63853
Node: Command Substitution73201
Node: Arithmetic Expansion74534
Node: Process Substitution75384
Node: Word Splitting76434
Node: Filename Expansion78057
Node: Pattern Matching80222
Node: Quote Removal83922
Node: Redirections84217
Node: Executing Commands93413
Node: Simple Command Expansion94083
Node: Command Search and Execution96013
Node: Command Execution Environment98350
Node: Environment101336
Node: Exit Status102995
Node: Signals104617
Node: Shell Scripts106585
Node: Shell Builtin Commands109103
Node: Bourne Shell Builtins111131
Node: Bash Builtins130512
Node: Modifying Shell Behavior157126
Node: The Set Builtin157471
Node: The Shopt Builtin167219
Node: Special Builtins181270
Node: Shell Variables182249
Node: Bourne Shell Variables182689
Node: Bash Variables184720
Node: Bash Features210231
Node: Invoking Bash211130
Node: Bash Startup Files216908
Node: Interactive Shells221927
Node: What is an Interactive Shell?222337
Node: Is this Shell Interactive?222986
Node: Interactive Shell Behavior223801
Node: Bash Conditional Expressions227081
Node: Shell Arithmetic230869
Node: Aliases233645
Node: Arrays236201
Node: The Directory Stack240409
Node: Directory Stack Builtins241128
Node: Controlling the Prompt244084
Node: The Restricted Shell246856
Node: Bash POSIX Mode248693
Node: Job Control258080
Node: Job Control Basics258540
Node: Job Control Builtins263259
Node: Job Control Variables267611
Node: Command Line Editing268769
Node: Introduction and Notation270441
Node: Readline Interaction272063
Node: Readline Bare Essentials273254
Node: Readline Movement Commands275043
Node: Readline Killing Commands276008
Node: Readline Arguments277928
Node: Searching278972
Node: Readline Init File281158
Node: Readline Init File Syntax282305
Node: Conditional Init Constructs298738
Node: Sample Init File301271
Node: Bindable Readline Commands304388
Node: Commands For Moving305595
Node: Commands For History306739
Node: Commands For Text310924
Node: Commands For Killing313597
Node: Numeric Arguments316054
Node: Commands For Completion317193
Node: Keyboard Macros321385
Node: Miscellaneous Commands322073
Node: Readline vi Mode327879
Node: Programmable Completion328786
Node: Programmable Completion Builtins336036
Node: A Programmable Completion Example345782
Node: Using History Interactively351032
Node: Bash History Facilities351716
Node: Bash History Builtins354707
Node: History Interaction358635
Node: Event Designators361340
Node: Word Designators362562
Node: Modifiers364201
Node: Installing Bash365605
Node: Basic Installation366742
Node: Compilers and Options369434
Node: Compiling For Multiple Architectures370175
Node: Installation Names371839
Node: Specifying the System Type372657
Node: Sharing Defaults373373
Node: Operation Controls374046
Node: Optional Features375004
Node: Reporting Bugs384576
Node: Major Differences From The Bourne Shell385777
Node: GNU Free Documentation License402469
Node: Indexes427665
Node: Builtin Index428119
Node: Reserved Word Index434946
Node: Variable Index437394
Node: Function Index450630
Node: Concept Index457858
Node: Top1089
Node: Introduction2939
Node: What is Bash?3167
Node: What is a shell?4280
Node: Definitions6819
Node: Basic Shell Features9737
Node: Shell Syntax10956
Node: Shell Operation11986
Node: Quoting13280
Node: Escape Character14583
Node: Single Quotes15068
Node: Double Quotes15416
Node: ANSI-C Quoting16541
Node: Locale Translation17785
Node: Comments18681
Node: Shell Commands19299
Node: Simple Commands20171
Node: Pipelines20802
Node: Lists23501
Node: Compound Commands25230
Node: Looping Constructs26236
Node: Conditional Constructs28699
Node: Command Grouping39532
Node: Coprocesses41011
Node: GNU Parallel42739
Node: Shell Functions45207
Node: Shell Parameters50291
Node: Positional Parameters54420
Node: Special Parameters55320
Node: Shell Expansions58284
Node: Brace Expansion60210
Node: Tilde Expansion62964
Node: Shell Parameter Expansion65313
Node: Command Substitution77317
Node: Arithmetic Expansion78650
Node: Process Substitution79500
Node: Word Splitting80550
Node: Filename Expansion82173
Node: Pattern Matching84338
Node: Quote Removal88038
Node: Redirections88333
Node: Executing Commands97497
Node: Simple Command Expansion98167
Node: Command Search and Execution100097
Node: Command Execution Environment102434
Node: Environment105420
Node: Exit Status107079
Node: Signals108701
Node: Shell Scripts110669
Node: Shell Builtin Commands113187
Node: Bourne Shell Builtins115215
Node: Bash Builtins134807
Node: Modifying Shell Behavior161837
Node: The Set Builtin162182
Node: The Shopt Builtin171930
Node: Special Builtins185981
Node: Shell Variables186960
Node: Bourne Shell Variables187400
Node: Bash Variables189431
Node: Bash Features214941
Node: Invoking Bash215840
Node: Bash Startup Files221618
Node: Interactive Shells226637
Node: What is an Interactive Shell?227047
Node: Is this Shell Interactive?227696
Node: Interactive Shell Behavior228511
Node: Bash Conditional Expressions231799
Node: Shell Arithmetic235587
Node: Aliases238363
Node: Arrays240919
Node: The Directory Stack245205
Node: Directory Stack Builtins245924
Node: Controlling the Prompt248880
Node: The Restricted Shell251652
Node: Bash POSIX Mode253489
Node: Job Control262876
Node: Job Control Basics263336
Node: Job Control Builtins268055
Node: Job Control Variables272407
Node: Command Line Editing273565
Node: Introduction and Notation275237
Node: Readline Interaction276859
Node: Readline Bare Essentials278050
Node: Readline Movement Commands279839
Node: Readline Killing Commands280804
Node: Readline Arguments282724
Node: Searching283768
Node: Readline Init File285954
Node: Readline Init File Syntax287101
Node: Conditional Init Constructs303534
Node: Sample Init File306067
Node: Bindable Readline Commands309184
Node: Commands For Moving310391
Node: Commands For History311535
Node: Commands For Text315720
Node: Commands For Killing318393
Node: Numeric Arguments320850
Node: Commands For Completion321989
Node: Keyboard Macros326181
Node: Miscellaneous Commands326869
Node: Readline vi Mode332675
Node: Programmable Completion333582
Node: Programmable Completion Builtins340832
Node: A Programmable Completion Example350578
Node: Using History Interactively355828
Node: Bash History Facilities356512
Node: Bash History Builtins359511
Node: History Interaction363439
Node: Event Designators366144
Node: Word Designators367366
Node: Modifiers369005
Node: Installing Bash370409
Node: Basic Installation371546
Node: Compilers and Options374238
Node: Compiling For Multiple Architectures374979
Node: Installation Names376643
Node: Specifying the System Type377461
Node: Sharing Defaults378177
Node: Operation Controls378850
Node: Optional Features379808
Node: Reporting Bugs389380
Node: Major Differences From The Bourne Shell390581
Node: GNU Free Documentation License407273
Node: Indexes432469
Node: Builtin Index432923
Node: Reserved Word Index439750
Node: Variable Index442198
Node: Function Index455434
Node: Concept Index462662

End Tag Table
+42 -41
View File
@@ -1,4 +1,4 @@
This is TeX, Version 3.1415926 (TeX Live 2010/Fink) (format=tex 2011.12.21) 5 MAR 2012 21:30
This is TeX, Version 3.1415926 (TeX Live 2011/Fink) (format=tex 2012.4.18) 5 JUL 2012 20:43
**/usr/homes/chet/src/bash/src/doc/bashref.texi
(/usr/homes/chet/src/bash/src/doc/bashref.texi (./texinfo.tex
Loading texinfo [version 2009-01-18.17]:
@@ -120,7 +120,7 @@ defuns,
\SAVEmargin=\box23
(/sw/share/texmf-dist/tex/generic/epsf/epsf.tex
This is `epsf.tex' v2.7.3 <23 July 2005>
This is `epsf.tex' v2.7.4 <14 February 2011>
\epsffilein=\read0
\epsfframemargin=\dimen39
\epsfframethickness=\dimen40
@@ -178,7 +178,7 @@ This is `epsf.tex' v2.7.3 <23 July 2005>
Chapter 2 [1] [2] [3] Chapter 3 [4] [5] [6]
[7] [8] [9] [10]
Overfull \hbox (43.33539pt too wide) in paragraph at lines 882--882
Overfull \hbox (43.33539pt too wide) in paragraph at lines 878--878
[]@texttt case @textttsl word @texttt in [ [(] @textttsl pat-tern @texttt [| @
textttsl pat-tern@texttt ][]) @textttsl command-list @texttt ;;][] esac[]
@@ -191,7 +191,7 @@ textttsl pat-tern@texttt ][]) @textttsl command-list @texttt ;;][] esac[]
.etc.
[11] [12] [13] [14] [15]
Overfull \hbox (89.6747pt too wide) in paragraph at lines 1263--1263
Overfull \hbox (89.6747pt too wide) in paragraph at lines 1262--1262
[]@texttt cat list | parallel "do-something1 {} config-{} ; do-something2 < {}
" | process-output[]
@@ -204,7 +204,7 @@ Overfull \hbox (89.6747pt too wide) in paragraph at lines 1263--1263
.etc.
Overfull \hbox (89.6747pt too wide) in paragraph at lines 1278--1278
Overfull \hbox (89.6747pt too wide) in paragraph at lines 1277--1277
[]@texttt { echo foss.org.my ; echo debian.org; echo freenetproject.org; } | p
arallel traceroute[]
@@ -217,7 +217,7 @@ arallel traceroute[]
.etc.
Overfull \hbox (106.92076pt too wide) in paragraph at lines 1284--1284
Overfull \hbox (106.92076pt too wide) in paragraph at lines 1283--1283
[]@texttt { echo foss.org.my ; echo debian.org; echo freenetproject.org; } | p
arallel -k traceroute[]
@@ -230,8 +230,9 @@ arallel -k traceroute[]
.etc.
[16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [29] [30]
[31] [32] [33] [34] [35] Chapter 4 [36] [37] [38] [39] [40] [41] [42] [43]
Underfull \hbox (badness 5231) in paragraph at lines 3567--3580
[31] [32] [33] [34] [35] [36] [37] [38] Chapter 4 [39] [40] [41] [42] [43]
[44] [45] [46] [47]
Underfull \hbox (badness 5231) in paragraph at lines 3718--3731
@texttt emacs-meta[]@textrm , @texttt emacs-ctlx[]@textrm , @texttt vi[]@textr
m , @texttt vi-move[]@textrm , @texttt vi-command[]@textrm , and
@@ -243,9 +244,9 @@ m , @texttt vi-move[]@textrm , @texttt vi-command[]@textrm , and
.@texttt c
.etc.
[44] [45] [46] [47] [48] [49] [50] [51] [52] [53] [54] [55] [56] [57] [58]
[59] [60]
Underfull \hbox (badness 5460) in paragraph at lines 4824--4830
[48] [49] [50] [51] [52] [53] [54] [55] [56] [57] [58] [59] [60] [61] [62]
[63] [64]
Underfull \hbox (badness 5460) in paragraph at lines 4984--4990
[]@textrm If set, range ex-pres-sions used in pat-tern match-ing (see
@hbox(8.2125+2.73749)x433.62, glue set 3.79674
@@ -256,9 +257,9 @@ Underfull \hbox (badness 5460) in paragraph at lines 4824--4830
.@glue 3.65 plus 1.825 minus 1.21666
.etc.
[61] [62] Chapter 5 [63] [64] [65] [66] [67] [68] [69] [70] [71] [72] [73]
Chapter 6 [74]
Overfull \hbox (51.96864pt too wide) in paragraph at lines 5723--5723
[65] [66] Chapter 5 [67] [68] [69] [70] [71] [72] [73] [74] [75] [76] [77]
Chapter 6 [78]
Overfull \hbox (51.96864pt too wide) in paragraph at lines 5884--5884
[]@texttt bash [long-opt] [-ir] [-abefhkmnptuvxdBCDHP] [-o @textttsl op-tion@t
exttt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
@@ -271,7 +272,7 @@ exttt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
.etc.
Overfull \hbox (76.23077pt too wide) in paragraph at lines 5724--5724
Overfull \hbox (76.23077pt too wide) in paragraph at lines 5885--5885
[]@texttt bash [long-opt] [-abefhkmnptuvxdBCDHP] [-o @textttsl op-tion@texttt
] [-O @textttsl shopt_option@texttt ] -c @textttsl string @texttt [@textttsl ar
-
@@ -285,7 +286,7 @@ Overfull \hbox (76.23077pt too wide) in paragraph at lines 5724--5724
.etc.
Overfull \hbox (34.72258pt too wide) in paragraph at lines 5725--5725
Overfull \hbox (34.72258pt too wide) in paragraph at lines 5886--5886
[]@texttt bash [long-opt] -s [-abefhkmnptuvxdBCDHP] [-o @textttsl op-tion@text
tt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
@@ -297,8 +298,8 @@ tt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
.@texttt s
.etc.
[75] [76]
Underfull \hbox (badness 2245) in paragraph at lines 5897--5899
[79] [80]
Underfull \hbox (badness 2245) in paragraph at lines 6058--6060
[]@textrm When a lo-gin shell ex-its, Bash reads and ex-e-cutes com-mands from
the file
@@ -310,8 +311,8 @@ the file
.@textrm n
.etc.
[77] [78] [79] [80] [81] [82] [83] [84] [85] [86] [87] [88] [89] [90]
Underfull \hbox (badness 2521) in paragraph at lines 7094--7097
[81] [82] [83] [84] [85] [86] [87] [88] [89] [90] [91] [92] [93] [94]
Underfull \hbox (badness 2521) in paragraph at lines 7256--7259
@textrm `@texttt --enable-strict-posix-default[]@textrm '[] to @texttt configur
e[] @textrm when build-ing (see Sec-tion 10.8
@@ -323,9 +324,9 @@ e[] @textrm when build-ing (see Sec-tion 10.8
.@texttt n
.etc.
Chapter 7 [91] [92] [93] [94] [95]
(/usr/homes/chet/src/bash/src/lib/readline/doc/rluser.texi Chapter 8 [96]
[97] [98] [99] [100] [101] [102]
Chapter 7 [95] [96] [97] [98] [99]
(/usr/homes/chet/src/bash/src/lib/readline/doc/rluser.texi Chapter 8 [100]
[101] [102] [103] [104] [105] [106]
Underfull \hbox (badness 5231) in paragraph at lines 561--577
@texttt emacs-meta[]@textrm , @texttt emacs-ctlx[]@textrm , @texttt vi[]@textr
m , @texttt vi-move[]@textrm , @texttt vi-command[]@textrm , and
@@ -338,7 +339,7 @@ m , @texttt vi-move[]@textrm , @texttt vi-command[]@textrm , and
.@texttt c
.etc.
[103] [104] [105] [106] [107] [108]
[107] [108] [109] [110] [111] [112]
Overfull \hbox (26.43913pt too wide) in paragraph at lines 918--918
[]@texttt Meta-Control-h: backward-kill-word Text after the function name is i
gnored[]
@@ -351,8 +352,8 @@ gnored[]
.@texttt t
.etc.
[109] [110] [111] [112] [113] [114] [115] [116] [117] [118] [119] [120]
[121] [122]
[113] [114] [115] [116] [117] [118] [119] [120] [121] [122] [123] [124]
[125] [126]
Overfull \hbox (12.05716pt too wide) in paragraph at lines 1866--1866
[]@texttt complete [-abcdefgjksuv] [-o @textttsl comp-option@texttt ] [-DE] [-
A @textttsl ac-tion@texttt ] [-
@@ -365,7 +366,7 @@ A @textttsl ac-tion@texttt ] [-
.@texttt m
.etc.
[123]
[127]
Underfull \hbox (badness 2753) in paragraph at lines 1980--1983
@texttt hostname[]@textrm Hostnames, as taken from the file spec-i-fied by
@@ -377,7 +378,7 @@ Underfull \hbox (badness 2753) in paragraph at lines 1980--1983
.@texttt o
.etc.
[124] [125] [126]
[128] [129] [130]
Overfull \hbox (26.43913pt too wide) in paragraph at lines 2131--2131
[] @texttt # Tilde expansion, with side effect of expanding tilde to full p
athname[]
@@ -390,9 +391,9 @@ athname[]
.@penalty 10000
.etc.
[127]) (/usr/homes/chet/src/bash/src/lib/readline/doc/hsuser.texi Chapter 9
[128] [129] [130] [131] [132]) Chapter 10 [133] [134] [135] [136] [137]
Underfull \hbox (badness 2772) in paragraph at lines 7700--7704
[131]) (/usr/homes/chet/src/bash/src/lib/readline/doc/hsuser.texi Chapter 9
[132] [133] [134] [135] [136]) Chapter 10 [137] [138] [139] [140] [141]
Underfull \hbox (badness 2772) in paragraph at lines 7862--7866
[]@textrm Enable sup-port for large files (@texttt http://www.sas.com/standard
s/large_
@@ -404,18 +405,18 @@ s/large_
.@textrm a
.etc.
[138] [139] [140] Appendix A [141] [142] Appendix B [143] [144] [145] [146]
[147] [148] [149] Appendix C [150] (./fdl.texi [151] [152] [153] [154] [155]
[156] [157]) Appendix D [158] (./bashref.bts) [159] (./bashref.rws)
(./bashref.vrs [160] [161]) (./bashref.fns [162] [163]) (./bashref.cps [164])
[165] [166] )
[142] [143] [144] Appendix A [145] [146] Appendix B [147] [148] [149] [150]
[151] [152] [153] Appendix C [154] (./fdl.texi [155] [156] [157] [158] [159]
[160] [161]) Appendix D [162] (./bashref.bts) [163] (./bashref.rws)
(./bashref.vrs [164] [165]) (./bashref.fns [166] [167]) (./bashref.cps [168])
[169] [170] )
Here is how much of TeX's memory you used:
2084 strings out of 497974
28630 string characters out of 3220832
65784 words of memory out of 3000000
2900 multiletter control sequences out of 15000+200000
2085 strings out of 497974
28645 string characters out of 3220833
65554 words of memory out of 3000000
2901 multiletter control sequences out of 15000+200000
32127 words of font info for 112 fonts, out of 3000000 for 9000
51 hyphenation exceptions out of 8191
16i,6n,14p,319b,705s stack positions out of 5000i,500n,10000p,200000b,50000s
Output written on bashref.dvi (172 pages, 702588 bytes).
Output written on bashref.dvi (176 pages, 708852 bytes).
+5086 -4940
View File
File diff suppressed because it is too large Load Diff
+3 -7
View File
@@ -16,13 +16,9 @@ are preserved on all copies.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no
Invariant Sections, with the Front-Cover texts being ``A GNU Manual'',
and with the Back-Cover Texts as in (a) 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.''
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in the section entitled
``GNU Free Documentation License''.
@end quotation
@endinput
+109 -109
View File
@@ -24,116 +24,116 @@
@numsubsecentry{GNU Parallel}{3.2.6}{GNU Parallel}{15}
@numsecentry{Shell Functions}{3.3}{Shell Functions}{16}
@numsecentry{Shell Parameters}{3.4}{Shell Parameters}{18}
@numsubsecentry{Positional Parameters}{3.4.1}{Positional Parameters}{18}
@numsubsecentry{Positional Parameters}{3.4.1}{Positional Parameters}{19}
@numsubsecentry{Special Parameters}{3.4.2}{Special Parameters}{19}
@numsecentry{Shell Expansions}{3.5}{Shell Expansions}{20}
@numsubsecentry{Brace Expansion}{3.5.1}{Brace Expansion}{20}
@numsubsecentry{Brace Expansion}{3.5.1}{Brace Expansion}{21}
@numsubsecentry{Tilde Expansion}{3.5.2}{Tilde Expansion}{21}
@numsubsecentry{Shell Parameter Expansion}{3.5.3}{Shell Parameter Expansion}{22}
@numsubsecentry{Command Substitution}{3.5.4}{Command Substitution}{25}
@numsubsecentry{Arithmetic Expansion}{3.5.5}{Arithmetic Expansion}{25}
@numsubsecentry{Process Substitution}{3.5.6}{Process Substitution}{25}
@numsubsecentry{Word Splitting}{3.5.7}{Word Splitting}{26}
@numsubsecentry{Filename Expansion}{3.5.8}{Filename Expansion}{26}
@numsubsubsecentry{Pattern Matching}{3.5.8.1}{Pattern Matching}{27}
@numsubsecentry{Quote Removal}{3.5.9}{Quote Removal}{28}
@numsecentry{Redirections}{3.6}{Redirections}{28}
@numsubsecentry{Redirecting Input}{3.6.1}{}{29}
@numsubsecentry{Redirecting Output}{3.6.2}{}{30}
@numsubsecentry{Appending Redirected Output}{3.6.3}{}{30}
@numsubsecentry{Redirecting Standard Output and Standard Error}{3.6.4}{}{30}
@numsubsecentry{Appending Standard Output and Standard Error}{3.6.5}{}{30}
@numsubsecentry{Here Documents}{3.6.6}{}{31}
@numsubsecentry{Here Strings}{3.6.7}{}{31}
@numsubsecentry{Duplicating File Descriptors}{3.6.8}{}{31}
@numsubsecentry{Moving File Descriptors}{3.6.9}{}{32}
@numsubsecentry{Opening File Descriptors for Reading and Writing}{3.6.10}{}{32}
@numsecentry{Executing Commands}{3.7}{Executing Commands}{32}
@numsubsecentry{Simple Command Expansion}{3.7.1}{Simple Command Expansion}{32}
@numsubsecentry{Command Search and Execution}{3.7.2}{Command Search and Execution}{33}
@numsubsecentry{Command Execution Environment}{3.7.3}{Command Execution Environment}{33}
@numsubsecentry{Environment}{3.7.4}{Environment}{34}
@numsubsecentry{Exit Status}{3.7.5}{Exit Status}{35}
@numsubsecentry{Signals}{3.7.6}{Signals}{35}
@numsecentry{Shell Scripts}{3.8}{Shell Scripts}{36}
@numchapentry{Shell Builtin Commands}{4}{Shell Builtin Commands}{37}
@numsecentry{Bourne Shell Builtins}{4.1}{Bourne Shell Builtins}{37}
@numsecentry{Bash Builtin Commands}{4.2}{Bash Builtins}{44}
@numsecentry{Modifying Shell Behavior}{4.3}{Modifying Shell Behavior}{54}
@numsubsecentry{The Set Builtin}{4.3.1}{The Set Builtin}{54}
@numsubsecentry{The Shopt Builtin}{4.3.2}{The Shopt Builtin}{58}
@numsecentry{Special Builtins}{4.4}{Special Builtins}{63}
@numchapentry{Shell Variables}{5}{Shell Variables}{65}
@numsecentry{Bourne Shell Variables}{5.1}{Bourne Shell Variables}{65}
@numsecentry{Bash Variables}{5.2}{Bash Variables}{65}
@numchapentry{Bash Features}{6}{Bash Features}{75}
@numsecentry{Invoking Bash}{6.1}{Invoking Bash}{75}
@numsecentry{Bash Startup Files}{6.2}{Bash Startup Files}{77}
@numsecentry{Interactive Shells}{6.3}{Interactive Shells}{78}
@numsubsecentry{What is an Interactive Shell?}{6.3.1}{What is an Interactive Shell?}{79}
@numsubsecentry{Is this Shell Interactive?}{6.3.2}{Is this Shell Interactive?}{79}
@numsubsecentry{Interactive Shell Behavior}{6.3.3}{Interactive Shell Behavior}{79}
@numsecentry{Bash Conditional Expressions}{6.4}{Bash Conditional Expressions}{80}
@numsecentry{Shell Arithmetic}{6.5}{Shell Arithmetic}{82}
@numsecentry{Aliases}{6.6}{Aliases}{83}
@numsecentry{Arrays}{6.7}{Arrays}{84}
@numsecentry{The Directory Stack}{6.8}{The Directory Stack}{85}
@numsubsecentry{Directory Stack Builtins}{6.8.1}{Directory Stack Builtins}{85}
@numsecentry{Controlling the Prompt}{6.9}{Controlling the Prompt}{87}
@numsecentry{The Restricted Shell}{6.10}{The Restricted Shell}{88}
@numsecentry{Bash POSIX Mode}{6.11}{Bash POSIX Mode}{88}
@numchapentry{Job Control}{7}{Job Control}{93}
@numsecentry{Job Control Basics}{7.1}{Job Control Basics}{93}
@numsecentry{Job Control Builtins}{7.2}{Job Control Builtins}{94}
@numsecentry{Job Control Variables}{7.3}{Job Control Variables}{96}
@numchapentry{Command Line Editing}{8}{Command Line Editing}{97}
@numsecentry{Introduction to Line Editing}{8.1}{Introduction and Notation}{97}
@numsecentry{Readline Interaction}{8.2}{Readline Interaction}{97}
@numsubsecentry{Readline Bare Essentials}{8.2.1}{Readline Bare Essentials}{98}
@numsubsecentry{Readline Movement Commands}{8.2.2}{Readline Movement Commands}{98}
@numsubsecentry{Readline Killing Commands}{8.2.3}{Readline Killing Commands}{99}
@numsubsecentry{Readline Arguments}{8.2.4}{Readline Arguments}{99}
@numsubsecentry{Searching for Commands in the History}{8.2.5}{Searching}{99}
@numsecentry{Readline Init File}{8.3}{Readline Init File}{100}
@numsubsecentry{Readline Init File Syntax}{8.3.1}{Readline Init File Syntax}{100}
@numsubsecentry{Conditional Init Constructs}{8.3.2}{Conditional Init Constructs}{107}
@numsubsecentry{Sample Init File}{8.3.3}{Sample Init File}{108}
@numsecentry{Bindable Readline Commands}{8.4}{Bindable Readline Commands}{111}
@numsubsecentry{Commands For Moving}{8.4.1}{Commands For Moving}{111}
@numsubsecentry{Commands For Manipulating The History}{8.4.2}{Commands For History}{112}
@numsubsecentry{Commands For Changing Text}{8.4.3}{Commands For Text}{113}
@numsubsecentry{Killing And Yanking}{8.4.4}{Commands For Killing}{114}
@numsubsecentry{Specifying Numeric Arguments}{8.4.5}{Numeric Arguments}{115}
@numsubsecentry{Letting Readline Type For You}{8.4.6}{Commands For Completion}{116}
@numsubsecentry{Keyboard Macros}{8.4.7}{Keyboard Macros}{117}
@numsubsecentry{Some Miscellaneous Commands}{8.4.8}{Miscellaneous Commands}{118}
@numsecentry{Readline vi Mode}{8.5}{Readline vi Mode}{120}
@numsecentry{Programmable Completion}{8.6}{Programmable Completion}{120}
@numsecentry{Programmable Completion Builtins}{8.7}{Programmable Completion Builtins}{122}
@numsecentry{A Programmable Completion Example}{8.8}{A Programmable Completion Example}{126}
@numchapentry{Using History Interactively}{9}{Using History Interactively}{129}
@numsecentry{Bash History Facilities}{9.1}{Bash History Facilities}{129}
@numsecentry{Bash History Builtins}{9.2}{Bash History Builtins}{129}
@numsecentry{History Expansion}{9.3}{History Interaction}{131}
@numsubsecentry{Event Designators}{9.3.1}{Event Designators}{132}
@numsubsecentry{Word Designators}{9.3.2}{Word Designators}{132}
@numsubsecentry{Modifiers}{9.3.3}{Modifiers}{133}
@numchapentry{Installing Bash}{10}{Installing Bash}{135}
@numsecentry{Basic Installation}{10.1}{Basic Installation}{135}
@numsecentry{Compilers and Options}{10.2}{Compilers and Options}{136}
@numsecentry{Compiling For Multiple Architectures}{10.3}{Compiling For Multiple Architectures}{136}
@numsecentry{Installation Names}{10.4}{Installation Names}{136}
@numsecentry{Specifying the System Type}{10.5}{Specifying the System Type}{136}
@numsecentry{Sharing Defaults}{10.6}{Sharing Defaults}{137}
@numsecentry{Operation Controls}{10.7}{Operation Controls}{137}
@numsecentry{Optional Features}{10.8}{Optional Features}{137}
@appentry{Reporting Bugs}{A}{Reporting Bugs}{143}
@appentry{Major Differences From The Bourne Shell}{B}{Major Differences From The Bourne Shell}{145}
@appsecentry{Implementation Differences From The SVR4.2 Shell}{B.1}{}{149}
@appentry{GNU Free Documentation License}{C}{GNU Free Documentation License}{151}
@appentry{Indexes}{D}{Indexes}{159}
@appsecentry{Index of Shell Builtin Commands}{D.1}{Builtin Index}{159}
@appsecentry{Index of Shell Reserved Words}{D.2}{Reserved Word Index}{160}
@appsecentry{Parameter and Variable Index}{D.3}{Variable Index}{160}
@appsecentry{Function Index}{D.4}{Function Index}{162}
@appsecentry{Concept Index}{D.5}{Concept Index}{164}
@numsubsecentry{Command Substitution}{3.5.4}{Command Substitution}{27}
@numsubsecentry{Arithmetic Expansion}{3.5.5}{Arithmetic Expansion}{28}
@numsubsecentry{Process Substitution}{3.5.6}{Process Substitution}{28}
@numsubsecentry{Word Splitting}{3.5.7}{Word Splitting}{28}
@numsubsecentry{Filename Expansion}{3.5.8}{Filename Expansion}{29}
@numsubsubsecentry{Pattern Matching}{3.5.8.1}{Pattern Matching}{29}
@numsubsecentry{Quote Removal}{3.5.9}{Quote Removal}{30}
@numsecentry{Redirections}{3.6}{Redirections}{31}
@numsubsecentry{Redirecting Input}{3.6.1}{}{32}
@numsubsecentry{Redirecting Output}{3.6.2}{}{32}
@numsubsecentry{Appending Redirected Output}{3.6.3}{}{32}
@numsubsecentry{Redirecting Standard Output and Standard Error}{3.6.4}{}{32}
@numsubsecentry{Appending Standard Output and Standard Error}{3.6.5}{}{33}
@numsubsecentry{Here Documents}{3.6.6}{}{33}
@numsubsecentry{Here Strings}{3.6.7}{}{33}
@numsubsecentry{Duplicating File Descriptors}{3.6.8}{}{33}
@numsubsecentry{Moving File Descriptors}{3.6.9}{}{34}
@numsubsecentry{Opening File Descriptors for Reading and Writing}{3.6.10}{}{34}
@numsecentry{Executing Commands}{3.7}{Executing Commands}{34}
@numsubsecentry{Simple Command Expansion}{3.7.1}{Simple Command Expansion}{34}
@numsubsecentry{Command Search and Execution}{3.7.2}{Command Search and Execution}{35}
@numsubsecentry{Command Execution Environment}{3.7.3}{Command Execution Environment}{36}
@numsubsecentry{Environment}{3.7.4}{Environment}{37}
@numsubsecentry{Exit Status}{3.7.5}{Exit Status}{37}
@numsubsecentry{Signals}{3.7.6}{Signals}{38}
@numsecentry{Shell Scripts}{3.8}{Shell Scripts}{38}
@numchapentry{Shell Builtin Commands}{4}{Shell Builtin Commands}{41}
@numsecentry{Bourne Shell Builtins}{4.1}{Bourne Shell Builtins}{41}
@numsecentry{Bash Builtin Commands}{4.2}{Bash Builtins}{48}
@numsecentry{Modifying Shell Behavior}{4.3}{Modifying Shell Behavior}{58}
@numsubsecentry{The Set Builtin}{4.3.1}{The Set Builtin}{58}
@numsubsecentry{The Shopt Builtin}{4.3.2}{The Shopt Builtin}{62}
@numsecentry{Special Builtins}{4.4}{Special Builtins}{67}
@numchapentry{Shell Variables}{5}{Shell Variables}{69}
@numsecentry{Bourne Shell Variables}{5.1}{Bourne Shell Variables}{69}
@numsecentry{Bash Variables}{5.2}{Bash Variables}{69}
@numchapentry{Bash Features}{6}{Bash Features}{79}
@numsecentry{Invoking Bash}{6.1}{Invoking Bash}{79}
@numsecentry{Bash Startup Files}{6.2}{Bash Startup Files}{81}
@numsecentry{Interactive Shells}{6.3}{Interactive Shells}{82}
@numsubsecentry{What is an Interactive Shell?}{6.3.1}{What is an Interactive Shell?}{83}
@numsubsecentry{Is this Shell Interactive?}{6.3.2}{Is this Shell Interactive?}{83}
@numsubsecentry{Interactive Shell Behavior}{6.3.3}{Interactive Shell Behavior}{83}
@numsecentry{Bash Conditional Expressions}{6.4}{Bash Conditional Expressions}{84}
@numsecentry{Shell Arithmetic}{6.5}{Shell Arithmetic}{86}
@numsecentry{Aliases}{6.6}{Aliases}{87}
@numsecentry{Arrays}{6.7}{Arrays}{88}
@numsecentry{The Directory Stack}{6.8}{The Directory Stack}{89}
@numsubsecentry{Directory Stack Builtins}{6.8.1}{Directory Stack Builtins}{89}
@numsecentry{Controlling the Prompt}{6.9}{Controlling the Prompt}{91}
@numsecentry{The Restricted Shell}{6.10}{The Restricted Shell}{92}
@numsecentry{Bash POSIX Mode}{6.11}{Bash POSIX Mode}{92}
@numchapentry{Job Control}{7}{Job Control}{97}
@numsecentry{Job Control Basics}{7.1}{Job Control Basics}{97}
@numsecentry{Job Control Builtins}{7.2}{Job Control Builtins}{98}
@numsecentry{Job Control Variables}{7.3}{Job Control Variables}{100}
@numchapentry{Command Line Editing}{8}{Command Line Editing}{101}
@numsecentry{Introduction to Line Editing}{8.1}{Introduction and Notation}{101}
@numsecentry{Readline Interaction}{8.2}{Readline Interaction}{101}
@numsubsecentry{Readline Bare Essentials}{8.2.1}{Readline Bare Essentials}{102}
@numsubsecentry{Readline Movement Commands}{8.2.2}{Readline Movement Commands}{102}
@numsubsecentry{Readline Killing Commands}{8.2.3}{Readline Killing Commands}{103}
@numsubsecentry{Readline Arguments}{8.2.4}{Readline Arguments}{103}
@numsubsecentry{Searching for Commands in the History}{8.2.5}{Searching}{103}
@numsecentry{Readline Init File}{8.3}{Readline Init File}{104}
@numsubsecentry{Readline Init File Syntax}{8.3.1}{Readline Init File Syntax}{104}
@numsubsecentry{Conditional Init Constructs}{8.3.2}{Conditional Init Constructs}{111}
@numsubsecentry{Sample Init File}{8.3.3}{Sample Init File}{112}
@numsecentry{Bindable Readline Commands}{8.4}{Bindable Readline Commands}{115}
@numsubsecentry{Commands For Moving}{8.4.1}{Commands For Moving}{115}
@numsubsecentry{Commands For Manipulating The History}{8.4.2}{Commands For History}{116}
@numsubsecentry{Commands For Changing Text}{8.4.3}{Commands For Text}{117}
@numsubsecentry{Killing And Yanking}{8.4.4}{Commands For Killing}{118}
@numsubsecentry{Specifying Numeric Arguments}{8.4.5}{Numeric Arguments}{119}
@numsubsecentry{Letting Readline Type For You}{8.4.6}{Commands For Completion}{120}
@numsubsecentry{Keyboard Macros}{8.4.7}{Keyboard Macros}{121}
@numsubsecentry{Some Miscellaneous Commands}{8.4.8}{Miscellaneous Commands}{122}
@numsecentry{Readline vi Mode}{8.5}{Readline vi Mode}{124}
@numsecentry{Programmable Completion}{8.6}{Programmable Completion}{124}
@numsecentry{Programmable Completion Builtins}{8.7}{Programmable Completion Builtins}{126}
@numsecentry{A Programmable Completion Example}{8.8}{A Programmable Completion Example}{130}
@numchapentry{Using History Interactively}{9}{Using History Interactively}{133}
@numsecentry{Bash History Facilities}{9.1}{Bash History Facilities}{133}
@numsecentry{Bash History Builtins}{9.2}{Bash History Builtins}{133}
@numsecentry{History Expansion}{9.3}{History Interaction}{135}
@numsubsecentry{Event Designators}{9.3.1}{Event Designators}{136}
@numsubsecentry{Word Designators}{9.3.2}{Word Designators}{136}
@numsubsecentry{Modifiers}{9.3.3}{Modifiers}{137}
@numchapentry{Installing Bash}{10}{Installing Bash}{139}
@numsecentry{Basic Installation}{10.1}{Basic Installation}{139}
@numsecentry{Compilers and Options}{10.2}{Compilers and Options}{140}
@numsecentry{Compiling For Multiple Architectures}{10.3}{Compiling For Multiple Architectures}{140}
@numsecentry{Installation Names}{10.4}{Installation Names}{140}
@numsecentry{Specifying the System Type}{10.5}{Specifying the System Type}{140}
@numsecentry{Sharing Defaults}{10.6}{Sharing Defaults}{141}
@numsecentry{Operation Controls}{10.7}{Operation Controls}{141}
@numsecentry{Optional Features}{10.8}{Optional Features}{141}
@appentry{Reporting Bugs}{A}{Reporting Bugs}{147}
@appentry{Major Differences From The Bourne Shell}{B}{Major Differences From The Bourne Shell}{149}
@appsecentry{Implementation Differences From The SVR4.2 Shell}{B.1}{}{153}
@appentry{GNU Free Documentation License}{C}{GNU Free Documentation License}{155}
@appentry{Indexes}{D}{Indexes}{163}
@appsecentry{Index of Shell Builtin Commands}{D.1}{Builtin Index}{163}
@appsecentry{Index of Shell Reserved Words}{D.2}{Reserved Word Index}{164}
@appsecentry{Parameter and Variable Index}{D.3}{Variable Index}{164}
@appsecentry{Function Index}{D.4}{Function Index}{166}
@appsecentry{Concept Index}{D.5}{Concept Index}{168}
+131 -131
View File
@@ -6,134 +6,134 @@
\entry{#}{19}{\code {#}}
\entry{?}{19}{\code {?}}
\entry{-}{19}{\code {-}}
\entry{$}{19}{\code {$}}
\entry{!}{19}{\code {!}}
\entry{0}{19}{\code {0}}
\entry{_}{19}{\code {_}}
\entry{CDPATH}{65}{\code {CDPATH}}
\entry{HOME}{65}{\code {HOME}}
\entry{IFS}{65}{\code {IFS}}
\entry{MAIL}{65}{\code {MAIL}}
\entry{MAILPATH}{65}{\code {MAILPATH}}
\entry{OPTARG}{65}{\code {OPTARG}}
\entry{OPTIND}{65}{\code {OPTIND}}
\entry{PATH}{65}{\code {PATH}}
\entry{PS1}{65}{\code {PS1}}
\entry{PS2}{65}{\code {PS2}}
\entry{BASH}{65}{\code {BASH}}
\entry{BASHOPTS}{66}{\code {BASHOPTS}}
\entry{BASHPID}{66}{\code {BASHPID}}
\entry{BASH_ALIASES}{66}{\code {BASH_ALIASES}}
\entry{BASH_ARGC}{66}{\code {BASH_ARGC}}
\entry{BASH_ARGV}{66}{\code {BASH_ARGV}}
\entry{BASH_CMDS}{66}{\code {BASH_CMDS}}
\entry{BASH_COMMAND}{66}{\code {BASH_COMMAND}}
\entry{BASH_ENV}{66}{\code {BASH_ENV}}
\entry{BASH_EXECUTION_STRING}{66}{\code {BASH_EXECUTION_STRING}}
\entry{BASH_LINENO}{67}{\code {BASH_LINENO}}
\entry{BASH_REMATCH}{67}{\code {BASH_REMATCH}}
\entry{BASH_SOURCE}{67}{\code {BASH_SOURCE}}
\entry{BASH_SUBSHELL}{67}{\code {BASH_SUBSHELL}}
\entry{BASH_VERSINFO}{67}{\code {BASH_VERSINFO}}
\entry{BASH_VERSION}{67}{\code {BASH_VERSION}}
\entry{BASH_XTRACEFD}{67}{\code {BASH_XTRACEFD}}
\entry{COLUMNS}{68}{\code {COLUMNS}}
\entry{COMP_CWORD}{68}{\code {COMP_CWORD}}
\entry{COMP_LINE}{68}{\code {COMP_LINE}}
\entry{COMP_POINT}{68}{\code {COMP_POINT}}
\entry{COMP_TYPE}{68}{\code {COMP_TYPE}}
\entry{COMP_KEY}{68}{\code {COMP_KEY}}
\entry{COMP_WORDBREAKS}{68}{\code {COMP_WORDBREAKS}}
\entry{COMP_WORDS}{68}{\code {COMP_WORDS}}
\entry{COMPREPLY}{69}{\code {COMPREPLY}}
\entry{COPROC}{69}{\code {COPROC}}
\entry{DIRSTACK}{69}{\code {DIRSTACK}}
\entry{EMACS}{69}{\code {EMACS}}
\entry{ENV}{69}{\code {ENV}}
\entry{EUID}{69}{\code {EUID}}
\entry{FCEDIT}{69}{\code {FCEDIT}}
\entry{FIGNORE}{69}{\code {FIGNORE}}
\entry{FUNCNAME}{69}{\code {FUNCNAME}}
\entry{FUNCNEST}{69}{\code {FUNCNEST}}
\entry{GLOBIGNORE}{69}{\code {GLOBIGNORE}}
\entry{GROUPS}{70}{\code {GROUPS}}
\entry{histchars}{70}{\code {histchars}}
\entry{HISTCMD}{70}{\code {HISTCMD}}
\entry{HISTCONTROL}{70}{\code {HISTCONTROL}}
\entry{HISTFILE}{70}{\code {HISTFILE}}
\entry{HISTFILESIZE}{70}{\code {HISTFILESIZE}}
\entry{HISTIGNORE}{70}{\code {HISTIGNORE}}
\entry{HISTSIZE}{71}{\code {HISTSIZE}}
\entry{HISTTIMEFORMAT}{71}{\code {HISTTIMEFORMAT}}
\entry{HOSTFILE}{71}{\code {HOSTFILE}}
\entry{HOSTNAME}{71}{\code {HOSTNAME}}
\entry{HOSTTYPE}{71}{\code {HOSTTYPE}}
\entry{IGNOREEOF}{71}{\code {IGNOREEOF}}
\entry{INPUTRC}{71}{\code {INPUTRC}}
\entry{LANG}{71}{\code {LANG}}
\entry{LC_ALL}{71}{\code {LC_ALL}}
\entry{LC_COLLATE}{72}{\code {LC_COLLATE}}
\entry{LC_CTYPE}{72}{\code {LC_CTYPE}}
\entry{LC_MESSAGES}{72}{\code {LC_MESSAGES}}
\entry{LC_NUMERIC}{72}{\code {LC_NUMERIC}}
\entry{LINENO}{72}{\code {LINENO}}
\entry{LINES}{72}{\code {LINES}}
\entry{MACHTYPE}{72}{\code {MACHTYPE}}
\entry{MAILCHECK}{72}{\code {MAILCHECK}}
\entry{MAPFILE}{72}{\code {MAPFILE}}
\entry{OLDPWD}{72}{\code {OLDPWD}}
\entry{OPTERR}{72}{\code {OPTERR}}
\entry{OSTYPE}{72}{\code {OSTYPE}}
\entry{PIPESTATUS}{72}{\code {PIPESTATUS}}
\entry{POSIXLY_CORRECT}{72}{\code {POSIXLY_CORRECT}}
\entry{PPID}{73}{\code {PPID}}
\entry{PROMPT_COMMAND}{73}{\code {PROMPT_COMMAND}}
\entry{PROMPT_DIRTRIM}{73}{\code {PROMPT_DIRTRIM}}
\entry{PS3}{73}{\code {PS3}}
\entry{PS4}{73}{\code {PS4}}
\entry{PWD}{73}{\code {PWD}}
\entry{RANDOM}{73}{\code {RANDOM}}
\entry{READLINE_LINE}{73}{\code {READLINE_LINE}}
\entry{READLINE_POINT}{73}{\code {READLINE_POINT}}
\entry{REPLY}{73}{\code {REPLY}}
\entry{SECONDS}{73}{\code {SECONDS}}
\entry{SHELL}{73}{\code {SHELL}}
\entry{SHELLOPTS}{73}{\code {SHELLOPTS}}
\entry{SHLVL}{73}{\code {SHLVL}}
\entry{TIMEFORMAT}{74}{\code {TIMEFORMAT}}
\entry{TMOUT}{74}{\code {TMOUT}}
\entry{TMPDIR}{74}{\code {TMPDIR}}
\entry{UID}{74}{\code {UID}}
\entry{auto_resume}{96}{\code {auto_resume}}
\entry{bell-style}{101}{\code {bell-style}}
\entry{bind-tty-special-chars}{101}{\code {bind-tty-special-chars}}
\entry{colored-stats}{101}{\code {colored-stats}}
\entry{comment-begin}{101}{\code {comment-begin}}
\entry{completion-display-width}{101}{\code {completion-display-width}}
\entry{completion-ignore-case}{101}{\code {completion-ignore-case}}
\entry{completion-map-case}{101}{\code {completion-map-case}}
\entry{completion-prefix-display-length}{102}{\code {completion-prefix-display-length}}
\entry{completion-query-items}{102}{\code {completion-query-items}}
\entry{convert-meta}{102}{\code {convert-meta}}
\entry{disable-completion}{102}{\code {disable-completion}}
\entry{editing-mode}{102}{\code {editing-mode}}
\entry{enable-keypad}{102}{\code {enable-keypad}}
\entry{expand-tilde}{102}{\code {expand-tilde}}
\entry{history-preserve-point}{103}{\code {history-preserve-point}}
\entry{history-size}{103}{\code {history-size}}
\entry{horizontal-scroll-mode}{103}{\code {horizontal-scroll-mode}}
\entry{input-meta}{103}{\code {input-meta}}
\entry{meta-flag}{103}{\code {meta-flag}}
\entry{isearch-terminators}{103}{\code {isearch-terminators}}
\entry{keymap}{103}{\code {keymap}}
\entry{mark-modified-lines}{104}{\code {mark-modified-lines}}
\entry{mark-symlinked-directories}{104}{\code {mark-symlinked-directories}}
\entry{match-hidden-files}{104}{\code {match-hidden-files}}
\entry{menu-complete-display-prefix}{104}{\code {menu-complete-display-prefix}}
\entry{output-meta}{104}{\code {output-meta}}
\entry{page-completions}{104}{\code {page-completions}}
\entry{revert-all-at-newline}{104}{\code {revert-all-at-newline}}
\entry{show-all-if-ambiguous}{104}{\code {show-all-if-ambiguous}}
\entry{show-all-if-unmodified}{105}{\code {show-all-if-unmodified}}
\entry{skip-completed-text}{105}{\code {skip-completed-text}}
\entry{visible-stats}{105}{\code {visible-stats}}
\entry{$}{20}{\code {$}}
\entry{!}{20}{\code {!}}
\entry{0}{20}{\code {0}}
\entry{_}{20}{\code {_}}
\entry{CDPATH}{69}{\code {CDPATH}}
\entry{HOME}{69}{\code {HOME}}
\entry{IFS}{69}{\code {IFS}}
\entry{MAIL}{69}{\code {MAIL}}
\entry{MAILPATH}{69}{\code {MAILPATH}}
\entry{OPTARG}{69}{\code {OPTARG}}
\entry{OPTIND}{69}{\code {OPTIND}}
\entry{PATH}{69}{\code {PATH}}
\entry{PS1}{69}{\code {PS1}}
\entry{PS2}{69}{\code {PS2}}
\entry{BASH}{69}{\code {BASH}}
\entry{BASHOPTS}{70}{\code {BASHOPTS}}
\entry{BASHPID}{70}{\code {BASHPID}}
\entry{BASH_ALIASES}{70}{\code {BASH_ALIASES}}
\entry{BASH_ARGC}{70}{\code {BASH_ARGC}}
\entry{BASH_ARGV}{70}{\code {BASH_ARGV}}
\entry{BASH_CMDS}{70}{\code {BASH_CMDS}}
\entry{BASH_COMMAND}{70}{\code {BASH_COMMAND}}
\entry{BASH_ENV}{70}{\code {BASH_ENV}}
\entry{BASH_EXECUTION_STRING}{70}{\code {BASH_EXECUTION_STRING}}
\entry{BASH_LINENO}{71}{\code {BASH_LINENO}}
\entry{BASH_REMATCH}{71}{\code {BASH_REMATCH}}
\entry{BASH_SOURCE}{71}{\code {BASH_SOURCE}}
\entry{BASH_SUBSHELL}{71}{\code {BASH_SUBSHELL}}
\entry{BASH_VERSINFO}{71}{\code {BASH_VERSINFO}}
\entry{BASH_VERSION}{71}{\code {BASH_VERSION}}
\entry{BASH_XTRACEFD}{71}{\code {BASH_XTRACEFD}}
\entry{COLUMNS}{72}{\code {COLUMNS}}
\entry{COMP_CWORD}{72}{\code {COMP_CWORD}}
\entry{COMP_LINE}{72}{\code {COMP_LINE}}
\entry{COMP_POINT}{72}{\code {COMP_POINT}}
\entry{COMP_TYPE}{72}{\code {COMP_TYPE}}
\entry{COMP_KEY}{72}{\code {COMP_KEY}}
\entry{COMP_WORDBREAKS}{72}{\code {COMP_WORDBREAKS}}
\entry{COMP_WORDS}{72}{\code {COMP_WORDS}}
\entry{COMPREPLY}{73}{\code {COMPREPLY}}
\entry{COPROC}{73}{\code {COPROC}}
\entry{DIRSTACK}{73}{\code {DIRSTACK}}
\entry{EMACS}{73}{\code {EMACS}}
\entry{ENV}{73}{\code {ENV}}
\entry{EUID}{73}{\code {EUID}}
\entry{FCEDIT}{73}{\code {FCEDIT}}
\entry{FIGNORE}{73}{\code {FIGNORE}}
\entry{FUNCNAME}{73}{\code {FUNCNAME}}
\entry{FUNCNEST}{73}{\code {FUNCNEST}}
\entry{GLOBIGNORE}{73}{\code {GLOBIGNORE}}
\entry{GROUPS}{74}{\code {GROUPS}}
\entry{histchars}{74}{\code {histchars}}
\entry{HISTCMD}{74}{\code {HISTCMD}}
\entry{HISTCONTROL}{74}{\code {HISTCONTROL}}
\entry{HISTFILE}{74}{\code {HISTFILE}}
\entry{HISTFILESIZE}{74}{\code {HISTFILESIZE}}
\entry{HISTIGNORE}{74}{\code {HISTIGNORE}}
\entry{HISTSIZE}{75}{\code {HISTSIZE}}
\entry{HISTTIMEFORMAT}{75}{\code {HISTTIMEFORMAT}}
\entry{HOSTFILE}{75}{\code {HOSTFILE}}
\entry{HOSTNAME}{75}{\code {HOSTNAME}}
\entry{HOSTTYPE}{75}{\code {HOSTTYPE}}
\entry{IGNOREEOF}{75}{\code {IGNOREEOF}}
\entry{INPUTRC}{75}{\code {INPUTRC}}
\entry{LANG}{75}{\code {LANG}}
\entry{LC_ALL}{75}{\code {LC_ALL}}
\entry{LC_COLLATE}{76}{\code {LC_COLLATE}}
\entry{LC_CTYPE}{76}{\code {LC_CTYPE}}
\entry{LC_MESSAGES}{76}{\code {LC_MESSAGES}}
\entry{LC_NUMERIC}{76}{\code {LC_NUMERIC}}
\entry{LINENO}{76}{\code {LINENO}}
\entry{LINES}{76}{\code {LINES}}
\entry{MACHTYPE}{76}{\code {MACHTYPE}}
\entry{MAILCHECK}{76}{\code {MAILCHECK}}
\entry{MAPFILE}{76}{\code {MAPFILE}}
\entry{OLDPWD}{76}{\code {OLDPWD}}
\entry{OPTERR}{76}{\code {OPTERR}}
\entry{OSTYPE}{76}{\code {OSTYPE}}
\entry{PIPESTATUS}{76}{\code {PIPESTATUS}}
\entry{POSIXLY_CORRECT}{76}{\code {POSIXLY_CORRECT}}
\entry{PPID}{77}{\code {PPID}}
\entry{PROMPT_COMMAND}{77}{\code {PROMPT_COMMAND}}
\entry{PROMPT_DIRTRIM}{77}{\code {PROMPT_DIRTRIM}}
\entry{PS3}{77}{\code {PS3}}
\entry{PS4}{77}{\code {PS4}}
\entry{PWD}{77}{\code {PWD}}
\entry{RANDOM}{77}{\code {RANDOM}}
\entry{READLINE_LINE}{77}{\code {READLINE_LINE}}
\entry{READLINE_POINT}{77}{\code {READLINE_POINT}}
\entry{REPLY}{77}{\code {REPLY}}
\entry{SECONDS}{77}{\code {SECONDS}}
\entry{SHELL}{77}{\code {SHELL}}
\entry{SHELLOPTS}{77}{\code {SHELLOPTS}}
\entry{SHLVL}{77}{\code {SHLVL}}
\entry{TIMEFORMAT}{78}{\code {TIMEFORMAT}}
\entry{TMOUT}{78}{\code {TMOUT}}
\entry{TMPDIR}{78}{\code {TMPDIR}}
\entry{UID}{78}{\code {UID}}
\entry{auto_resume}{100}{\code {auto_resume}}
\entry{bell-style}{105}{\code {bell-style}}
\entry{bind-tty-special-chars}{105}{\code {bind-tty-special-chars}}
\entry{colored-stats}{105}{\code {colored-stats}}
\entry{comment-begin}{105}{\code {comment-begin}}
\entry{completion-display-width}{105}{\code {completion-display-width}}
\entry{completion-ignore-case}{105}{\code {completion-ignore-case}}
\entry{completion-map-case}{105}{\code {completion-map-case}}
\entry{completion-prefix-display-length}{106}{\code {completion-prefix-display-length}}
\entry{completion-query-items}{106}{\code {completion-query-items}}
\entry{convert-meta}{106}{\code {convert-meta}}
\entry{disable-completion}{106}{\code {disable-completion}}
\entry{editing-mode}{106}{\code {editing-mode}}
\entry{enable-keypad}{106}{\code {enable-keypad}}
\entry{expand-tilde}{106}{\code {expand-tilde}}
\entry{history-preserve-point}{107}{\code {history-preserve-point}}
\entry{history-size}{107}{\code {history-size}}
\entry{horizontal-scroll-mode}{107}{\code {horizontal-scroll-mode}}
\entry{input-meta}{107}{\code {input-meta}}
\entry{meta-flag}{107}{\code {meta-flag}}
\entry{isearch-terminators}{107}{\code {isearch-terminators}}
\entry{keymap}{107}{\code {keymap}}
\entry{mark-modified-lines}{108}{\code {mark-modified-lines}}
\entry{mark-symlinked-directories}{108}{\code {mark-symlinked-directories}}
\entry{match-hidden-files}{108}{\code {match-hidden-files}}
\entry{menu-complete-display-prefix}{108}{\code {menu-complete-display-prefix}}
\entry{output-meta}{108}{\code {output-meta}}
\entry{page-completions}{108}{\code {page-completions}}
\entry{revert-all-at-newline}{108}{\code {revert-all-at-newline}}
\entry{show-all-if-ambiguous}{108}{\code {show-all-if-ambiguous}}
\entry{show-all-if-unmodified}{109}{\code {show-all-if-unmodified}}
\entry{skip-completed-text}{109}{\code {skip-completed-text}}
\entry{visible-stats}{109}{\code {visible-stats}}
+131 -131
View File
@@ -1,9 +1,9 @@
\initial {!}
\entry {\code {!}}{19}
\entry {\code {!}}{20}
\initial {#}
\entry {\code {#}}{19}
\initial {$}
\entry {\code {$}}{19}
\entry {\code {$}}{20}
\initial {*}
\entry {\code {*}}{19}
\initial {-}
@@ -13,154 +13,154 @@
\initial {@}
\entry {\code {@}}{19}
\initial {_}
\entry {\code {_}}{19}
\entry {\code {_}}{20}
\initial {0}
\entry {\code {0}}{19}
\entry {\code {0}}{20}
\initial {A}
\entry {\code {auto_resume}}{96}
\entry {\code {auto_resume}}{100}
\initial {B}
\entry {\code {BASH}}{65}
\entry {\code {BASH_ALIASES}}{66}
\entry {\code {BASH_ARGC}}{66}
\entry {\code {BASH_ARGV}}{66}
\entry {\code {BASH_CMDS}}{66}
\entry {\code {BASH_COMMAND}}{66}
\entry {\code {BASH_ENV}}{66}
\entry {\code {BASH_EXECUTION_STRING}}{66}
\entry {\code {BASH_LINENO}}{67}
\entry {\code {BASH_REMATCH}}{67}
\entry {\code {BASH_SOURCE}}{67}
\entry {\code {BASH_SUBSHELL}}{67}
\entry {\code {BASH_VERSINFO}}{67}
\entry {\code {BASH_VERSION}}{67}
\entry {\code {BASH_XTRACEFD}}{67}
\entry {\code {BASHOPTS}}{66}
\entry {\code {BASHPID}}{66}
\entry {\code {bell-style}}{101}
\entry {\code {bind-tty-special-chars}}{101}
\entry {\code {BASH}}{69}
\entry {\code {BASH_ALIASES}}{70}
\entry {\code {BASH_ARGC}}{70}
\entry {\code {BASH_ARGV}}{70}
\entry {\code {BASH_CMDS}}{70}
\entry {\code {BASH_COMMAND}}{70}
\entry {\code {BASH_ENV}}{70}
\entry {\code {BASH_EXECUTION_STRING}}{70}
\entry {\code {BASH_LINENO}}{71}
\entry {\code {BASH_REMATCH}}{71}
\entry {\code {BASH_SOURCE}}{71}
\entry {\code {BASH_SUBSHELL}}{71}
\entry {\code {BASH_VERSINFO}}{71}
\entry {\code {BASH_VERSION}}{71}
\entry {\code {BASH_XTRACEFD}}{71}
\entry {\code {BASHOPTS}}{70}
\entry {\code {BASHPID}}{70}
\entry {\code {bell-style}}{105}
\entry {\code {bind-tty-special-chars}}{105}
\initial {C}
\entry {\code {CDPATH}}{65}
\entry {\code {colored-stats}}{101}
\entry {\code {COLUMNS}}{68}
\entry {\code {comment-begin}}{101}
\entry {\code {COMP_CWORD}}{68}
\entry {\code {COMP_KEY}}{68}
\entry {\code {COMP_LINE}}{68}
\entry {\code {COMP_POINT}}{68}
\entry {\code {COMP_TYPE}}{68}
\entry {\code {COMP_WORDBREAKS}}{68}
\entry {\code {COMP_WORDS}}{68}
\entry {\code {completion-display-width}}{101}
\entry {\code {completion-ignore-case}}{101}
\entry {\code {completion-map-case}}{101}
\entry {\code {completion-prefix-display-length}}{102}
\entry {\code {completion-query-items}}{102}
\entry {\code {COMPREPLY}}{69}
\entry {\code {convert-meta}}{102}
\entry {\code {COPROC}}{69}
\entry {\code {CDPATH}}{69}
\entry {\code {colored-stats}}{105}
\entry {\code {COLUMNS}}{72}
\entry {\code {comment-begin}}{105}
\entry {\code {COMP_CWORD}}{72}
\entry {\code {COMP_KEY}}{72}
\entry {\code {COMP_LINE}}{72}
\entry {\code {COMP_POINT}}{72}
\entry {\code {COMP_TYPE}}{72}
\entry {\code {COMP_WORDBREAKS}}{72}
\entry {\code {COMP_WORDS}}{72}
\entry {\code {completion-display-width}}{105}
\entry {\code {completion-ignore-case}}{105}
\entry {\code {completion-map-case}}{105}
\entry {\code {completion-prefix-display-length}}{106}
\entry {\code {completion-query-items}}{106}
\entry {\code {COMPREPLY}}{73}
\entry {\code {convert-meta}}{106}
\entry {\code {COPROC}}{73}
\initial {D}
\entry {\code {DIRSTACK}}{69}
\entry {\code {disable-completion}}{102}
\entry {\code {DIRSTACK}}{73}
\entry {\code {disable-completion}}{106}
\initial {E}
\entry {\code {editing-mode}}{102}
\entry {\code {EMACS}}{69}
\entry {\code {enable-keypad}}{102}
\entry {\code {ENV}}{69}
\entry {\code {EUID}}{69}
\entry {\code {expand-tilde}}{102}
\entry {\code {editing-mode}}{106}
\entry {\code {EMACS}}{73}
\entry {\code {enable-keypad}}{106}
\entry {\code {ENV}}{73}
\entry {\code {EUID}}{73}
\entry {\code {expand-tilde}}{106}
\initial {F}
\entry {\code {FCEDIT}}{69}
\entry {\code {FIGNORE}}{69}
\entry {\code {FUNCNAME}}{69}
\entry {\code {FUNCNEST}}{69}
\entry {\code {FCEDIT}}{73}
\entry {\code {FIGNORE}}{73}
\entry {\code {FUNCNAME}}{73}
\entry {\code {FUNCNEST}}{73}
\initial {G}
\entry {\code {GLOBIGNORE}}{69}
\entry {\code {GROUPS}}{70}
\entry {\code {GLOBIGNORE}}{73}
\entry {\code {GROUPS}}{74}
\initial {H}
\entry {\code {histchars}}{70}
\entry {\code {HISTCMD}}{70}
\entry {\code {HISTCONTROL}}{70}
\entry {\code {HISTFILE}}{70}
\entry {\code {HISTFILESIZE}}{70}
\entry {\code {HISTIGNORE}}{70}
\entry {\code {history-preserve-point}}{103}
\entry {\code {history-size}}{103}
\entry {\code {HISTSIZE}}{71}
\entry {\code {HISTTIMEFORMAT}}{71}
\entry {\code {HOME}}{65}
\entry {\code {horizontal-scroll-mode}}{103}
\entry {\code {HOSTFILE}}{71}
\entry {\code {HOSTNAME}}{71}
\entry {\code {HOSTTYPE}}{71}
\entry {\code {histchars}}{74}
\entry {\code {HISTCMD}}{74}
\entry {\code {HISTCONTROL}}{74}
\entry {\code {HISTFILE}}{74}
\entry {\code {HISTFILESIZE}}{74}
\entry {\code {HISTIGNORE}}{74}
\entry {\code {history-preserve-point}}{107}
\entry {\code {history-size}}{107}
\entry {\code {HISTSIZE}}{75}
\entry {\code {HISTTIMEFORMAT}}{75}
\entry {\code {HOME}}{69}
\entry {\code {horizontal-scroll-mode}}{107}
\entry {\code {HOSTFILE}}{75}
\entry {\code {HOSTNAME}}{75}
\entry {\code {HOSTTYPE}}{75}
\initial {I}
\entry {\code {IFS}}{65}
\entry {\code {IGNOREEOF}}{71}
\entry {\code {input-meta}}{103}
\entry {\code {INPUTRC}}{71}
\entry {\code {isearch-terminators}}{103}
\entry {\code {IFS}}{69}
\entry {\code {IGNOREEOF}}{75}
\entry {\code {input-meta}}{107}
\entry {\code {INPUTRC}}{75}
\entry {\code {isearch-terminators}}{107}
\initial {K}
\entry {\code {keymap}}{103}
\entry {\code {keymap}}{107}
\initial {L}
\entry {\code {LANG}}{71}
\entry {\code {LC_ALL}}{71}
\entry {\code {LC_COLLATE}}{72}
\entry {\code {LC_CTYPE}}{72}
\entry {\code {LC_MESSAGES}}{7, 72}
\entry {\code {LC_NUMERIC}}{72}
\entry {\code {LINENO}}{72}
\entry {\code {LINES}}{72}
\entry {\code {LANG}}{75}
\entry {\code {LC_ALL}}{75}
\entry {\code {LC_COLLATE}}{76}
\entry {\code {LC_CTYPE}}{76}
\entry {\code {LC_MESSAGES}}{7, 76}
\entry {\code {LC_NUMERIC}}{76}
\entry {\code {LINENO}}{76}
\entry {\code {LINES}}{76}
\initial {M}
\entry {\code {MACHTYPE}}{72}
\entry {\code {MAIL}}{65}
\entry {\code {MAILCHECK}}{72}
\entry {\code {MAILPATH}}{65}
\entry {\code {MAPFILE}}{72}
\entry {\code {mark-modified-lines}}{104}
\entry {\code {mark-symlinked-directories}}{104}
\entry {\code {match-hidden-files}}{104}
\entry {\code {menu-complete-display-prefix}}{104}
\entry {\code {meta-flag}}{103}
\entry {\code {MACHTYPE}}{76}
\entry {\code {MAIL}}{69}
\entry {\code {MAILCHECK}}{76}
\entry {\code {MAILPATH}}{69}
\entry {\code {MAPFILE}}{76}
\entry {\code {mark-modified-lines}}{108}
\entry {\code {mark-symlinked-directories}}{108}
\entry {\code {match-hidden-files}}{108}
\entry {\code {menu-complete-display-prefix}}{108}
\entry {\code {meta-flag}}{107}
\initial {O}
\entry {\code {OLDPWD}}{72}
\entry {\code {OPTARG}}{65}
\entry {\code {OPTERR}}{72}
\entry {\code {OPTIND}}{65}
\entry {\code {OSTYPE}}{72}
\entry {\code {output-meta}}{104}
\entry {\code {OLDPWD}}{76}
\entry {\code {OPTARG}}{69}
\entry {\code {OPTERR}}{76}
\entry {\code {OPTIND}}{69}
\entry {\code {OSTYPE}}{76}
\entry {\code {output-meta}}{108}
\initial {P}
\entry {\code {page-completions}}{104}
\entry {\code {PATH}}{65}
\entry {\code {PIPESTATUS}}{72}
\entry {\code {POSIXLY_CORRECT}}{72}
\entry {\code {PPID}}{73}
\entry {\code {PROMPT_COMMAND}}{73}
\entry {\code {PROMPT_DIRTRIM}}{73}
\entry {\code {PS1}}{65}
\entry {\code {PS2}}{65}
\entry {\code {PS3}}{73}
\entry {\code {PS4}}{73}
\entry {\code {PWD}}{73}
\entry {\code {page-completions}}{108}
\entry {\code {PATH}}{69}
\entry {\code {PIPESTATUS}}{76}
\entry {\code {POSIXLY_CORRECT}}{76}
\entry {\code {PPID}}{77}
\entry {\code {PROMPT_COMMAND}}{77}
\entry {\code {PROMPT_DIRTRIM}}{77}
\entry {\code {PS1}}{69}
\entry {\code {PS2}}{69}
\entry {\code {PS3}}{77}
\entry {\code {PS4}}{77}
\entry {\code {PWD}}{77}
\initial {R}
\entry {\code {RANDOM}}{73}
\entry {\code {READLINE_LINE}}{73}
\entry {\code {READLINE_POINT}}{73}
\entry {\code {REPLY}}{73}
\entry {\code {revert-all-at-newline}}{104}
\entry {\code {RANDOM}}{77}
\entry {\code {READLINE_LINE}}{77}
\entry {\code {READLINE_POINT}}{77}
\entry {\code {REPLY}}{77}
\entry {\code {revert-all-at-newline}}{108}
\initial {S}
\entry {\code {SECONDS}}{73}
\entry {\code {SHELL}}{73}
\entry {\code {SHELLOPTS}}{73}
\entry {\code {SHLVL}}{73}
\entry {\code {show-all-if-ambiguous}}{104}
\entry {\code {show-all-if-unmodified}}{105}
\entry {\code {skip-completed-text}}{105}
\entry {\code {SECONDS}}{77}
\entry {\code {SHELL}}{77}
\entry {\code {SHELLOPTS}}{77}
\entry {\code {SHLVL}}{77}
\entry {\code {show-all-if-ambiguous}}{108}
\entry {\code {show-all-if-unmodified}}{109}
\entry {\code {skip-completed-text}}{109}
\initial {T}
\entry {\code {TEXTDOMAIN}}{7}
\entry {\code {TEXTDOMAINDIR}}{7}
\entry {\code {TIMEFORMAT}}{74}
\entry {\code {TMOUT}}{74}
\entry {\code {TMPDIR}}{74}
\entry {\code {TIMEFORMAT}}{78}
\entry {\code {TMOUT}}{78}
\entry {\code {TMPDIR}}{78}
\initial {U}
\entry {\code {UID}}{74}
\entry {\code {UID}}{78}
\initial {V}
\entry {\code {visible-stats}}{105}
\entry {\code {visible-stats}}{109}
+25 -15
View File
@@ -365,8 +365,8 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
loop) is resumed. The return value is 0 unless _n is not greater
than or equal to 1.
ddeeccllaarree [--aaAAffFFggiillrrttuuxx] [--pp] [_n_a_m_e[=_v_a_l_u_e] ...]
ttyyppeesseett [--aaAAffFFggiillrrttuuxx] [--pp] [_n_a_m_e[=_v_a_l_u_e] ...]
ddeeccllaarree [--aaAAffFFggiillnnrrttuuxx] [--pp] [_n_a_m_e[=_v_a_l_u_e] ...]
ttyyppeesseett [--aaAAffFFggiillnnrrttuuxx] [--pp] [_n_a_m_e[=_v_a_l_u_e] ...]
Declare variables and/or give them attributes. If no _n_a_m_es are
given then display the values of variables. The --pp option will
display the attributes and values of each _n_a_m_e. When --pp is used
@@ -397,6 +397,13 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
--ll When the variable is assigned a value, all upper-case
characters are converted to lower-case. The upper-case
attribute is disabled.
--nn Give each _n_a_m_e the _n_a_m_e_r_e_f attribute, making it a name
reference to another variable. That other variable is
defined by the value of _n_a_m_e. All references and assign-
ments to _n_a_m_e, except for changing the --nn attribute
itself, are performed on the variable referenced by
_n_a_m_e's value. The --nn attribute cannot be applied to
array variables.
--rr Make _n_a_m_es readonly. These names cannot then be assigned
values by subsequent assignment statements or unset.
--tt Give each _n_a_m_e the _t_r_a_c_e attribute. Traced functions
@@ -1661,29 +1668,32 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
supplied, all alias definitions are removed. The return value
is true unless a supplied _n_a_m_e is not a defined alias.
uunnsseett [-ffvv] [_n_a_m_e ...]
uunnsseett [-ffvv] [-nn] [_n_a_m_e ...]
For each _n_a_m_e, remove the corresponding variable or function.
If the --vv option is given, each _n_a_m_e refers to a shell variable,
and that variable is removed. Read-only variables may not be
unset. If --ff is specified, each _n_a_m_e refers to a shell func-
tion, and the function definition is removed. If no options are
supplied, each _n_a_m_e refers to a variable; if there is no vari-
able by that name, any function with that name is unset. Each
unset variable or function is removed from the environment
passed to subsequent commands. If any of CCOOMMPP__WWOORRDDBBRREEAAKKSS, RRAANN--
tion, and the function definition is removed. If the --nn option
is supplied, and _n_a_m_e is a variable with the _n_a_m_e_r_e_f attribute,
_n_a_m_e will be unset rather than the variable it references. --nn
has no effect if the --ff option is supplied. If no options are
supplied, each _n_a_m_e refers to a variable; if there is no vari-
able by that name, any function with that name is unset. Each
unset variable or function is removed from the environment
passed to subsequent commands. If any of CCOOMMPP__WWOORRDDBBRREEAAKKSS, RRAANN--
DDOOMM, SSEECCOONNDDSS, LLIINNEENNOO, HHIISSTTCCMMDD, FFUUNNCCNNAAMMEE, GGRROOUUPPSS, or DDIIRRSSTTAACCKK are
unset, they lose their special properties, even if they are sub-
sequently reset. The exit status is true unless a _n_a_m_e is read-
only.
wwaaiitt [_n _._._.]
Wait for each specified process and return its termination sta-
tus. Each _n may be a process ID or a job specification; if a
job spec is given, all processes in that job's pipeline are
waited for. If _n is not given, all currently active child pro-
cesses are waited for, and the return status is zero. If _n
specifies a non-existent process or job, the return status is
127. Otherwise, the return status is the exit status of the
Wait for each specified process and return its termination sta-
tus. Each _n may be a process ID or a job specification; if a
job spec is given, all processes in that job's pipeline are
waited for. If _n is not given, all currently active child pro-
cesses are waited for, and the return status is zero. If _n
specifies a non-existent process or job, the return status is
127. Otherwise, the return status is the exit status of the
last process or job waited for.
SSEEEE AALLSSOO
+1330 -1307
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,6 +1,6 @@
%!PS-Adobe-3.0
%%Creator: groff version 1.19.2
%%CreationDate: Mon Mar 5 21:30:56 2012
%%CreationDate: Thu Jul 5 20:43:03 2012
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%DocumentSuppliedResources: procset grops 1.19 2
+3 -4
View File
@@ -2,13 +2,12 @@
Copyright (C) 1988-2012 Free Software Foundation, Inc.
@end ignore
@set LASTCHANGE Sun May 27 20:28:13 EDT 2012
@set LASTCHANGE Thu Jul 5 19:37:34 EDT 2012
@set EDITION 4.2
@set VERSION 4.2
@set UPDATED 27 May 2012
@set UPDATED-MONTH May 2012
@set UPDATED 5 July 2012
@set UPDATED-MONTH July 2012
+238
View File
@@ -0,0 +1,238 @@
#
# Simple makefile for the sample loadable builtins
#
# Copyright (C) 1996 Free Software Foundation, Inc.
# This program 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.
# This program 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 this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
# Include some boilerplate Gnu makefile definitions.
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
infodir = @infodir@
includedir = @includedir@
topdir = @top_srcdir@
BUILD_DIR = @BUILD_DIR@
srcdir = @srcdir@
VPATH = .:@srcdir@
@SET_MAKE@
CC = @CC@
RM = rm -f
SHELL = @MAKE_SHELL@
host_os = @host_os@
host_cpu = @host_cpu@
host_vendor = @host_vendor@
CFLAGS = @CFLAGS@
LOCAL_CFLAGS = @LOCAL_CFLAGS@
DEFS = @DEFS@
LOCAL_DEFS = @LOCAL_DEFS@
CPPFLAGS = @CPPFLAGS@
BASHINCDIR = ${topdir}/include
LIBBUILD = ${BUILD_DIR}/lib
INTL_LIBSRC = ${topdir}/lib/intl
INTL_BUILDDIR = ${LIBBUILD}/intl
INTL_INC = @INTL_INC@
LIBINTL_H = @LIBINTL_H@
CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(LOCAL_CFLAGS) $(CFLAGS)
#
# These values are generated for configure by ${topdir}/support/shobj-conf.
# If your system is not supported by that script, but includes facilities for
# dynamic loading of shared objects, please update the script and send the
# changes to bash-maintainers@gnu.org.
#
SHOBJ_CC = @SHOBJ_CC@
SHOBJ_CFLAGS = @SHOBJ_CFLAGS@
SHOBJ_LD = @SHOBJ_LD@
SHOBJ_LDFLAGS = @SHOBJ_LDFLAGS@
SHOBJ_XLDFLAGS = @SHOBJ_XLDFLAGS@
SHOBJ_LIBS = @SHOBJ_LIBS@
SHOBJ_STATUS = @SHOBJ_STATUS@
INC = -I. -I.. -I$(topdir) -I$(topdir)/lib -I$(topdir)/builtins \
-I$(BASHINCDIR) -I$(BUILD_DIR) -I$(LIBBUILD) \
-I$(BUILD_DIR)/builtins $(INTL_INC)
.c.o:
$(SHOBJ_CC) $(SHOBJ_CFLAGS) $(CCFLAGS) $(INC) -c -o $@ $<
ALLPROG = print truefalse sleep pushd finfo logname basename dirname \
tty pathchk tee head mkdir rmdir printenv id whoami \
uname sync push ln unlink cut realpath getconf strftime
OTHERPROG = necho hello cat
all: $(SHOBJ_STATUS)
supported: $(ALLPROG)
others: $(OTHERPROG)
unsupported:
@echo "Your system (${host_os}) is not supported by the"
@echo "${topdir}/support/shobj-conf script."
@echo "If your operating system provides facilities for dynamic"
@echo "loading of shared objects using the dlopen(3) interface,"
@echo "please update the script and re-run configure.
@echo "Please send the changes you made to bash-maintainers@gnu.org"
@echo "for inclusion in future bash releases."
everything: supported others
print: print.o
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ print.o $(SHOBJ_LIBS)
necho: necho.o
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ necho.o $(SHOBJ_LIBS)
getconf: getconf.o
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ getconf.o $(SHOBJ_LIBS)
hello: hello.o
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ hello.o $(SHOBJ_LIBS)
truefalse: truefalse.o
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ truefalse.o $(SHOBJ_LIBS)
sleep: sleep.o
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ sleep.o $(SHOBJ_LIBS)
finfo: finfo.o
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ finfo.o $(SHOBJ_LIBS)
cat: cat.o
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ cat.o $(SHOBJ_LIBS)
logname: logname.o
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ logname.o $(SHOBJ_LIBS)
basename: basename.o
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ basename.o $(SHOBJ_LIBS)
dirname: dirname.o
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ dirname.o $(SHOBJ_LIBS)
tty: tty.o
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ tty.o $(SHOBJ_LIBS)
pathchk: pathchk.o
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ pathchk.o $(SHOBJ_LIBS)
tee: tee.o
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ tee.o $(SHOBJ_LIBS)
mkdir: mkdir.o
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ mkdir.o $(SHOBJ_LIBS)
rmdir: rmdir.o
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ rmdir.o $(SHOBJ_LIBS)
head: head.o
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ head.o $(SHOBJ_LIBS)
printenv: printenv.o
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ printenv.o $(SHOBJ_LIBS)
id: id.o
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ id.o $(SHOBJ_LIBS)
whoami: whoami.o
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ whoami.o $(SHOBJ_LIBS)
uname: uname.o
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ uname.o $(SHOBJ_LIBS)
sync: sync.o
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ sync.o $(SHOBJ_LIBS)
push: push.o
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ push.o $(SHOBJ_LIBS)
ln: ln.o
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ ln.o $(SHOBJ_LIBS)
unlink: unlink.o
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ unlink.o $(SHOBJ_LIBS)
cut: cut.o
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ cut.o $(SHOBJ_LIBS)
realpath: realpath.o
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ realpath.o $(SHOBJ_LIBS)
strftime: strftime.o
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ strftime.o $(SHOBJ_LIBS)
# pushd is a special case. We use the same source that the builtin version
# uses, with special compilation options.
#
pushd.c: ${topdir}/builtins/pushd.def
$(RM) $@
${BUILD_DIR}/builtins/mkbuiltins -D ${topdir}/builtins ${topdir}/builtins/pushd.def
pushd.o: pushd.c
$(RM) $@
$(SHOBJ_CC) -DHAVE_CONFIG_H -DPUSHD_AND_POPD -DLOADABLE_BUILTIN $(SHOBJ_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(INC) -c -o $@ $<
pushd: pushd.o
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ pushd.o $(SHOBJ_LIBS)
clean:
$(RM) $(ALLPROG) $(OTHERPROG) *.o
-( cd perl && ${MAKE} ${MFLAGS} $@ )
mostlyclean: clean
-( cd perl && ${MAKE} ${MFLAGS} $@ )
distclean maintainer-clean: clean
$(RM) Makefile pushd.c
-( cd perl && ${MAKE} ${MFLAGS} $@ )
print.o: print.c
truefalse.o: truefalse.c
sleep.o: sleep.c
finfo.o: finfo.c
logname.o: logname.c
basename.o: basename.c
dirname.o: dirname.c
tty.o: tty.c
pathchk.o: pathchk.c
tee.o: tee.c
head.o: head.c
rmdir.o: rmdir.c
necho.o: necho.c
getconf.o: getconf.c
hello.o: hello.c
cat.o: cat.c
printenv.o: printenv.c
id.o: id.c
whoami.o: whoami.c
uname.o: uname.c
sync.o: sync.c
push.o: push.c
mkdir.o: mkdir.c
realpath.o: realpath.c
strftime.o: strftime.c
+549
View File
@@ -0,0 +1,549 @@
#!/bin/bash
# ash -- "Adventure shell"
# last edit: 86/04/21 D A Gwyn
# SCCS ID: @(#)ash.sh 1.4
OPATH=$PATH
ask()
{
echo -n "$@" '[y/n] '
read ans
case "$ans" in
y*|Y*)
return 0
;;
*)
return 1
;;
esac
}
CAT=${PAGER:-more}
ash_inst()
{
cat <<- EOF
Instructions for the Adventure shell
Welcome to the Adventure shell! In this exploration of the UNIX file
system, I will act as your eyes and hands. As you move around, I will
describe whatever is visible and will carry out your commands. The
general form of a command is
Verb Object Extra_stuff.
Most commands pay no attention to the "Extra_stuff", and many do not
need an "Object". A typical command is
get all
which picks up all files in the current "room" (directory). You can
find out what you are carrying by typing the command
inventory
The command "help" results in a full description of all commands that I
understand. To quit the Adventure shell, type
quit
There are UNIX monsters lurking in the background. These are also
known as "commands with arguments".
Good luck!
EOF
}
ash_help()
{
echo "I understand the following commands (synonyms in parentheses):"
echo ""
echo "change OBJECT to NEW_NAME changes the name of the object"
echo "clone OBJECT as NEW_NAME duplicates the object"
echo "drop OBJECTS leaves the objects in the room"
echo "enter (go) PASSAGE takes the labeled passage"
echo "examine OBJECTS describes the objects in detail"
echo "feed OBJECT to MONSTER stuffs the object into a UNIX monster"
echo "get (take) OBJECTS picks up the specified objects"
echo "gripe (bug) report a problem with the Adventure shell"
echo "help prints this summary"
echo "inventory (i) tells what you are carrying"
echo "kill (destroy) OBJECTS destroys the objects"
echo "look (l) describes the room, including hidden objects"
echo "open (read) OBJECT shows the contents of an object"
echo "quit (exit) leaves the Adventure shell"
echo "resurrect OBJECTS attempts to restore dead objects"
echo "steal OBJECT from MONSTER obtains the object from a UNIX monster"
echo "throw OBJECT at daemon feeds the object to the printer daemon"
echo "up takes the overhead passage"
echo "wake MONSTER awakens a UNIX monster"
echo "where (w) tells you where you are"
echo "xyzzy moves you to your home"
}
MAINT=chet@ins.cwru.edu
PATH=/usr/ucb:/bin:/usr/bin:/usr/local/bin:.
export PATH
trap 'echo Ouch!' 2 3
#trap '' 18 # disable Berkeley job control
ash_lk(){ echo " $1 " | fgrep " $2 " >&- 2>&-; }
ash_pr(){ echo $* | tr ' ' '\012' | pr -5 -t -w75 -l$[ ( $# + 4 ) / 5 ]; }
ash_rm(){ echo " $1 " | sed -e "s/ $2 / /" -e 's/^ //' -e 's/ $//'; }
# enable history, bang history expansion, and emacs editing
set -o history
set -o histexpand
set -o emacs
cd
LIM=.limbo # $HOME/$LIM contains "destroyed" objects
mkdir $LIM >&- 2>&-
KNAP=.knapsack # $HOME/$KNAP contains objects being "carried"
if [ ! -d $KNAP ]
then mkdir $KNAP >&- 2>&-
if [ $? = 0 ]
then echo 'You found a discarded empty knapsack.'
else echo 'You have no knapsack to carry things in.'
exit 1
fi
else echo 'One moment while I peek in your old knapsack...'
fi
kn=`echo \`ls -a $KNAP | sed -e '/^\.$/d' -e '/^\.\.$/d'\``
if ask 'Welcome to the Adventure shell! Do you need instructions?'
then
ash_inst
echo -n 'Type a newline to continue: '
read
fi
wiz=false
cha=false
prev=$LIM
while :
do room=`pwd`
if [ $room != $prev ]
then if [ $room = $HOME ]
then echo 'You are in your own home.'
else echo "You have entered $room."
fi
exs=
obs=
hexs=
hobs=
f=false
for i in `ls -a`
do case $i in
.|..) ;;
.*) if [ -f $i ]
then hobs="$hobs $i"
elif [ -d $i ]
then hexs="$hexs $i"
else f=true
fi
;;
*) if [ -f $i ]
then obs="$obs $i"
elif [ -d $i ]
then exs="$exs $i"
else f=true
fi
;;
esac
done
if [ "$obs" ]
then echo 'This room contains:'
ash_pr $obs
else echo 'The room looks empty.'
fi
if [ "$exs" ]
then echo 'There are exits labeled:'
ash_pr $exs
echo 'as well as a passage overhead.'
else echo 'There is a passage overhead.'
fi
if sh -c $f
then echo 'There are shadowy figures in the corner.'
fi
prev=$room
fi
read -e -p '-advsh> ' verb obj x # prompt is '-advsh> '
if [ $? != 0 ]
then verb=quit # EOF
fi
case $verb in
change) if [ "$obj" ]
then if ash_lk "$obs $hobs" "$obj"
then set -- $x
case "$1" in
to) if [ "$2" ]
then if [ -f $2 ]
then echo "You must destroy $2 first."
set --
fi
if [ "$2" ]
then if mv $obj $2 >&- 2>&-
then echo "The $obj shimmers and turns into $2."
obs=`ash_rm "$2 $obs" "$obj"`
else echo "There is a cloud of smoke but the $obj is unchanged."
fi
fi
else echo 'To what?'
fi
;;
*) echo "Change $obj to what?"
;;
esac
else if ash_lk "$kn" "$obj"
then echo 'You must drop it first.'
else echo "I see no $obj here."
fi
fi
else echo 'Change what?'
fi
;;
clone) if [ "$obj" ]
then if ash_lk "$obs $hobs" "$obj"
then if [ ! -r $obj ]
then echo "The $obj does not wish to be cloned."
else set -- $x
case "$1" in
as) if [ "$2" ]
then if [ -f $2 ]
then echo "You must destroy $2 first."
else if cp $obj $2 >&- 2>&-
then echo "Poof! When the smoke clears, you see the new $2."
obs="$obs $2"
else echo 'You hear a dull thud but no clone appears.'
fi
fi
else echo 'As what?'
fi
;;
*) echo "Clone $obj as what?"
;;
esac
fi
else if ash_lk "$kn" "$obj"
then echo 'You must drop it first.'
else echo "I see no $obj here."
fi
fi
else echo 'Clone what?'
fi
;;
drop) if [ "$obj" ]
then for it in $obj $x
do if ash_lk "$kn" "$it"
then if [ -w $it ]
then echo "You must destroy $it first."
else if mv $HOME/$KNAP/$it $it >&- 2>&-
then echo "$it: dropped."
kn=`ash_rm "$kn" "$it"`
obs=`echo $it $obs`
else echo "The $it is caught in your knapsack."
fi
fi
else echo "You're not carrying the $it!"
fi
done
else echo 'Drop what?'
fi
;;
enter|go) if [ "$obj" ]
then if [ $obj != up ]
then if ash_lk "$exs $hexs" "$obj"
then if [ -x $obj ]
then if cd $obj
then echo 'You squeeze through the passage.'
else echo "You can't go that direction."
fi
else echo 'An invisible force blocks your way.'
fi
else echo 'I see no such passage.'
fi
else if cd ..
then echo 'You struggle upwards.'
else echo "You can't reach that high."
fi
fi
else echo 'Which passage?'
fi
;;
examine) if [ "$obj" ]
then if [ $obj = all ]
then $obj=`echo $obs $exs`
x=
fi
for it in $obj $x
do if ash_lk "$obs $hobs $exs $hexs" "$it"
then echo "Upon close inspection of the $it, you see:"
ls -ld $it 2>&-
if [ $? != 0 ]
then echo "-- when you look directly at the $it, it vanishes."
fi
else if ash_lk "$kn" "$it"
then echo 'You must drop it first.'
else echo "I see no $it here."
fi
fi
done
else echo 'Examine what?'
fi
;;
feed) if [ "$obj" ]
then if ash_lk "$obs $hobs" "$obj"
then set -- $x
case "$1" in
to) if [ "$2" ]
then shift
if PATH=$OPATH $* <$obj 2>&-
then echo "The $1 monster devours your $obj."
if rm -f $obj >&- 2>&-
then obs=`ash_rm "$obs" "$obj"`
else echo 'But he spits it back up.'
fi
else echo "The $1 monster holds his nose in disdain."
fi
else echo 'To what?'
fi
;;
*) echo "Feed $obj to what?"
;;
esac
else if ash_lk "$kn" "$obj"
then echo 'You must drop it first.'
else echo "I see no $obj here."
fi
fi
else echo 'Feed what?'
fi
;;
get|take) if [ "$obj" ]
then if [ $obj = all ]
then obj="$obs"
x=
fi
for it in $obj $x
do if ash_lk "$obs $hobs" "$it"
then if ash_lk "$kn" "$it"
then echo 'You already have one.'
else if mv $it $HOME/$KNAP/$it >&- 2>&-
then echo "$it: taken."
kn="$it $kn"
obs=`ash_rm "$obs" "$it"`
else echo "The $it is too heavy."
fi
fi
else echo "I see no $it here."
fi
done
else echo 'Get what?'
fi
;;
gripe|bug) echo 'Please describe the problem and your situation at the time it failed.\nEnd the bug report with a line containing just a Ctrl-D.'
cat | mail $MAINT -s 'ash bug'
echo 'Thank you!'
;;
help) ash_help
;;
inventory|i) if [ "$kn" ]
then echo 'Your knapsack contains:'
ash_pr $kn
else echo 'You are poverty-stricken.'
fi
;;
kill|destroy) if [ "$obj" ]
then if [ $obj = all ]
then x=
if ask "Do you really want to attempt to $verb them all?"
then obj=`echo $obs`
else echo 'Chicken!'
obj=
fi
fi
for it in $obj $x
do if ash_lk "$obs $hobs" "$it"
then if mv $it $HOME/$LIM <&- >&- 2>&-
then if [ $verb = kill ]
then echo "The $it cannot defend himself; he dies."
else echo "You have destroyed the $it; it vanishes."
fi
obs=`ash_rm "$obs" "$it"`
else if [ $verb = kill ]
then echo "Your feeble blows are no match for the $it."
else echo "The $it is indestructible."
fi
fi
else if ash_lk "$kn" "$it"
then echo "You must drop the $it first."
found=false
else echo "I see no $it here."
fi
fi
done
else echo 'Kill what?'
fi
;;
look|l) obs=`echo $obs $hobs`
hobs=
if [ "$obs" ]
then echo 'The room contains:'
ash_pr $obs
else echo 'The room is empty.'
fi
exs=`echo $exs $hexs`
hexs=
if [ "$exs" ]
then echo 'There are exits plainly labeled:'
ash_pr $exs
echo 'and a passage directly overhead.'
else echo 'The only exit is directly overhead.'
fi
;;
magic) if [ "$obj" = mode ]
then if sh -c $cha
then echo 'You had your chance and you blew it.'
else if ask 'Are you a wizard?'
then echo -n 'Prove it! Say the magic word: '
read obj
if [ "$obj" = armadillo ]
then echo 'Yes, master!!'
wiz=true
else echo "Homie says: I don't think so"
cha=true
fi
else echo "I didn't think so."
fi
fi
else echo 'Nice try.'
fi
;;
open|read) if [ "$obj" ]
then if ash_lk "$obs $hobs" "$obj"
then if [ -r $obj ]
then if [ -s $obj ]
then echo "Opening the $obj reveals:"
$CAT < $obj
if [ $? != 0 ]
then echo '-- oops, you lost the contents!'
fi
else echo "There is nothing inside the $obj."
fi
else echo "You do not have the proper tools to open the $obj."
fi
else if ash_lk "$kn" "$obj"
then echo 'You must drop it first.'
found=false
else echo "I see no $obj here."
fi
fi
else echo 'Open what?'
fi
;;
quit|exit) if ask 'Do you really want to quit now?'
then if [ "$kn" ]
then echo 'The contents of your knapsack will still be there next time.'
fi
rm -rf $HOME/$LIM
echo 'See you later!'
exit 0
fi
;;
resurrect) if [ "$obj" ]
then for it in $obj $x
do if ash_lk "$obs $hobs" "$it"
then echo "The $it is already alive and well."
else if mv $HOME/$LIM/$it $it <&- >&- 2>&-
then echo "The $it staggers to his feet."
obs=`echo $it $obs`
else echo "There are sparks but no $it appears."
fi
fi
done
else echo 'Resurrect what?'
fi
;;
steal) if [ "$obj" ]
then if ash_lk "$obs $hobs" "$obj"
then echo 'There is already one here.'
else set -- $x
case "$1" in
from) if [ "$2" ]
then shift
if PATH=$OPATH $* >$obj 2>&-
then echo "The $1 monster drops the $obj."
obs=`echo $obj $obs`
else echo "The $1 monster runs away as you approach."
rm -f $obj >&- 2>&-
fi
else echo 'From what?'
fi
;;
*) echo "Steal $obj from what?"
;;
esac
fi
else echo 'Steal what?'
fi
;;
throw) if [ "$obj" ]
then if ash_lk "$obs $hobs" "$obj"
then set -- $x
case "$1" in
at) case "$2" in
daemon) if sh -c "lpr -r $obj"
then echo "The daemon catches the $obj, turns it into paper,\nand leaves it in the basket."
obs=`ash_rm "$obs" "$obj"`
else echo "The daemon is nowhere to be found."
fi
;;
*) echo 'At what?'
;;
esac
;;
*) echo "Throw $obj at what?"
;;
esac
else if ash_lk "$kn" "$obj"
then echo 'It is in your knapsack.'
found=false
else echo "I see no $obj here."
fi
fi
else echo 'Throw what?'
fi
;;
u|up) if cd ..
then echo 'You pull yourself up a level.'
else echo "You can't reach that high."
fi
;;
wake) if [ "$obj" ]
then echo "You awaken the $obj monster:"
PATH=$OPATH $obj $x
echo 'The monster slithers back into the darkness.'
else echo 'Wake what?'
fi
;;
w|where) echo "You are in $room."
;;
xyzzy) if cd
then echo 'A strange feeling comes over you.'
else echo 'Your spell fizzles out.'
fi
;;
*) if [ "$verb" ]
then if sh -c $wiz
then PATH=$OPATH $verb $obj $x
else echo "I don't know how to \"$verb\"."
echo 'Type "help" for assistance.'
fi
else echo 'Say something!'
fi
;;
esac
done
+5 -2
View File
@@ -383,8 +383,11 @@ wdequote_pathname (pathname)
/* Convert the strings into wide characters. */
n = xdupmbstowcs (&wpathname, NULL, pathname);
if (n == (size_t) -1)
/* Something wrong. Fall back to single-byte */
return udequote_pathname (pathname);
{
/* Something wrong. Fall back to single-byte */
udequote_pathname (pathname);
return;
}
orig_wpathname = wpathname;
for (i = j = 0; wpathname && wpathname[i]; )
+1249
View File
File diff suppressed because it is too large Load Diff
+76
View File
@@ -0,0 +1,76 @@
# This makefile for Readline library documentation is in -*- text -*- mode.
# Emacs likes it that way.
RM = rm -f
MAKEINFO = makeinfo
TEXI2DVI = texi2dvi
TEXI2HTML = texi2html
QUIETPS = #set this to -q to shut up dvips
DVIPS = dvips -D 300 $(QUIETPS) -o $@ # tricky
INSTALL_DATA = cp
infodir = /usr/local/info
RLSRC = rlman.texinfo rluser.texinfo rltech.texinfo
HISTSRC = hist.texinfo hsuser.texinfo hstech.texinfo
DVIOBJ = readline.dvi history.dvi
INFOOBJ = readline.info history.info
PSOBJ = readline.ps history.ps
HTMLOBJ = readline.html history.html
all: info dvi html ps
nodvi: info html
readline.dvi: $(RLSRC)
$(TEXI2DVI) rlman.texinfo
mv rlman.dvi readline.dvi
readline.info: $(RLSRC)
$(MAKEINFO) --no-split -o $@ rlman.texinfo
history.dvi: ${HISTSRC}
$(TEXI2DVI) hist.texinfo
mv hist.dvi history.dvi
history.info: ${HISTSRC}
$(MAKEINFO) --no-split -o $@ hist.texinfo
readline.ps: readline.dvi
$(RM) $@
$(DVIPS) readline.dvi
history.ps: history.dvi
$(RM) $@
$(DVIPS) history.dvi
readline.html: ${RLSRC}
$(TEXI2HTML) rlman.texinfo
sed -e 's:rlman.html:readline.html:' -e 's:rlman_toc.html:readline_toc.html:' rlman.html > readline.html
sed -e 's:rlman.html:readline.html:' -e 's:rlman_toc.html:readline_toc.html:' rlman_toc.html > readline_toc.html
$(RM) rlman.html rlman_toc.html
history.html: ${HISTSRC}
$(TEXI2HTML) hist.texinfo
sed -e 's:hist.html:history.html:' -e 's:hist_toc.html:history_toc.html:' hist.html > history.html
sed -e 's:hist.html:history.html:' -e 's:hist_toc.html:history_toc.html:' hist_toc.html > history_toc.html
$(RM) hist.html hist_toc.html
info: $(INFOOBJ)
dvi: $(DVIOBJ)
ps: $(PSOBJ)
html: $(HTMLOBJ)
clean:
$(RM) *.aux *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr *.cps *.pgs \
*.fns *.kys *.tps *.vrs *.o core
distclean: clean
mostlyclean: clean
maintainer-clean: clean
$(RM) *.dvi *.info *.info-* *.ps *.html
install: info
${INSTALL_DATA} readline.info $(infodir)/readline.info
${INSTALL_DATA} history.info $(infodir)/history.info
+1024 -1816
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,4 +1,4 @@
BUILD_DIR=/usr/local/build/bash/bash-current
BUILD_DIR=/usr/local/build/chet/bash/bash-current
THIS_SH=$BUILD_DIR/bash
PATH=$PATH:$BUILD_DIR
+50
View File
@@ -0,0 +1,50 @@
:; ./shx
sh:
<&$fd ok
nlbq Mon Aug 3 02:45:00 EDT 1992
bang geoff
quote 712824302
setbq defmsgid=<1992Aug3.024502.6176@host>
bgwait sleep done... wait 6187
bash:
<&$fd ok
nlbq Mon Aug 3 02:45:09 EDT 1992
bang geoff
quote 712824311
setbq defmsgid=<1992Aug3.024512.6212@host>
bgwait sleep done... wait 6223
ash:
<&$fd shx1: 4: Syntax error: Bad fd number
nlbq Mon Aug 3 02:45:19 EDT 1992
bang geoff
quote getdate: `"now"' not a valid date
setbq defmsgid=<1992Aug3.` echo 024521
bgwait sleep done... wait 6241
ksh:
<&$fd ok
nlbq ./shx: 6248 Memory fault - core dumped
bang geoff
quote getdate: `"now"' not a valid date
setbq defmsgid=<1992Aug3.024530.6257@host>
bgwait no such job: 6265
wait 6265
sleep done...
zsh:
<&$fd ok
nlbq Mon Aug 3 02:45:36 EDT 1992
bang shx3: event not found: /s/ [4]
quote 712824337
setbq defmsgid=<..6290@host>
bgwait shx7: unmatched " [9]
sleep done...
:;
+10
View File
@@ -0,0 +1,10 @@
#! /bin/sh
for cmd in sh bash ash ksh zsh
do
echo
echo $cmd:
for demo in shx?
do
$cmd $demo
done
done
+11 -7
View File
@@ -13,8 +13,8 @@ expect <one>
argv[1] = <one>
expect <two>
argv[1] = <two>
expect <bar>
bar
expect <one>
one
expect <one>
one
expect <one>
@@ -27,12 +27,12 @@ changevar: expect <three four five>
argv[1] = <three four five>
expect <three four five>
argv[1] = <three four five>
./nameref.tests: line 92: bar: readonly variable
./nameref.tests: line 93: foo: readonly variable
./nameref.tests: line 93: bar: readonly variable
./nameref.tests: line 94: foo: readonly variable
one
one
./nameref.tests: line 105: foo: readonly variable
./nameref.tests: line 102: foo: readonly variable
./nameref.tests: line 106: foo: readonly variable
./nameref.tests: line 103: foo: readonly variable
one
one
bar
@@ -43,7 +43,11 @@ expect <unset>
argv[1] = <unset>
expect <unset>
argv[1] = <unset>
./nameref3.sub: line 15: unset: bar: cannot unset: readonly variable
expect <bar>
argv[1] = <bar>
expect <unset>
argv[1] = <unset>
./nameref3.sub: line 21: unset: bar: cannot unset: readonly variable
expect <two>
two
expect <two>
+1
View File
@@ -87,6 +87,7 @@ echo "expect <three four five>"
recho "$bar"
unset foo bar
unset -n foo bar
readonly foo=one
typeset -n bar=foo
bar=4
+7 -1
View File
@@ -2,12 +2,18 @@
bar=one
typeset -n foo=bar
# normal unset unsets both nameref and variable it references
# normal unset unsets only variable nameref references
# need unset -n to unset nameref itself
unset foo
echo "expect <unset>"
recho ${bar-unset}
echo "expect <unset>"
recho ${foo-unset}
echo "expect <bar>"
recho ${!foo}
unset -n foo
echo "expect <unset>"
recho "${!foo-unset}"
readonly bar=two
typeset -n foo=bar
+1
View File
@@ -58,6 +58,7 @@ command typeset -n yy=xx
echo $?
unset foo bar
unset -n foo bar
set foo
typeset -n bar=$1
foo=hello
+1
View File
@@ -287,6 +287,7 @@ extern SHELL_VAR *bind_var_to_int __P((char *, intmax_t));
extern int assign_in_env __P((WORD_DESC *, int));
extern int unbind_variable __P((const char *));
extern int unbind_nameref __P((const char *));
extern int unbind_func __P((const char *));
extern int unbind_function_def __P((const char *));
extern int makunbound __P((const char *, VAR_CONTEXT *));