commit bash-20190612 snapshot

This commit is contained in:
Chet Ramey
2019-06-14 09:31:42 -04:00
parent 653d7134f8
commit f602910792
24 changed files with 1256 additions and 1099 deletions
+43
View File
@@ -6061,3 +6061,46 @@ execute_cmd.c
conversion from a WORD_LIST into a string. This makes it more
consistent with other arithmetic expansions. Inspired by a
discussion begun by Nils Emmerich <nemmerich@ernw.de>
6/10
----
jobs.c
- waitchld: since process substitutions are asynchronous, save the
status of one that exits (that we still know about) in the bgpids
list
6/12
----
jobs.c
- wait_for_background_pids: wait for the last procsub only if it's the
same as last_asynchronous_pid
bashline.c
- bash_backward_shellword: changes to behave better when at the
beginning of the last character on the line and to leave point at
the beginning of the shellword, like backward-word. Fixes from
Andrew Gaylard <a.gaylard@gmail.com>
6/13
----
bashline.c
- __P: Replaced with PARAMS. First of many
- bash_transpose_shellwords: transpose-words, but using `shellword'
word boundaries like shell-forward-word and shell-backward-word.
Contributed by Andrew Gaylard <a.gaylard@gmail.com>
- "shell-transpose-words": new name binding for bash_transpose_shellwords
- bash_readline_initialize: add default bindings for shell-forward-word,
shell-backward-word, shell-transpose-words, and shell-kill-word.
Suggested by Andrew Gaylard <a.gaylard@gmail.com>
lib/readline/doc/rluser.texi
- shell-transpose-words: document
- {shell-forward-word,shell-backward-word,shell-kill-word,shell-transpose-words}:
document new default bindings bash now adds
variables.c
- set_argv0: function to assign argv0 if it's found in the initial
shell environment. Suggested by Cuong Manh Le
<coung.manhle.vn@gmail.com>
- initialize_shell_variables: call set_argv0() as part of shell
initialization
+176 -103
View File
@@ -102,121 +102,122 @@
#define RL_BOOLEAN_VARIABLE_VALUE(s) ((s)[0] == 'o' && (s)[1] == 'n' && (s)[2] == '\0')
#if defined (BRACE_COMPLETION)
extern int bash_brace_completion __P((int, int));
extern int bash_brace_completion PARAMS((int, int));
#endif /* BRACE_COMPLETION */
/* To avoid including curses.h/term.h/termcap.h and that whole mess. */
#ifdef _MINIX
extern int tputs __P((const char *string, int nlines, void (*outx)(int)));
extern int tputs PARAMS((const char *string, int nlines, void (*outx)(int)));
#else
extern int tputs __P((const char *string, int nlines, int (*outx)(int)));
extern int tputs PARAMS((const char *string, int nlines, int (*outx)(int)));
#endif
/* Forward declarations */
/* Functions bound to keys in Readline for Bash users. */
static int shell_expand_line __P((int, int));
static int display_shell_version __P((int, int));
static int operate_and_get_next __P((int, int));
static int shell_expand_line PARAMS((int, int));
static int display_shell_version PARAMS((int, int));
static int operate_and_get_next PARAMS((int, int));
static int bash_ignore_filenames __P((char **));
static int bash_ignore_everything __P((char **));
static int bash_progcomp_ignore_filenames __P((char **));
static int bash_ignore_filenames PARAMS((char **));
static int bash_ignore_everything PARAMS((char **));
static int bash_progcomp_ignore_filenames PARAMS((char **));
#if defined (BANG_HISTORY)
static char *history_expand_line_internal __P((char *));
static int history_expand_line __P((int, int));
static int tcsh_magic_space __P((int, int));
static char *history_expand_line_internal PARAMS((char *));
static int history_expand_line PARAMS((int, int));
static int tcsh_magic_space PARAMS((int, int));
#endif /* BANG_HISTORY */
#ifdef ALIAS
static int alias_expand_line __P((int, int));
static int alias_expand_line PARAMS((int, int));
#endif
#if defined (BANG_HISTORY) && defined (ALIAS)
static int history_and_alias_expand_line __P((int, int));
static int history_and_alias_expand_line PARAMS((int, int));
#endif
static int bash_forward_shellword __P((int, int));
static int bash_backward_shellword __P((int, int));
static int bash_kill_shellword __P((int, int));
static int bash_backward_kill_shellword __P((int, int));
static int bash_forward_shellword PARAMS((int, int));
static int bash_backward_shellword PARAMS((int, int));
static int bash_kill_shellword PARAMS((int, int));
static int bash_backward_kill_shellword PARAMS((int, int));
static int bash_transpose_shellwords PARAMS((int, int));
/* Helper functions for Readline. */
static char *restore_tilde __P((char *, char *));
static char *maybe_restore_tilde __P((char *, char *));
static char *restore_tilde PARAMS((char *, char *));
static char *maybe_restore_tilde PARAMS((char *, char *));
static char *bash_filename_rewrite_hook __P((char *, int));
static char *bash_filename_rewrite_hook PARAMS((char *, int));
static void bash_directory_expansion __P((char **));
static int bash_filename_stat_hook __P((char **));
static int bash_command_name_stat_hook __P((char **));
static int bash_directory_completion_hook __P((char **));
static int filename_completion_ignore __P((char **));
static int bash_push_line __P((void));
static void bash_directory_expansion PARAMS((char **));
static int bash_filename_stat_hook PARAMS((char **));
static int bash_command_name_stat_hook PARAMS((char **));
static int bash_directory_completion_hook PARAMS((char **));
static int filename_completion_ignore PARAMS((char **));
static int bash_push_line PARAMS((void));
static int executable_completion __P((const char *, int));
static int executable_completion PARAMS((const char *, int));
static rl_icppfunc_t *save_directory_hook __P((void));
static void restore_directory_hook __P((rl_icppfunc_t));
static rl_icppfunc_t *save_directory_hook PARAMS((void));
static void restore_directory_hook PARAMS((rl_icppfunc_t));
static int directory_exists __P((const char *, int));
static int directory_exists PARAMS((const char *, int));
static void cleanup_expansion_error __P((void));
static void maybe_make_readline_line __P((char *));
static void set_up_new_line __P((char *));
static void cleanup_expansion_error PARAMS((void));
static void maybe_make_readline_line PARAMS((char *));
static void set_up_new_line PARAMS((char *));
static int check_redir __P((int));
static char **attempt_shell_completion __P((const char *, int, int));
static char *variable_completion_function __P((const char *, int));
static char *hostname_completion_function __P((const char *, int));
static char *command_subst_completion_function __P((const char *, int));
static int check_redir PARAMS((int));
static char **attempt_shell_completion PARAMS((const char *, int, int));
static char *variable_completion_function PARAMS((const char *, int));
static char *hostname_completion_function PARAMS((const char *, int));
static char *command_subst_completion_function PARAMS((const char *, int));
static void build_history_completion_array __P((void));
static char *history_completion_generator __P((const char *, int));
static int dynamic_complete_history __P((int, int));
static int bash_dabbrev_expand __P((int, int));
static void build_history_completion_array PARAMS((void));
static char *history_completion_generator PARAMS((const char *, int));
static int dynamic_complete_history PARAMS((int, int));
static int bash_dabbrev_expand PARAMS((int, int));
static void initialize_hostname_list __P((void));
static void add_host_name __P((char *));
static void snarf_hosts_from_file __P((char *));
static char **hostnames_matching __P((char *));
static void initialize_hostname_list PARAMS((void));
static void add_host_name PARAMS((char *));
static void snarf_hosts_from_file PARAMS((char *));
static char **hostnames_matching PARAMS((char *));
static void _ignore_completion_names __P((char **, sh_ignore_func_t *));
static int name_is_acceptable __P((const char *));
static int test_for_directory __P((const char *));
static int test_for_canon_directory __P((const char *));
static int return_zero __P((const char *));
static void _ignore_completion_names PARAMS((char **, sh_ignore_func_t *));
static int name_is_acceptable PARAMS((const char *));
static int test_for_directory PARAMS((const char *));
static int test_for_canon_directory PARAMS((const char *));
static int return_zero PARAMS((const char *));
static char *bash_dequote_filename __P((char *, int));
static char *quote_word_break_chars __P((char *));
static void set_filename_bstab __P((const char *));
static char *bash_quote_filename __P((char *, int, char *));
static char *bash_dequote_filename PARAMS((char *, int));
static char *quote_word_break_chars PARAMS((char *));
static void set_filename_bstab PARAMS((const char *));
static char *bash_quote_filename PARAMS((char *, int, char *));
#ifdef _MINIX
static void putx __P((int));
static void putx PARAMS((int));
#else
static int putx __P((int));
static int putx PARAMS((int));
#endif
static Keymap get_cmd_xmap_from_edit_mode __P((void));
static Keymap get_cmd_xmap_from_keymap __P((Keymap));
static Keymap get_cmd_xmap_from_edit_mode PARAMS((void));
static Keymap get_cmd_xmap_from_keymap PARAMS((Keymap));
static int bash_execute_unix_command __P((int, int));
static void init_unix_command_map __P((void));
static int isolate_sequence __P((char *, int, int, int *));
static int bash_execute_unix_command PARAMS((int, int));
static void init_unix_command_map PARAMS((void));
static int isolate_sequence PARAMS((char *, int, int, int *));
static int set_saved_history __P((void));
static int set_saved_history PARAMS((void));
#if defined (ALIAS)
static int posix_edit_macros __P((int, int));
static int posix_edit_macros PARAMS((int, int));
#endif
static int bash_event_hook __P((void));
static int bash_event_hook PARAMS((void));
#if defined (PROGRAMMABLE_COMPLETION)
static int find_cmd_start __P((int));
static int find_cmd_end __P((int));
static char *find_cmd_name __P((int, int *, int *));
static char *prog_complete_return __P((const char *, int));
static int find_cmd_start PARAMS((int));
static int find_cmd_end PARAMS((int));
static char *find_cmd_name PARAMS((int, int *, int *));
static char *prog_complete_return PARAMS((const char *, int));
static char **prog_complete_matches;
#endif
@@ -231,40 +232,40 @@ extern STRING_INT_ALIST word_token_alist[];
#define SPECIFIC_COMPLETION_FUNCTIONS
#if defined (SPECIFIC_COMPLETION_FUNCTIONS)
static int bash_specific_completion __P((int, rl_compentry_func_t *));
static int bash_specific_completion PARAMS((int, rl_compentry_func_t *));
static int bash_complete_filename_internal __P((int));
static int bash_complete_username_internal __P((int));
static int bash_complete_hostname_internal __P((int));
static int bash_complete_variable_internal __P((int));
static int bash_complete_command_internal __P((int));
static int bash_complete_filename_internal PARAMS((int));
static int bash_complete_username_internal PARAMS((int));
static int bash_complete_hostname_internal PARAMS((int));
static int bash_complete_variable_internal PARAMS((int));
static int bash_complete_command_internal PARAMS((int));
static int bash_complete_filename __P((int, int));
static int bash_possible_filename_completions __P((int, int));
static int bash_complete_username __P((int, int));
static int bash_possible_username_completions __P((int, int));
static int bash_complete_hostname __P((int, int));
static int bash_possible_hostname_completions __P((int, int));
static int bash_complete_variable __P((int, int));
static int bash_possible_variable_completions __P((int, int));
static int bash_complete_command __P((int, int));
static int bash_possible_command_completions __P((int, int));
static int bash_complete_filename PARAMS((int, int));
static int bash_possible_filename_completions PARAMS((int, int));
static int bash_complete_username PARAMS((int, int));
static int bash_possible_username_completions PARAMS((int, int));
static int bash_complete_hostname PARAMS((int, int));
static int bash_possible_hostname_completions PARAMS((int, int));
static int bash_complete_variable PARAMS((int, int));
static int bash_possible_variable_completions PARAMS((int, int));
static int bash_complete_command PARAMS((int, int));
static int bash_possible_command_completions PARAMS((int, int));
static int completion_glob_pattern __P((char *));
static char *glob_complete_word __P((const char *, int));
static int bash_glob_completion_internal __P((int));
static int bash_glob_complete_word __P((int, int));
static int bash_glob_expand_word __P((int, int));
static int bash_glob_list_expansions __P((int, int));
static int completion_glob_pattern PARAMS((char *));
static char *glob_complete_word PARAMS((const char *, int));
static int bash_glob_completion_internal PARAMS((int));
static int bash_glob_complete_word PARAMS((int, int));
static int bash_glob_expand_word PARAMS((int, int));
static int bash_glob_list_expansions PARAMS((int, int));
#endif /* SPECIFIC_COMPLETION_FUNCTIONS */
static int edit_and_execute_command __P((int, int, int, char *));
static int edit_and_execute_command PARAMS((int, int, int, char *));
#if defined (VI_MODE)
static int vi_edit_and_execute_command __P((int, int));
static int bash_vi_complete __P((int, int));
static int vi_edit_and_execute_command PARAMS((int, int));
static int bash_vi_complete PARAMS((int, int));
#endif
static int emacs_edit_and_execute_command __P((int, int));
static int emacs_edit_and_execute_command PARAMS((int, int));
/* Non-zero once initalize_readline () has been called. */
int bash_readline_initialized = 0;
@@ -464,6 +465,7 @@ initialize_readline ()
rl_add_defun ("shell-backward-word", bash_backward_shellword, -1);
rl_add_defun ("shell-kill-word", bash_kill_shellword, -1);
rl_add_defun ("shell-backward-kill-word", bash_backward_kill_shellword, -1);
rl_add_defun ("shell-transpose-words", bash_transpose_shellwords, -1);
#ifdef ALIAS
rl_add_defun ("alias-expand-line", alias_expand_line, -1);
@@ -616,6 +618,13 @@ initialize_readline ()
rl_filename_dequoting_function = bash_dequote_filename;
rl_char_is_quoted_p = char_is_quoted;
/* Add some default bindings for the "shellwords" functions, roughly
parallelling the default word bindings in emacs mode. */
rl_bind_key_if_unbound_in_map (CTRL('B'), bash_backward_shellword, emacs_meta_keymap);
rl_bind_key_if_unbound_in_map (CTRL('D'), bash_kill_shellword, emacs_meta_keymap);
rl_bind_key_if_unbound_in_map (CTRL('F'), bash_forward_shellword, emacs_meta_keymap);
rl_bind_key_if_unbound_in_map (CTRL('T'), bash_transpose_shellwords, emacs_meta_keymap);
#if 0
/* This is superfluous and makes it impossible to use tab completion in
vi mode even when explicitly binding it in ~/.inputrc. sv_strict_posix()
@@ -1197,7 +1206,7 @@ bash_backward_shellword (count, key)
int count, key;
{
size_t slen;
int c, p;
int c, p, prev_p;
DECLARE_MBSTATE;
if (count < 0)
@@ -1206,9 +1215,6 @@ bash_backward_shellword (count, key)
p = rl_point;
slen = rl_end;
if (p == rl_end && p > 0)
p--;
while (count)
{
if (p == 0)
@@ -1217,7 +1223,10 @@ bash_backward_shellword (count, key)
return 0;
}
/* Move backward until we hit a non-metacharacter. */
/* Move backward until we hit a non-metacharacter. We want to deal
with the characters before point, so we move off a word if we're
at its first character. */
BACKUP_CHAR (rl_line_buffer, slen, p);
while (p > 0)
{
c = rl_line_buffer[p];
@@ -1232,12 +1241,18 @@ bash_backward_shellword (count, key)
return 0;
}
/* Now move backward until we hit a metacharacter or BOL. */
/* Now move backward until we hit a metacharacter or BOL. Leave point
at the start of the shellword or at BOL. */
prev_p = p;
while (p > 0)
{
c = rl_line_buffer[p];
if (WORDDELIM (c) && char_is_quoted (rl_line_buffer, p) == 0)
break;
{
p = prev_p;
break;
}
prev_p = p;
BACKUP_CHAR (rl_line_buffer, slen, p);
}
@@ -1291,6 +1306,64 @@ bash_backward_kill_shellword (count, key)
return 0;
}
static int
bash_transpose_shellwords (count, key)
int count, key;
{
char *word1, *word2;
int w1_beg, w1_end, w2_beg, w2_end;
int orig_point = rl_point;
if (count == 0)
return 0;
/* Find the two shell words. */
bash_forward_shellword (count, key);
w2_end = rl_point;
bash_backward_shellword (1, key);
w2_beg = rl_point;
bash_backward_shellword (count, key);
w1_beg = rl_point;
bash_forward_shellword (1, key);
w1_end = rl_point;
/* check that there really are two words. */
if ((w1_beg == w2_beg) || (w2_beg < w1_end))
{
rl_ding ();
rl_point = orig_point;
return 1;
}
/* Get the text of the words. */
word1 = rl_copy_text (w1_beg, w1_end);
word2 = rl_copy_text (w2_beg, w2_end);
/* We are about to do many insertions and deletions. Remember them
as one operation. */
rl_begin_undo_group ();
/* Do the stuff at word2 first, so that we don't have to worry
about word1 moving. */
rl_point = w2_beg;
rl_delete_text (w2_beg, w2_end);
rl_insert_text (word1);
rl_point = w1_beg;
rl_delete_text (w1_beg, w1_end);
rl_insert_text (word2);
/* This is exactly correct since the text before this point has not
changed in length. */
rl_point = w2_end;
/* I think that does it. */
rl_end_undo_group ();
xfree (word1);
xfree (word2);
return 0;
}
/* **************************************************************** */
/* */
+33 -32
View File
@@ -6041,21 +6041,22 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
Wait for each specified child process and return its termination
status. Each _i_d 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 _i_d is not given, all currently active child pro-
cesses are waited for, and the return status is zero. If the --nn
option is supplied, wwaaiitt waits for a single job to terminate and
returns its exit status. Supplying the --ff option, when job con-
trol is enabled, forces wwaaiitt to wait for _i_d to terminate before
returning its status, instead of returning when it changes sta-
tus. If _i_d 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.
waited for. If _i_d is not given, wwaaiitt waits for all running
background jobs and the last-executed process substitution, if
its process id is the same as $$!!, and the return status is zero.
If the --nn option is supplied, wwaaiitt waits for a single job to
terminate and returns its exit status. Supplying the --ff option,
when job control is enabled, forces wwaaiitt to wait for _i_d to ter-
minate before returning its status, instead of returning when it
changes status. If _i_d 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.
RREESSTTRRIICCTTEEDD SSHHEELLLL
If bbaasshh is started with the name rrbbaasshh, or the --rr option is supplied at
invocation, the shell becomes restricted. A restricted shell is used
to set up an environment more controlled than the standard shell. It
behaves identically to bbaasshh with the exception that the following are
invocation, the shell becomes restricted. A restricted shell is used
to set up an environment more controlled than the standard shell. It
behaves identically to bbaasshh with the exception that the following are
disallowed or not performed:
+o changing directories with ccdd
@@ -6064,16 +6065,16 @@ RREESSTTRRIICCTTEEDD SSHHEELLLL
+o specifying command names containing //
+o specifying a filename containing a // as an argument to the ..
+o specifying a filename containing a // as an argument to the ..
builtin command
+o specifying a filename containing a slash as an argument to the
+o specifying a filename containing a slash as an argument to the
--pp option to the hhaasshh builtin command
+o importing function definitions from the shell environment at
+o importing function definitions from the shell environment at
startup
+o parsing the value of SSHHEELLLLOOPPTTSS from the shell environment at
+o parsing the value of SSHHEELLLLOOPPTTSS from the shell environment at
startup
+o redirecting output using the >, >|, <>, >&, &>, and >> redirect-
@@ -6082,10 +6083,10 @@ RREESSTTRRIICCTTEEDD SSHHEELLLL
+o using the eexxeecc builtin command to replace the shell with another
command
+o adding or deleting builtin commands with the --ff and --dd options
+o adding or deleting builtin commands with the --ff and --dd options
to the eennaabbllee builtin command
+o using the eennaabbllee builtin command to enable disabled shell
+o using the eennaabbllee builtin command to enable disabled shell
builtins
+o specifying the --pp option to the ccoommmmaanndd builtin command
@@ -6095,14 +6096,14 @@ RREESSTTRRIICCTTEEDD SSHHEELLLL
These restrictions are enforced after any startup files are read.
When a command that is found to be a shell script is executed (see CCOOMM--
MMAANNDD EEXXEECCUUTTIIOONN above), rrbbaasshh turns off any restrictions in the shell
MMAANNDD EEXXEECCUUTTIIOONN above), rrbbaasshh turns off any restrictions in the shell
spawned to execute the script.
SSEEEE AALLSSOO
_B_a_s_h _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, Brian Fox and Chet Ramey
_T_h_e _G_n_u _R_e_a_d_l_i_n_e _L_i_b_r_a_r_y, Brian Fox and Chet Ramey
_T_h_e _G_n_u _H_i_s_t_o_r_y _L_i_b_r_a_r_y, Brian Fox and Chet Ramey
_P_o_r_t_a_b_l_e _O_p_e_r_a_t_i_n_g _S_y_s_t_e_m _I_n_t_e_r_f_a_c_e _(_P_O_S_I_X_) _P_a_r_t _2_: _S_h_e_l_l _a_n_d _U_t_i_l_i_-
_P_o_r_t_a_b_l_e _O_p_e_r_a_t_i_n_g _S_y_s_t_e_m _I_n_t_e_r_f_a_c_e _(_P_O_S_I_X_) _P_a_r_t _2_: _S_h_e_l_l _a_n_d _U_t_i_l_i_-
_t_i_e_s, IEEE --
http://pubs.opengroup.org/onlinepubs/9699919799/
http://tiswww.case.edu/~chet/bash/POSIX -- a description of posix mode
@@ -6120,7 +6121,7 @@ FFIILLEESS
_~_/_._b_a_s_h_r_c
The individual per-interactive-shell startup file
_~_/_._b_a_s_h___l_o_g_o_u_t
The individual login shell cleanup file, executed when a login
The individual login shell cleanup file, executed when a login
shell exits
_~_/_._i_n_p_u_t_r_c
Individual _r_e_a_d_l_i_n_e initialization file
@@ -6134,14 +6135,14 @@ AAUUTTHHOORRSS
BBUUGG RREEPPOORRTTSS
If you find a bug in bbaasshh,, you should report it. But first, you should
make sure that it really is a bug, and that it appears in the latest
version of bbaasshh. The latest version is always available from
make sure that it really is a bug, and that it appears in the latest
version of bbaasshh. The latest version is always available from
_f_t_p_:_/_/_f_t_p_._g_n_u_._o_r_g_/_p_u_b_/_g_n_u_/_b_a_s_h_/.
Once you have determined that a bug actually exists, use the _b_a_s_h_b_u_g
command to submit a bug report. If you have a fix, you are encouraged
to mail that as well! Suggestions and `philosophical' bug reports may
be mailed to _b_u_g_-_b_a_s_h_@_g_n_u_._o_r_g or posted to the Usenet newsgroup
Once you have determined that a bug actually exists, use the _b_a_s_h_b_u_g
command to submit a bug report. If you have a fix, you are encouraged
to mail that as well! Suggestions and `philosophical' bug reports may
be mailed to _b_u_g_-_b_a_s_h_@_g_n_u_._o_r_g or posted to the Usenet newsgroup
ggnnuu..bbaasshh..bbuugg.
ALL bug reports should include:
@@ -6152,7 +6153,7 @@ BBUUGG RREEPPOORRTTSS
A description of the bug behaviour
A short script or `recipe' which exercises the bug
_b_a_s_h_b_u_g inserts the first three items automatically into the template
_b_a_s_h_b_u_g inserts the first three items automatically into the template
it provides for filing a bug report.
Comments and bug reports concerning this manual page should be directed
@@ -6169,10 +6170,10 @@ BBUUGGSS
Shell builtin commands and functions are not stoppable/restartable.
Compound commands and command sequences of the form `a ; b ; c' are not
handled gracefully when process suspension is attempted. When a
process is stopped, the shell immediately executes the next command in
the sequence. It suffices to place the sequence of commands between
parentheses to force it into a subshell, which may be stopped as a
handled gracefully when process suspension is attempted. When a
process is stopped, the shell immediately executes the next command in
the sequence. It suffices to place the sequence of commands between
parentheses to force it into a subshell, which may be stopped as a
unit.
Array variables may not (yet) be exported.
+7 -3
View File
@@ -10263,7 +10263,8 @@ Return a status of 0 (true) or 1 (false) depending on
the evaluation of the conditional expression
.IR expr .
Each operator and operand must be a separate argument.
Expressions are composed of the primaries described above under
.if \n(zZ=0 Expressions are composed of the primaries described above under
.if \n(zZ=1 Expressions are composed of the primaries described in the \fBbash\fP manual page under
.SM
.BR "CONDITIONAL EXPRESSIONS" .
\fBtest\fP does not accept any options, nor does it accept and ignore
@@ -10775,8 +10776,11 @@ 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
.I id
is not given, all currently active child processes
are waited for, and the return status is zero.
is not given,
\fBwait\fP waits for all running background jobs and
the last-executed process substitution, if its process id is the same as
\fB$!\fP,
and the return status is zero.
If the \fB\-n\fP option is supplied, \fBwait\fP waits for a single job
to terminate and returns its exit status.
Supplying the \fB\-f\fP option, when job control is enabled,
+6 -3
View File
@@ -13658,8 +13658,11 @@ ID or a job specification; if a job spec is given, all processes
in that job's pipeline are waited for. If
<I>id</I>
is not given, all currently active child processes
are waited for, and the return status is zero.
is not given,
<B>wait</B> waits for all running background jobs and
the last-executed process substitution, if its process id is the same as
<B>$!</B>,
and the return status is zero.
If the <B>-n</B> option is supplied, <B>wait</B> waits for a single job
to terminate and returns its exit status.
Supplying the <B>-f</B> option, when job control is enabled,
@@ -14065,6 +14068,6 @@ There may be only one active coprocess at a time.
</DL>
<HR>
This document was created by man2html from bash.1.<BR>
Time: 20 May 2019 14:36:28 EDT
Time: 12 June 2019 15:27:00 EDT
</BODY>
</HTML>
+145 -144
View File
@@ -2,9 +2,9 @@ This is bash.info, produced by makeinfo version 6.5 from
bashref.texi.
This text is a brief description of the features that are present in the
Bash shell (version 5.0, 20 May 2019).
Bash shell (version 5.0, 12 June 2019).
This is Edition 5.0, last updated 20 May 2019, of 'The GNU Bash
This is Edition 5.0, last updated 12 June 2019, of 'The GNU Bash
Reference Manual', for 'Bash', Version 5.0.
Copyright (C) 1988-2018 Free Software Foundation, Inc.
@@ -27,10 +27,10 @@ Bash Features
*************
This text is a brief description of the features that are present in the
Bash shell (version 5.0, 20 May 2019). The Bash home page is
Bash shell (version 5.0, 12 June 2019). The Bash home page is
<http://www.gnu.org/software/bash/>.
This is Edition 5.0, last updated 20 May 2019, of 'The GNU Bash
This is Edition 5.0, last updated 12 June 2019, of 'The GNU Bash
Reference Manual', for 'Bash', Version 5.0.
Bash contains features that appear in other popular shells, and some
@@ -7019,15 +7019,16 @@ File: bash.info, Node: Job Control Builtins, Next: Job Control Variables, Pre
Wait until the child process specified by each process ID PID or
job specification JOBSPEC exits and return the exit status of the
last command waited for. If a job spec is given, all processes in
the job are waited for. If no arguments are given, all currently
active child processes are waited for, and the return status is
zero. If the '-n' option is supplied, 'wait' waits for a single
job to terminate and returns its exit status. Supplying the '-f'
option, when job control is enabled, forces 'wait' to wait for each
PID or JOBSPEC to terminate before returning its status, intead of
returning when it changes status. If neither JOBSPEC nor PID
specifies an active child process of the shell, the return status
is 127.
the job are waited for. If no arguments are given, 'wait' waits
for all running background jobs and the last-executed process
substitution, if its process id is the same as $!, and the return
status is zero. If the '-n' option is supplied, 'wait' waits for a
single job to terminate and returns its exit status. Supplying the
'-f' option, when job control is enabled, forces 'wait' to wait for
each PID or JOBSPEC to terminate before returning its status,
intead of returning when it changes status. If neither JOBSPEC nor
PID specifies an active child process of the shell, the return
status is 127.
'disown'
disown [-ar] [-h] [JOBSPEC ... | PID ... ]
@@ -11012,7 +11013,7 @@ D.1 Index of Shell Builtin Commands
* dirs: Directory Stack Builtins.
(line 7)
* disown: Job Control Builtins.
(line 92)
(line 93)
* echo: Bash Builtins. (line 246)
* enable: Bash Builtins. (line 295)
* eval: Bourne Shell Builtins.
@@ -11061,7 +11062,7 @@ D.1 Index of Shell Builtin Commands
* shopt: The Shopt Builtin. (line 9)
* source: Bash Builtins. (line 563)
* suspend: Job Control Builtins.
(line 104)
(line 105)
* test: Bourne Shell Builtins.
(line 269)
* times: Bourne Shell Builtins.
@@ -11710,134 +11711,134 @@ D.5 Concept Index

Tag Table:
Node: Top887
Node: Introduction2797
Node: What is Bash?3013
Node: What is a shell?4127
Node: Definitions6665
Node: Basic Shell Features9616
Node: Shell Syntax10835
Node: Shell Operation11861
Node: Quoting13154
Node: Escape Character14454
Node: Single Quotes14939
Node: Double Quotes15287
Node: ANSI-C Quoting16565
Node: Locale Translation17824
Node: Comments18720
Node: Shell Commands19338
Node: Simple Commands20210
Node: Pipelines20841
Node: Lists23773
Node: Compound Commands25564
Node: Looping Constructs26576
Node: Conditional Constructs29071
Node: Command Grouping40239
Node: Coprocesses41718
Node: GNU Parallel43621
Node: Shell Functions47679
Node: Shell Parameters54762
Node: Positional Parameters59175
Node: Special Parameters60075
Node: Shell Expansions63829
Node: Brace Expansion65952
Node: Tilde Expansion68675
Node: Shell Parameter Expansion71292
Node: Command Substitution85725
Node: Arithmetic Expansion87080
Node: Process Substitution88012
Node: Word Splitting89132
Node: Filename Expansion91076
Node: Pattern Matching93606
Node: Quote Removal97592
Node: Redirections97887
Node: Executing Commands107445
Node: Simple Command Expansion108115
Node: Command Search and Execution110045
Node: Command Execution Environment112421
Node: Environment115405
Node: Exit Status117064
Node: Signals118734
Node: Shell Scripts120701
Node: Shell Builtin Commands123216
Node: Bourne Shell Builtins125254
Node: Bash Builtins146004
Node: Modifying Shell Behavior174929
Node: The Set Builtin175274
Node: The Shopt Builtin185687
Node: Special Builtins203357
Node: Shell Variables204336
Node: Bourne Shell Variables204773
Node: Bash Variables206877
Node: Bash Features237824
Node: Invoking Bash238723
Node: Bash Startup Files244736
Node: Interactive Shells249839
Node: What is an Interactive Shell?250249
Node: Is this Shell Interactive?250898
Node: Interactive Shell Behavior251713
Node: Bash Conditional Expressions255200
Node: Shell Arithmetic259777
Node: Aliases262594
Node: Arrays265214
Node: The Directory Stack270579
Node: Directory Stack Builtins271363
Node: Controlling the Prompt274331
Node: The Restricted Shell277252
Node: Bash POSIX Mode279734
Node: Job Control290667
Node: Job Control Basics291127
Node: Job Control Builtins296091
Node: Job Control Variables300831
Node: Command Line Editing301987
Node: Introduction and Notation303658
Node: Readline Interaction305281
Node: Readline Bare Essentials306472
Node: Readline Movement Commands308255
Node: Readline Killing Commands309215
Node: Readline Arguments311133
Node: Searching312177
Node: Readline Init File314363
Node: Readline Init File Syntax315622
Node: Conditional Init Constructs336061
Node: Sample Init File340257
Node: Bindable Readline Commands343374
Node: Commands For Moving344578
Node: Commands For History346427
Node: Commands For Text350722
Node: Commands For Killing354110
Node: Numeric Arguments356591
Node: Commands For Completion357730
Node: Keyboard Macros361921
Node: Miscellaneous Commands362608
Node: Readline vi Mode368561
Node: Programmable Completion369468
Node: Programmable Completion Builtins377248
Node: A Programmable Completion Example387943
Node: Using History Interactively393190
Node: Bash History Facilities393874
Node: Bash History Builtins396879
Node: History Interaction401410
Node: Event Designators405030
Node: Word Designators406249
Node: Modifiers407886
Node: Installing Bash409288
Node: Basic Installation410425
Node: Compilers and Options413683
Node: Compiling For Multiple Architectures414424
Node: Installation Names416117
Node: Specifying the System Type416935
Node: Sharing Defaults417651
Node: Operation Controls418324
Node: Optional Features419282
Node: Reporting Bugs429800
Node: Major Differences From The Bourne Shell430994
Node: GNU Free Documentation License447846
Node: Indexes473023
Node: Builtin Index473477
Node: Reserved Word Index480304
Node: Variable Index482752
Node: Function Index498576
Node: Concept Index511879
Node: Top889
Node: Introduction2801
Node: What is Bash?3017
Node: What is a shell?4131
Node: Definitions6669
Node: Basic Shell Features9620
Node: Shell Syntax10839
Node: Shell Operation11865
Node: Quoting13158
Node: Escape Character14458
Node: Single Quotes14943
Node: Double Quotes15291
Node: ANSI-C Quoting16569
Node: Locale Translation17828
Node: Comments18724
Node: Shell Commands19342
Node: Simple Commands20214
Node: Pipelines20845
Node: Lists23777
Node: Compound Commands25568
Node: Looping Constructs26580
Node: Conditional Constructs29075
Node: Command Grouping40243
Node: Coprocesses41722
Node: GNU Parallel43625
Node: Shell Functions47683
Node: Shell Parameters54766
Node: Positional Parameters59179
Node: Special Parameters60079
Node: Shell Expansions63833
Node: Brace Expansion65956
Node: Tilde Expansion68679
Node: Shell Parameter Expansion71296
Node: Command Substitution85729
Node: Arithmetic Expansion87084
Node: Process Substitution88016
Node: Word Splitting89136
Node: Filename Expansion91080
Node: Pattern Matching93610
Node: Quote Removal97596
Node: Redirections97891
Node: Executing Commands107449
Node: Simple Command Expansion108119
Node: Command Search and Execution110049
Node: Command Execution Environment112425
Node: Environment115409
Node: Exit Status117068
Node: Signals118738
Node: Shell Scripts120705
Node: Shell Builtin Commands123220
Node: Bourne Shell Builtins125258
Node: Bash Builtins146008
Node: Modifying Shell Behavior174933
Node: The Set Builtin175278
Node: The Shopt Builtin185691
Node: Special Builtins203361
Node: Shell Variables204340
Node: Bourne Shell Variables204777
Node: Bash Variables206881
Node: Bash Features237828
Node: Invoking Bash238727
Node: Bash Startup Files244740
Node: Interactive Shells249843
Node: What is an Interactive Shell?250253
Node: Is this Shell Interactive?250902
Node: Interactive Shell Behavior251717
Node: Bash Conditional Expressions255204
Node: Shell Arithmetic259781
Node: Aliases262598
Node: Arrays265218
Node: The Directory Stack270583
Node: Directory Stack Builtins271367
Node: Controlling the Prompt274335
Node: The Restricted Shell277256
Node: Bash POSIX Mode279738
Node: Job Control290671
Node: Job Control Basics291131
Node: Job Control Builtins296095
Node: Job Control Variables300913
Node: Command Line Editing302069
Node: Introduction and Notation303740
Node: Readline Interaction305363
Node: Readline Bare Essentials306554
Node: Readline Movement Commands308337
Node: Readline Killing Commands309297
Node: Readline Arguments311215
Node: Searching312259
Node: Readline Init File314445
Node: Readline Init File Syntax315704
Node: Conditional Init Constructs336143
Node: Sample Init File340339
Node: Bindable Readline Commands343456
Node: Commands For Moving344660
Node: Commands For History346509
Node: Commands For Text350804
Node: Commands For Killing354192
Node: Numeric Arguments356673
Node: Commands For Completion357812
Node: Keyboard Macros362003
Node: Miscellaneous Commands362690
Node: Readline vi Mode368643
Node: Programmable Completion369550
Node: Programmable Completion Builtins377330
Node: A Programmable Completion Example388025
Node: Using History Interactively393272
Node: Bash History Facilities393956
Node: Bash History Builtins396961
Node: History Interaction401492
Node: Event Designators405112
Node: Word Designators406331
Node: Modifiers407968
Node: Installing Bash409370
Node: Basic Installation410507
Node: Compilers and Options413765
Node: Compiling For Multiple Architectures414506
Node: Installation Names416199
Node: Specifying the System Type417017
Node: Sharing Defaults417733
Node: Operation Controls418406
Node: Optional Features419364
Node: Reporting Bugs429882
Node: Major Differences From The Bourne Shell431076
Node: GNU Free Documentation License447928
Node: Indexes473105
Node: Builtin Index473559
Node: Reserved Word Index480386
Node: Variable Index482834
Node: Function Index498658
Node: Concept Index511961

End Tag Table
BIN
View File
Binary file not shown.
+19 -18
View File
@@ -1,6 +1,6 @@
%!PS-Adobe-3.0
%%Creator: groff version 1.22.3
%%CreationDate: Mon May 20 14:36:19 2019
%%CreationDate: Wed Jun 12 15:26:50 2019
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%+ font Times-Italic
@@ -9587,23 +9587,24 @@ tion status.).8 F(Each)5.659 E F2(id)3.169 E F0 .659(may be a process)
3.929 F .009(ID or a job speci\214cation; if a job spec is gi)144 636 R
-.15(ve)-.25 G .008(n, all processes in that job').15 F 2.508(sp)-.55 G
.008(ipeline are w)-2.508 F .008(aited for)-.1 F 5.008(.I)-.55 G(f)
-5.008 E F2(id)144.01 648 Q F0 .521(is not gi)3.791 F -.15(ve)-.25 G
.521(n, all currently acti).15 F .821 -.15(ve c)-.25 H .521
(hild processes are w).15 F .521(aited for)-.1 F 3.021(,a)-.4 G .521
(nd the return status is zero.)-3.021 F(If)5.522 E(the)144 660 Q F1
<ad6e>2.948 E F0 .448(option is supplied,)2.948 F F1(wait)2.948 E F0 -.1
(wa)2.948 G .448(its for a single job to terminate and returns its e).1
F .447(xit status.)-.15 F(Sup-)5.447 E 1.023(plying the)144 672 R F1
<ad66>3.523 E F0 1.023(option, when job control is enabled, forces)3.523
F F1(wait)3.524 E F0 1.024(to w)3.524 F 1.024(ait for)-.1 F F2(id)3.524
E F0 1.024(to terminate before)3.524 F 1.835
(returning its status, instead of returning when it changes status.)144
684 R(If)6.835 E F2(id)4.345 E F0 1.835(speci\214es a non-e)5.105 F
(xistent)-.15 E 1.022(process or job, the return status is 127.)144 696
R 1.023(Otherwise, the return status is the e)6.023 F 1.023
(xit status of the last)-.15 F(process or job w)144 708 Q(aited for)-.1
E(.)-.55 E(GNU Bash 5.0)72 768 Q(2019 May 20)148.175 E(79)197.335 E 0 Cg
EP
-5.008 E F2(id)144.01 648 Q F0 .441(is not gi)3.711 F -.15(ve)-.25 G(n,)
.15 E F1(wait)2.941 E F0 -.1(wa)2.941 G .441
(its for all running background jobs and the last-e).1 F -.15(xe)-.15 G
.442(cuted process substitu-).15 F .598
(tion, if its process id is the same as)144 660 R F1($!)3.098 E F0 3.098
(,a)C .598(nd the return status is zero.)-3.098 F .597(If the)5.597 F F1
<ad6e>3.097 E F0 .597(option is supplied,)3.097 F F1(wait)144 672 Q F0
-.1(wa)3.056 G .556(its for a single job to terminate and returns its e)
.1 F .557(xit status.)-.15 F .557(Supplying the)5.557 F F1<ad66>3.057 E
F0 .557(option, when)3.057 F .346(job control is enabled, forces)144 684
R F1(wait)2.846 E F0 .346(to w)2.846 F .346(ait for)-.1 F F2(id)2.846 E
F0 .346(to terminate before returning its status, instead of)2.846 F
.599(returning when it changes status.)144 696 R(If)5.599 E F2(id)3.109
E F0 .599(speci\214es a non-e)3.869 F .6
(xistent process or job, the return status is)-.15 F 2.5
(127. Otherwise,)144 708 R(the return status is the e)2.5 E
(xit status of the last process or job w)-.15 E(aited for)-.1 E(.)-.55 E
(GNU Bash 5.0)72 768 Q(2019 May 20)148.175 E(79)197.335 E 0 Cg EP
%%Page: 80 80
%%BeginPageSetup
BP
BIN
View File
Binary file not shown.
+9 -6
View File
@@ -1,9 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- This text is a brief description of the features that are present in
the Bash shell (version 5.0, 20 May 2019).
the Bash shell (version 5.0, 12 June 2019).
This is Edition 5.0, last updated 20 May 2019,
This is Edition 5.0, last updated 12 June 2019,
of The GNU Bash Reference Manual,
for Bash, Version 5.0.
@@ -284,10 +284,10 @@ Next: <a href="#Introduction" accesskey="n" rel="next">Introduction</a>, Previou
<h1 class="top">Bash Features</h1>
<p>This text is a brief description of the features that are present in
the Bash shell (version 5.0, 20 May 2019).
the Bash shell (version 5.0, 12 June 2019).
The Bash home page is <a href="http://www.gnu.org/software/bash/">http://www.gnu.org/software/bash/</a>.
</p>
<p>This is Edition 5.0, last updated 20 May 2019,
<p>This is Edition 5.0, last updated 12 June 2019,
of <cite>The GNU Bash Reference Manual</cite>,
for <code>Bash</code>, Version 5.0.
</p>
@@ -9508,8 +9508,11 @@ or non-zero if an error occurs or an invalid option is encountered.
or job specification <var>jobspec</var> exits and return the exit status of the
last command waited for.
If a job spec is given, all processes in the job are waited for.
If no arguments are given, all currently active child processes are
waited for, and the return status is zero.
If no arguments are given,
<code>wait</code> waits for all running background jobs and
the last-executed process substitution, if its process id is the same as
<var>$!</var>,
and the return status is zero.
If the <samp>-n</samp> option is supplied, <code>wait</code> waits for a single job
to terminate and returns its exit status.
Supplying the <samp>-f</samp> option, when job control is enabled,
+145 -144
View File
@@ -2,9 +2,9 @@ This is bashref.info, produced by makeinfo version 6.5 from
bashref.texi.
This text is a brief description of the features that are present in the
Bash shell (version 5.0, 20 May 2019).
Bash shell (version 5.0, 12 June 2019).
This is Edition 5.0, last updated 20 May 2019, of 'The GNU Bash
This is Edition 5.0, last updated 12 June 2019, of 'The GNU Bash
Reference Manual', for 'Bash', Version 5.0.
Copyright (C) 1988-2018 Free Software Foundation, Inc.
@@ -27,10 +27,10 @@ Bash Features
*************
This text is a brief description of the features that are present in the
Bash shell (version 5.0, 20 May 2019). The Bash home page is
Bash shell (version 5.0, 12 June 2019). The Bash home page is
<http://www.gnu.org/software/bash/>.
This is Edition 5.0, last updated 20 May 2019, of 'The GNU Bash
This is Edition 5.0, last updated 12 June 2019, of 'The GNU Bash
Reference Manual', for 'Bash', Version 5.0.
Bash contains features that appear in other popular shells, and some
@@ -7019,15 +7019,16 @@ File: bashref.info, Node: Job Control Builtins, Next: Job Control Variables,
Wait until the child process specified by each process ID PID or
job specification JOBSPEC exits and return the exit status of the
last command waited for. If a job spec is given, all processes in
the job are waited for. If no arguments are given, all currently
active child processes are waited for, and the return status is
zero. If the '-n' option is supplied, 'wait' waits for a single
job to terminate and returns its exit status. Supplying the '-f'
option, when job control is enabled, forces 'wait' to wait for each
PID or JOBSPEC to terminate before returning its status, intead of
returning when it changes status. If neither JOBSPEC nor PID
specifies an active child process of the shell, the return status
is 127.
the job are waited for. If no arguments are given, 'wait' waits
for all running background jobs and the last-executed process
substitution, if its process id is the same as $!, and the return
status is zero. If the '-n' option is supplied, 'wait' waits for a
single job to terminate and returns its exit status. Supplying the
'-f' option, when job control is enabled, forces 'wait' to wait for
each PID or JOBSPEC to terminate before returning its status,
intead of returning when it changes status. If neither JOBSPEC nor
PID specifies an active child process of the shell, the return
status is 127.
'disown'
disown [-ar] [-h] [JOBSPEC ... | PID ... ]
@@ -11012,7 +11013,7 @@ D.1 Index of Shell Builtin Commands
* dirs: Directory Stack Builtins.
(line 7)
* disown: Job Control Builtins.
(line 92)
(line 93)
* echo: Bash Builtins. (line 246)
* enable: Bash Builtins. (line 295)
* eval: Bourne Shell Builtins.
@@ -11061,7 +11062,7 @@ D.1 Index of Shell Builtin Commands
* shopt: The Shopt Builtin. (line 9)
* source: Bash Builtins. (line 563)
* suspend: Job Control Builtins.
(line 104)
(line 105)
* test: Bourne Shell Builtins.
(line 269)
* times: Bourne Shell Builtins.
@@ -11710,134 +11711,134 @@ D.5 Concept Index

Tag Table:
Node: Top887
Node: Introduction2797
Node: What is Bash?3013
Node: What is a shell?4127
Node: Definitions6665
Node: Basic Shell Features9616
Node: Shell Syntax10835
Node: Shell Operation11861
Node: Quoting13154
Node: Escape Character14454
Node: Single Quotes14939
Node: Double Quotes15287
Node: ANSI-C Quoting16565
Node: Locale Translation17824
Node: Comments18720
Node: Shell Commands19338
Node: Simple Commands20210
Node: Pipelines20841
Node: Lists23773
Node: Compound Commands25564
Node: Looping Constructs26576
Node: Conditional Constructs29071
Node: Command Grouping40239
Node: Coprocesses41718
Node: GNU Parallel43621
Node: Shell Functions47679
Node: Shell Parameters54762
Node: Positional Parameters59175
Node: Special Parameters60075
Node: Shell Expansions63829
Node: Brace Expansion65952
Node: Tilde Expansion68675
Node: Shell Parameter Expansion71292
Node: Command Substitution85725
Node: Arithmetic Expansion87080
Node: Process Substitution88012
Node: Word Splitting89132
Node: Filename Expansion91076
Node: Pattern Matching93606
Node: Quote Removal97592
Node: Redirections97887
Node: Executing Commands107445
Node: Simple Command Expansion108115
Node: Command Search and Execution110045
Node: Command Execution Environment112421
Node: Environment115405
Node: Exit Status117064
Node: Signals118734
Node: Shell Scripts120701
Node: Shell Builtin Commands123216
Node: Bourne Shell Builtins125254
Node: Bash Builtins146004
Node: Modifying Shell Behavior174929
Node: The Set Builtin175274
Node: The Shopt Builtin185687
Node: Special Builtins203357
Node: Shell Variables204336
Node: Bourne Shell Variables204773
Node: Bash Variables206877
Node: Bash Features237824
Node: Invoking Bash238723
Node: Bash Startup Files244736
Node: Interactive Shells249839
Node: What is an Interactive Shell?250249
Node: Is this Shell Interactive?250898
Node: Interactive Shell Behavior251713
Node: Bash Conditional Expressions255200
Node: Shell Arithmetic259777
Node: Aliases262594
Node: Arrays265214
Node: The Directory Stack270579
Node: Directory Stack Builtins271363
Node: Controlling the Prompt274331
Node: The Restricted Shell277252
Node: Bash POSIX Mode279734
Node: Job Control290667
Node: Job Control Basics291127
Node: Job Control Builtins296091
Node: Job Control Variables300831
Node: Command Line Editing301987
Node: Introduction and Notation303658
Node: Readline Interaction305281
Node: Readline Bare Essentials306472
Node: Readline Movement Commands308255
Node: Readline Killing Commands309215
Node: Readline Arguments311133
Node: Searching312177
Node: Readline Init File314363
Node: Readline Init File Syntax315622
Node: Conditional Init Constructs336061
Node: Sample Init File340257
Node: Bindable Readline Commands343374
Node: Commands For Moving344578
Node: Commands For History346427
Node: Commands For Text350722
Node: Commands For Killing354110
Node: Numeric Arguments356591
Node: Commands For Completion357730
Node: Keyboard Macros361921
Node: Miscellaneous Commands362608
Node: Readline vi Mode368561
Node: Programmable Completion369468
Node: Programmable Completion Builtins377248
Node: A Programmable Completion Example387943
Node: Using History Interactively393190
Node: Bash History Facilities393874
Node: Bash History Builtins396879
Node: History Interaction401410
Node: Event Designators405030
Node: Word Designators406249
Node: Modifiers407886
Node: Installing Bash409288
Node: Basic Installation410425
Node: Compilers and Options413683
Node: Compiling For Multiple Architectures414424
Node: Installation Names416117
Node: Specifying the System Type416935
Node: Sharing Defaults417651
Node: Operation Controls418324
Node: Optional Features419282
Node: Reporting Bugs429800
Node: Major Differences From The Bourne Shell430994
Node: GNU Free Documentation License447846
Node: Indexes473023
Node: Builtin Index473477
Node: Reserved Word Index480304
Node: Variable Index482752
Node: Function Index498576
Node: Concept Index511879
Node: Top889
Node: Introduction2801
Node: What is Bash?3017
Node: What is a shell?4131
Node: Definitions6669
Node: Basic Shell Features9620
Node: Shell Syntax10839
Node: Shell Operation11865
Node: Quoting13158
Node: Escape Character14458
Node: Single Quotes14943
Node: Double Quotes15291
Node: ANSI-C Quoting16569
Node: Locale Translation17828
Node: Comments18724
Node: Shell Commands19342
Node: Simple Commands20214
Node: Pipelines20845
Node: Lists23777
Node: Compound Commands25568
Node: Looping Constructs26580
Node: Conditional Constructs29075
Node: Command Grouping40243
Node: Coprocesses41722
Node: GNU Parallel43625
Node: Shell Functions47683
Node: Shell Parameters54766
Node: Positional Parameters59179
Node: Special Parameters60079
Node: Shell Expansions63833
Node: Brace Expansion65956
Node: Tilde Expansion68679
Node: Shell Parameter Expansion71296
Node: Command Substitution85729
Node: Arithmetic Expansion87084
Node: Process Substitution88016
Node: Word Splitting89136
Node: Filename Expansion91080
Node: Pattern Matching93610
Node: Quote Removal97596
Node: Redirections97891
Node: Executing Commands107449
Node: Simple Command Expansion108119
Node: Command Search and Execution110049
Node: Command Execution Environment112425
Node: Environment115409
Node: Exit Status117068
Node: Signals118738
Node: Shell Scripts120705
Node: Shell Builtin Commands123220
Node: Bourne Shell Builtins125258
Node: Bash Builtins146008
Node: Modifying Shell Behavior174933
Node: The Set Builtin175278
Node: The Shopt Builtin185691
Node: Special Builtins203361
Node: Shell Variables204340
Node: Bourne Shell Variables204777
Node: Bash Variables206881
Node: Bash Features237828
Node: Invoking Bash238727
Node: Bash Startup Files244740
Node: Interactive Shells249843
Node: What is an Interactive Shell?250253
Node: Is this Shell Interactive?250902
Node: Interactive Shell Behavior251717
Node: Bash Conditional Expressions255204
Node: Shell Arithmetic259781
Node: Aliases262598
Node: Arrays265218
Node: The Directory Stack270583
Node: Directory Stack Builtins271367
Node: Controlling the Prompt274335
Node: The Restricted Shell277256
Node: Bash POSIX Mode279738
Node: Job Control290671
Node: Job Control Basics291131
Node: Job Control Builtins296095
Node: Job Control Variables300913
Node: Command Line Editing302069
Node: Introduction and Notation303740
Node: Readline Interaction305363
Node: Readline Bare Essentials306554
Node: Readline Movement Commands308337
Node: Readline Killing Commands309297
Node: Readline Arguments311215
Node: Searching312259
Node: Readline Init File314445
Node: Readline Init File Syntax315704
Node: Conditional Init Constructs336143
Node: Sample Init File340339
Node: Bindable Readline Commands343456
Node: Commands For Moving344660
Node: Commands For History346509
Node: Commands For Text350804
Node: Commands For Killing354192
Node: Numeric Arguments356673
Node: Commands For Completion357812
Node: Keyboard Macros362003
Node: Miscellaneous Commands362690
Node: Readline vi Mode368643
Node: Programmable Completion369550
Node: Programmable Completion Builtins377330
Node: A Programmable Completion Example388025
Node: Using History Interactively393272
Node: Bash History Facilities393956
Node: Bash History Builtins396961
Node: History Interaction401492
Node: Event Designators405112
Node: Word Designators406331
Node: Modifiers407968
Node: Installing Bash409370
Node: Basic Installation410507
Node: Compilers and Options413765
Node: Compiling For Multiple Architectures414506
Node: Installation Names416199
Node: Specifying the System Type417017
Node: Sharing Defaults417733
Node: Operation Controls418406
Node: Optional Features419364
Node: Reporting Bugs429882
Node: Major Differences From The Bourne Shell431076
Node: GNU Free Documentation License447928
Node: Indexes473105
Node: Builtin Index473559
Node: Reserved Word Index480386
Node: Variable Index482834
Node: Function Index498658
Node: Concept Index511961

End Tag Table
+15 -13
View File
@@ -1,11 +1,11 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018/MacPorts 2018.47642_7) (preloaded format=pdfetex 2019.1.16) 20 MAY 2019 14:36
This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018/MacPorts 2018.47642_7) (preloaded format=pdfetex 2019.1.16) 12 JUN 2019 15:27
entering extended mode
restricted \write18 enabled.
file:line:error style messages enabled.
%&-line parsing enabled.
**\input /usr/homes/chet/src/bash/src/doc/bashref.texi
(/usr/homes/chet/src/bash/src/doc/bashref.texi
(/Users/chet/src/bash/src/doc/texinfo.tex
(/usr/homes/chet/src/bash/src/doc/texinfo.tex
Loading texinfo [version 2015-11-22.14]:
\outerhsize=\dimen16
\outervsize=\dimen17
@@ -161,14 +161,15 @@ This is `epsf.tex' v2.7.4 <14 February 2011>
texinfo.tex: doing @include of version.texi
(/Users/chet/src/bash/src/doc/version.texi) [1{/opt/local/var/db/texmf/fonts/ma
p/pdftex/updmap/pdftex.map}] [2] (/Users/chet/src/bash/src/doc/bashref.toc
[-1] [-2] [-3]) [-4] (/Users/chet/src/bash/src/doc/bashref.toc)
(/Users/chet/src/bash/src/doc/bashref.toc) Chapter 1
(/usr/homes/chet/src/bash/src/doc/version.texi) [1{/opt/local/var/db/texmf/font
s/map/pdftex/updmap/pdftex.map}] [2]
(/usr/homes/chet/src/bash/src/doc/bashref.toc [-1] [-2] [-3]) [-4]
(/usr/homes/chet/src/bash/src/doc/bashref.toc)
(/usr/homes/chet/src/bash/src/doc/bashref.toc) Chapter 1
\openout0 = `bashref.toc'.
(/Users/chet/src/bash/src/doc/bashref.aux)
(/usr/homes/chet/src/bash/src/doc/bashref.aux)
\openout1 = `bashref.aux'.
Chapter 2 [1] [2]
@@ -267,8 +268,9 @@ texinfo.tex: doing @include of hsuser.texi
[162] Appendix C [163]
texinfo.tex: doing @include of fdl.texi
(/Users/chet/src/bash/src/doc/fdl.texi [164] [165]
[166] [167] [168] [169] [170]) Appendix D [171] [172] [173] [174] [175]
(/usr/homes/chet/src/bash/src/doc/fdl.texi [164]
[165] [166] [167] [168] [169] [170]) Appendix D [171] [172] [173] [174]
[175]
Overfull \vbox (0.67252pt too high) has occurred while \output is active
\vbox(340.17245+0.0)x207.80492
.\glue(\topskip) 0.0
@@ -284,9 +286,9 @@ Overfull \vbox (0.67252pt too high) has occurred while \output is active
[176] [177] [178] [179] [180] )
Here is how much of TeX's memory you used:
4068 strings out of 497100
47087 string characters out of 6206794
136969 words of memory out of 5000000
4067 strings out of 497100
47114 string characters out of 6206794
136971 words of memory out of 5000000
4846 multiletter control sequences out of 15000+600000
34315 words of font info for 116 fonts, out of 8000000 for 9000
51 hyphenation exceptions out of 8191
@@ -308,7 +310,7 @@ s/type1/public/amsfonts/cm/cmtt12.pfb></opt/local/share/texmf-texlive/fonts/typ
e1/public/amsfonts/cm/cmtt9.pfb></opt/local/share/texmf-texlive/fonts/type1/pub
lic/cm-super/sfrm1095.pfb></opt/local/share/texmf-texlive/fonts/type1/public/cm
-super/sfrm1440.pfb>
Output written on bashref.pdf (186 pages, 755029 bytes).
Output written on bashref.pdf (186 pages, 755246 bytes).
PDF statistics:
2634 PDF objects out of 2984 (max. 8388607)
2402 compressed objects within 25 object streams
BIN
View File
Binary file not shown.
+488 -484
View File
File diff suppressed because it is too large Load Diff
+5 -2
View File
@@ -8117,8 +8117,11 @@ Wait until the child process specified by each process @sc{id} @var{pid}
or job specification @var{jobspec} exits and return the exit status of the
last command waited for.
If a job spec is given, all processes in the job are waited for.
If no arguments are given, all currently active child processes are
waited for, and the return status is zero.
If no arguments are given,
@code{wait} waits for all running background jobs and
the last-executed process substitution, if its process id is the same as
@var{$!},
and the return status is zero.
If the @option{-n} option is supplied, @code{wait} waits for a single job
to terminate and returns its exit status.
Supplying the @option{-f} option, when job control is enabled,
+107 -105
View File
@@ -1615,17 +1615,18 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
Return a status of 0 (true) or 1 (false) depending on the evalu-
ation of the conditional expression _e_x_p_r. Each operator and op-
erand must be a separate argument. Expressions are composed of
the primaries described above under CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS.
tteesstt does not accept any options, nor does it accept and ignore
an argument of ---- as signifying the end of options.
the primaries described in the bbaasshh manual page under CCOONNDDII--
TTIIOONNAALL EEXXPPRREESSSSIIOONNSS. tteesstt does not accept any options, nor does
it accept and ignore an argument of ---- as signifying the end of
options.
Expressions may be combined using the following operators,
Expressions may be combined using the following operators,
listed in decreasing order of precedence. The evaluation
depends on the number of arguments; see below. Operator prece-
depends on the number of arguments; see below. Operator prece-
dence is used when there are five or more arguments.
!! _e_x_p_r True if _e_x_p_r is false.
(( _e_x_p_r ))
Returns the value of _e_x_p_r. This may be used to override
Returns the value of _e_x_p_r. This may be used to override
the normal precedence of operators.
_e_x_p_r_1 -aa _e_x_p_r_2
True if both _e_x_p_r_1 and _e_x_p_r_2 are true.
@@ -1642,120 +1643,120 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
null.
2 arguments
If the first argument is !!, the expression is true if and
only if the second argument is null. If the first argu-
ment is one of the unary conditional operators listed
above under CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS, the expression is
only if the second argument is null. If the first argu-
ment is one of the unary conditional operators listed
above under CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS, the expression is
true if the unary test is true. If the first argument is
not a valid unary conditional operator, the expression is
false.
3 arguments
The following conditions are applied in the order listed.
If the second argument is one of the binary conditional
If the second argument is one of the binary conditional
operators listed above under CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS, the
result of the expression is the result of the binary test
using the first and third arguments as operands. The --aa
and --oo operators are considered binary operators when
there are three arguments. If the first argument is !!,
the value is the negation of the two-argument test using
using the first and third arguments as operands. The --aa
and --oo operators are considered binary operators when
there are three arguments. If the first argument is !!,
the value is the negation of the two-argument test using
the second and third arguments. If the first argument is
exactly (( and the third argument is exactly )), the result
is the one-argument test of the second argument. Other-
is the one-argument test of the second argument. Other-
wise, the expression is false.
4 arguments
If the first argument is !!, the result is the negation of
the three-argument expression composed of the remaining
the three-argument expression composed of the remaining
arguments. Otherwise, the expression is parsed and eval-
uated according to precedence using the rules listed
uated according to precedence using the rules listed
above.
5 or more arguments
The expression is parsed and evaluated according to
The expression is parsed and evaluated according to
precedence using the rules listed above.
When used with tteesstt or [[, the << and >> operators sort lexico-
When used with tteesstt or [[, the << and >> operators sort lexico-
graphically using ASCII ordering.
ttiimmeess Print the accumulated user and system times for the shell and
ttiimmeess Print the accumulated user and system times for the shell and
for processes run from the shell. The return status is 0.
ttrraapp [--llpp] [[_a_r_g] _s_i_g_s_p_e_c ...]
The command _a_r_g is to be read and executed when the shell
receives signal(s) _s_i_g_s_p_e_c. If _a_r_g is absent (and there is a
single _s_i_g_s_p_e_c) or --, each specified signal is reset to its
original disposition (the value it had upon entrance to the
shell). If _a_r_g is the null string the signal specified by each
_s_i_g_s_p_e_c is ignored by the shell and by the commands it invokes.
If _a_r_g is not present and --pp has been supplied, then the trap
commands associated with each _s_i_g_s_p_e_c are displayed. If no
arguments are supplied or if only --pp is given, ttrraapp prints the
list of commands associated with each signal. The --ll option
causes the shell to print a list of signal names and their cor-
responding numbers. Each _s_i_g_s_p_e_c is either a signal name
defined in <_s_i_g_n_a_l_._h>, or a signal number. Signal names are
The command _a_r_g is to be read and executed when the shell
receives signal(s) _s_i_g_s_p_e_c. If _a_r_g is absent (and there is a
single _s_i_g_s_p_e_c) or --, each specified signal is reset to its
original disposition (the value it had upon entrance to the
shell). If _a_r_g is the null string the signal specified by each
_s_i_g_s_p_e_c is ignored by the shell and by the commands it invokes.
If _a_r_g is not present and --pp has been supplied, then the trap
commands associated with each _s_i_g_s_p_e_c are displayed. If no
arguments are supplied or if only --pp is given, ttrraapp prints the
list of commands associated with each signal. The --ll option
causes the shell to print a list of signal names and their cor-
responding numbers. Each _s_i_g_s_p_e_c is either a signal name
defined in <_s_i_g_n_a_l_._h>, or a signal number. Signal names are
case insensitive and the SSIIGG prefix is optional.
If a _s_i_g_s_p_e_c is EEXXIITT (0) the command _a_r_g is executed on exit
from the shell. If a _s_i_g_s_p_e_c is DDEEBBUUGG, the command _a_r_g is exe-
cuted before every _s_i_m_p_l_e _c_o_m_m_a_n_d, _f_o_r command, _c_a_s_e command,
_s_e_l_e_c_t command, every arithmetic _f_o_r command, and before the
first command executes in a shell function (see SSHHEELLLL GGRRAAMMMMAARR
above). Refer to the description of the eexxttddeebbuugg option to the
If a _s_i_g_s_p_e_c is EEXXIITT (0) the command _a_r_g is executed on exit
from the shell. If a _s_i_g_s_p_e_c is DDEEBBUUGG, the command _a_r_g is exe-
cuted before every _s_i_m_p_l_e _c_o_m_m_a_n_d, _f_o_r command, _c_a_s_e command,
_s_e_l_e_c_t command, every arithmetic _f_o_r command, and before the
first command executes in a shell function (see SSHHEELLLL GGRRAAMMMMAARR
above). Refer to the description of the eexxttddeebbuugg option to the
sshhoopptt builtin for details of its effect on the DDEEBBUUGG trap. If a
_s_i_g_s_p_e_c is RREETTUURRNN, the command _a_r_g is executed each time a shell
function or a script executed with the .. or ssoouurrccee builtins fin-
ishes executing.
If a _s_i_g_s_p_e_c is EERRRR, the command _a_r_g is executed whenever a
If a _s_i_g_s_p_e_c is EERRRR, the command _a_r_g is executed whenever a
pipeline (which may consist of a single simple command), a list,
or a compound command returns a non-zero exit status, subject to
the following conditions. The EERRRR trap is not executed if the
the following conditions. The EERRRR trap is not executed if the
failed command is part of the command list immediately following
a wwhhiillee or uunnttiill keyword, part of the test in an _i_f statement,
a wwhhiillee or uunnttiill keyword, part of the test in an _i_f statement,
part of a command executed in a &&&& or |||| list except the command
following the final &&&& or ||||, any command in a pipeline but the
last, or if the command's return value is being inverted using
!!. These are the same conditions obeyed by the eerrrreexxiitt (--ee)
following the final &&&& or ||||, any command in a pipeline but the
last, or if the command's return value is being inverted using
!!. These are the same conditions obeyed by the eerrrreexxiitt (--ee)
option.
Signals ignored upon entry to the shell cannot be trapped or
reset. Trapped signals that are not being ignored are reset to
Signals ignored upon entry to the shell cannot be trapped or
reset. Trapped signals that are not being ignored are reset to
their original values in a subshell or subshell environment when
one is created. The return status is false if any _s_i_g_s_p_e_c is
one is created. The return status is false if any _s_i_g_s_p_e_c is
invalid; otherwise ttrraapp returns true.
ttyyppee [--aaffttppPP] _n_a_m_e [_n_a_m_e ...]
With no options, indicate how each _n_a_m_e would be interpreted if
With no options, indicate how each _n_a_m_e would be interpreted if
used as a command name. If the --tt option is used, ttyyppee prints a
string which is one of _a_l_i_a_s, _k_e_y_w_o_r_d, _f_u_n_c_t_i_o_n, _b_u_i_l_t_i_n, or
_f_i_l_e if _n_a_m_e is an alias, shell reserved word, function,
builtin, or disk file, respectively. If the _n_a_m_e is not found,
then nothing is printed, and an exit status of false is
returned. If the --pp option is used, ttyyppee either returns the
string which is one of _a_l_i_a_s, _k_e_y_w_o_r_d, _f_u_n_c_t_i_o_n, _b_u_i_l_t_i_n, or
_f_i_l_e if _n_a_m_e is an alias, shell reserved word, function,
builtin, or disk file, respectively. If the _n_a_m_e is not found,
then nothing is printed, and an exit status of false is
returned. If the --pp option is used, ttyyppee either returns the
name of the disk file that would be executed if _n_a_m_e were speci-
fied as a command name, or nothing if ``type -t name'' would not
return _f_i_l_e. The --PP option forces a PPAATTHH search for each _n_a_m_e,
return _f_i_l_e. The --PP option forces a PPAATTHH search for each _n_a_m_e,
even if ``type -t name'' would not return _f_i_l_e. If a command is
hashed, --pp and --PP print the hashed value, which is not necessar-
ily the file that appears first in PPAATTHH. If the --aa option is
used, ttyyppee prints all of the places that contain an executable
ily the file that appears first in PPAATTHH. If the --aa option is
used, ttyyppee prints all of the places that contain an executable
named _n_a_m_e. This includes aliases and functions, if and only if
the --pp option is not also used. The table of hashed commands is
not consulted when using --aa. The --ff option suppresses shell
not consulted when using --aa. The --ff option suppresses shell
function lookup, as with the ccoommmmaanndd builtin. ttyyppee returns true
if all of the arguments are found, false if any are not found.
uulliimmiitt [--HHSSaabbccddeeffiikkllmmnnppqqrrssttuuvvxxPPTT [_l_i_m_i_t]]
Provides control over the resources available to the shell and
to processes started by it, on systems that allow such control.
Provides control over the resources available to the shell and
to processes started by it, on systems that allow such control.
The --HH and --SS options specify that the hard or soft limit is set
for the given resource. A hard limit cannot be increased by a
non-root user once it is set; a soft limit may be increased up
to the value of the hard limit. If neither --HH nor --SS is speci-
for the given resource. A hard limit cannot be increased by a
non-root user once it is set; a soft limit may be increased up
to the value of the hard limit. If neither --HH nor --SS is speci-
fied, both the soft and hard limits are set. The value of _l_i_m_i_t
can be a number in the unit specified for the resource or one of
the special values hhaarrdd, ssoofftt, or uunnlliimmiitteedd, which stand for the
current hard limit, the current soft limit, and no limit,
respectively. If _l_i_m_i_t is omitted, the current value of the
soft limit of the resource is printed, unless the --HH option is
current hard limit, the current soft limit, and no limit,
respectively. If _l_i_m_i_t is omitted, the current value of the
soft limit of the resource is printed, unless the --HH option is
given. When more than one resource is specified, the limit name
and unit are printed before the value. Other options are inter-
preted as follows:
@@ -1764,12 +1765,12 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
--cc The maximum size of core files created
--dd The maximum size of a process's data segment
--ee The maximum scheduling priority ("nice")
--ff The maximum size of files written by the shell and its
--ff The maximum size of files written by the shell and its
children
--ii The maximum number of pending signals
--kk The maximum number of kqueues that may be allocated
--ll The maximum size that may be locked into memory
--mm The maximum resident set size (many systems do not honor
--mm The maximum resident set size (many systems do not honor
this limit)
--nn The maximum number of open file descriptors (most systems
do not allow this value to be set)
@@ -1778,53 +1779,53 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
--rr The maximum real-time scheduling priority
--ss The maximum stack size
--tt The maximum amount of cpu time in seconds
--uu The maximum number of processes available to a single
--uu The maximum number of processes available to a single
user
--vv The maximum amount of virtual memory available to the
--vv The maximum amount of virtual memory available to the
shell and, on some systems, to its children
--xx The maximum number of file locks
--PP The maximum number of pseudoterminals
--TT The maximum number of threads
If _l_i_m_i_t is given, and the --aa option is not used, _l_i_m_i_t is the
new value of the specified resource. If no option is given,
then --ff is assumed. Values are in 1024-byte increments, except
for --tt, which is in seconds; --pp, which is in units of 512-byte
blocks; --PP, --TT, --bb, --kk, --nn, and --uu, which are unscaled values;
If _l_i_m_i_t is given, and the --aa option is not used, _l_i_m_i_t is the
new value of the specified resource. If no option is given,
then --ff is assumed. Values are in 1024-byte increments, except
for --tt, which is in seconds; --pp, which is in units of 512-byte
blocks; --PP, --TT, --bb, --kk, --nn, and --uu, which are unscaled values;
and, when in posix mode, --cc and --ff, which are in 512-byte incre-
ments. The return status is 0 unless an invalid option or argu-
ment is supplied, or an error occurs while setting a new limit.
uummaasskk [--pp] [--SS] [_m_o_d_e]
The user file-creation mask is set to _m_o_d_e. If _m_o_d_e begins with
a digit, it is interpreted as an octal number; otherwise it is
interpreted as a symbolic mode mask similar to that accepted by
_c_h_m_o_d(1). If _m_o_d_e is omitted, the current value of the mask is
printed. The --SS option causes the mask to be printed in sym-
bolic form; the default output is an octal number. If the --pp
a digit, it is interpreted as an octal number; otherwise it is
interpreted as a symbolic mode mask similar to that accepted by
_c_h_m_o_d(1). If _m_o_d_e is omitted, the current value of the mask is
printed. The --SS option causes the mask to be printed in sym-
bolic form; the default output is an octal number. If the --pp
option is supplied, and _m_o_d_e is omitted, the output is in a form
that may be reused as input. The return status is 0 if the mode
was successfully changed or if no _m_o_d_e argument was supplied,
was successfully changed or if no _m_o_d_e argument was supplied,
and false otherwise.
uunnaalliiaass [-aa] [_n_a_m_e ...]
Remove each _n_a_m_e from the list of defined aliases. If --aa is
supplied, all alias definitions are removed. The return value
Remove each _n_a_m_e from the list of defined aliases. If --aa is
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] [-nn] [_n_a_m_e ...]
For each _n_a_m_e, remove the corresponding variable or function.
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 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--
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 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-
@@ -1832,17 +1833,18 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
wwaaiitt [--ffnn] [_i_d _._._.]
Wait for each specified child process and return its termination
status. Each _i_d 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 _i_d is not given, all currently active child pro-
cesses are waited for, and the return status is zero. If the --nn
option is supplied, wwaaiitt waits for a single job to terminate and
returns its exit status. Supplying the --ff option, when job con-
trol is enabled, forces wwaaiitt to wait for _i_d to terminate before
returning its status, instead of returning when it changes sta-
tus. If _i_d 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.
status. Each _i_d 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 _i_d is not given, wwaaiitt waits for all running
background jobs and the last-executed process substitution, if
its process id is the same as $$!!, and the return status is zero.
If the --nn option is supplied, wwaaiitt waits for a single job to
terminate and returns its exit status. Supplying the --ff option,
when job control is enabled, forces wwaaiitt to wait for _i_d to ter-
minate before returning its status, instead of returning when it
changes status. If _i_d 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
bash(1), sh(1)
+19 -18
View File
@@ -1,6 +1,6 @@
%!PS-Adobe-3.0
%%Creator: groff version 1.22.3
%%CreationDate: Mon May 20 14:36:20 2019
%%CreationDate: Wed Jun 12 15:26:50 2019
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%+ font Times-Italic
@@ -3104,23 +3104,24 @@ tion status.).8 F(Each)5.659 E F2(id)3.169 E F0 .659(may be a process)
3.929 F .009(ID or a job speci\214cation; if a job spec is gi)144 636 R
-.15(ve)-.25 G .008(n, all processes in that job').15 F 2.508(sp)-.55 G
.008(ipeline are w)-2.508 F .008(aited for)-.1 F 5.008(.I)-.55 G(f)
-5.008 E F2(id)144.01 648 Q F0 .521(is not gi)3.791 F -.15(ve)-.25 G
.521(n, all currently acti).15 F .821 -.15(ve c)-.25 H .521
(hild processes are w).15 F .521(aited for)-.1 F 3.021(,a)-.4 G .521
(nd the return status is zero.)-3.021 F(If)5.522 E(the)144 660 Q F1
<ad6e>2.948 E F0 .448(option is supplied,)2.948 F F1(wait)2.948 E F0 -.1
(wa)2.948 G .448(its for a single job to terminate and returns its e).1
F .447(xit status.)-.15 F(Sup-)5.447 E 1.023(plying the)144 672 R F1
<ad66>3.523 E F0 1.023(option, when job control is enabled, forces)3.523
F F1(wait)3.524 E F0 1.024(to w)3.524 F 1.024(ait for)-.1 F F2(id)3.524
E F0 1.024(to terminate before)3.524 F 1.835
(returning its status, instead of returning when it changes status.)144
684 R(If)6.835 E F2(id)4.345 E F0 1.835(speci\214es a non-e)5.105 F
(xistent)-.15 E 1.022(process or job, the return status is 127.)144 696
R 1.023(Otherwise, the return status is the e)6.023 F 1.023
(xit status of the last)-.15 F(process or job w)144 708 Q(aited for)-.1
E(.)-.55 E(GNU Bash 5.0)72 768 Q(2004 Apr 20)149.565 E(24)198.725 E 0 Cg
EP
-5.008 E F2(id)144.01 648 Q F0 .441(is not gi)3.711 F -.15(ve)-.25 G(n,)
.15 E F1(wait)2.941 E F0 -.1(wa)2.941 G .441
(its for all running background jobs and the last-e).1 F -.15(xe)-.15 G
.442(cuted process substitu-).15 F .598
(tion, if its process id is the same as)144 660 R F1($!)3.098 E F0 3.098
(,a)C .598(nd the return status is zero.)-3.098 F .597(If the)5.597 F F1
<ad6e>3.097 E F0 .597(option is supplied,)3.097 F F1(wait)144 672 Q F0
-.1(wa)3.056 G .556(its for a single job to terminate and returns its e)
.1 F .557(xit status.)-.15 F .557(Supplying the)5.557 F F1<ad66>3.057 E
F0 .557(option, when)3.057 F .346(job control is enabled, forces)144 684
R F1(wait)2.846 E F0 .346(to w)2.846 F .346(ait for)-.1 F F2(id)2.846 E
F0 .346(to terminate before returning its status, instead of)2.846 F
.599(returning when it changes status.)144 696 R(If)5.599 E F2(id)3.109
E F0 .599(speci\214es a non-e)3.869 F .6
(xistent process or job, the return status is)-.15 F 2.5
(127. Otherwise,)144 708 R(the return status is the e)2.5 E
(xit status of the last process or job w)-.15 E(aited for)-.1 E(.)-.55 E
(GNU Bash 5.0)72 768 Q(2004 Apr 20)149.565 E(24)198.725 E 0 Cg EP
%%Page: 25 25
%%BeginPageSetup
BP
+1 -1
View File
@@ -1,6 +1,6 @@
%!PS-Adobe-3.0
%%Creator: groff version 1.22.3
%%CreationDate: Mon May 20 14:36:20 2019
%%CreationDate: Wed Jun 12 15:26:50 2019
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%DocumentSuppliedResources: procset grops 1.22 3
+3 -3
View File
@@ -2,10 +2,10 @@
Copyright (C) 1988-2019 Free Software Foundation, Inc.
@end ignore
@set LASTCHANGE Mon May 20 10:45:55 EDT 2019
@set LASTCHANGE Thu Jun 13 15:43:41 EDT 2019
@set EDITION 5.0
@set VERSION 5.0
@set UPDATED 20 May 2019
@set UPDATED-MONTH May 2019
@set UPDATED 13 June 2019
@set UPDATED-MONTH June 2019
+5 -15
View File
@@ -2499,22 +2499,10 @@ wait_for_background_pids (ps)
}
#if defined (PROCESS_SUBSTITUTION)
if (last_procsub_child && last_procsub_child->pid != NO_PID)
if (last_procsub_child && last_procsub_child->pid != NO_PID && last_procsub_child->pid == last_asynchronous_pid)
r = wait_for (last_procsub_child->pid);
wait_procsubs ();
reap_procsubs ();
#if 0
/* We don't want to wait indefinitely if we have stopped children. */
if (any_stopped == 0)
{
/* Check whether or not we have any unreaped children. */
while ((r = wait_for (ANY_PID)) >= 0)
{
QUIT;
CHECK_WAIT_INTR;
}
}
#endif
#endif
/* POSIX.2 says the shell can discard the statuses of all completed jobs if
@@ -3707,8 +3695,10 @@ itrace("waitchld: waitpid returns %d block = %d children_exited = %d", pid, bloc
/* Only manipulate the list of process substitutions while SIGCHLD
is blocked. */
if ((ind = find_procsub_child (pid)) >= 0)
set_procsub_status (ind, pid, WSTATUS (status));
/* XXX - save in bgpids list? */
{
set_procsub_status (ind, pid, WSTATUS (status));
bgp_add (pid, WSTATUS (status));
}
#endif
/* It is not an error to have a child terminate that we did
+1
View File
@@ -544,6 +544,7 @@ rl_translate_keyseq (const char *seq, char *array, int *len)
{
i++; /* seq[i] == '-' */
/* XXX - obey convert-meta setting, convert to key seq */
/* XXX - doesn't yet handle \M-\C-n if convert-meta is on */
if (_rl_convert_meta_chars_to_ascii)
{
array[l++] = ESC; /* ESC is meta-prefix */
+11 -3
View File
@@ -1178,11 +1178,11 @@ Move back to the start of the current or previous word.
Words are composed of letters and digits.
@ifset BashFeatures
@item shell-forward-word ()
@item shell-forward-word (M-C-f)
Move forward to the end of the next word.
Words are delimited by non-quoted shell metacharacters.
@item shell-backward-word ()
@item shell-backward-word (M-C-b)
Move back to the start of the current or previous word.
Words are delimited by non-quoted shell metacharacters.
@end ifset
@@ -1432,7 +1432,7 @@ Kill the word behind point.
Word boundaries are the same as @code{backward-word}.
@ifset BashFeatures
@item shell-kill-word ()
@item shell-kill-word (M-C-d)
Kill from point to the end of the current word, or if between
words, to the end of the next word.
Word boundaries are the same as @code{shell-forward-word}.
@@ -1442,6 +1442,14 @@ Kill the word behind point.
Word boundaries are the same as @code{shell-backward-word}.
@end ifset
@item shell-transpose-words (M-C-t)
Drag the word before point past the word after point,
moving point past that word as well.
If the insertion point is at the end of the line, this transposes
the last two words on the line.
Word boundaries are the same as @code{shell-forward-word} and
@code{shell-backward-word}.
@item unix-word-rubout (C-w)
Kill the word behind point, using white space as a word boundary.
The killed text is saved on the kill-ring.
+1 -1
View File
@@ -633,7 +633,7 @@ unary_test (op, arg)
free (t);
return ret;
}
#if 0 /* TAG:bash-5.1 */
#if 0 /* TAG:bash-5.1 from Martijn Dekker */
else if (legal_number (arg, &r)) /* -v n == is $n set? */
{
char *t;
+17 -1
View File
@@ -1,6 +1,6 @@
/* variables.c -- Functions for hacking shell variables. */
/* Copyright (C) 1987-2018 Free Software Foundation, Inc.
/* Copyright (C) 1987-2019 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -229,6 +229,10 @@ static SHELL_VAR *get_epochrealtime __P((SHELL_VAR *));
static SHELL_VAR *get_bashpid __P((SHELL_VAR *));
static SHELL_VAR *get_bash_argv0 __P((SHELL_VAR *));
static SHELL_VAR *assign_bash_argv0 __P((SHELL_VAR *, char *, arrayind_t, char *));
static void set_argv0 __P((void));
#if defined (HISTORY)
static SHELL_VAR *get_histcmd __P((SHELL_VAR *));
#endif
@@ -554,6 +558,8 @@ initialize_shell_variables (env, privmode)
set_ppid ();
set_argv0 ();
/* Initialize the `getopts' stuff. */
temp_var = bind_variable ("OPTIND", "1", 0);
VSETATTR (temp_var, att_integer);
@@ -1695,6 +1701,16 @@ assign_bash_argv0 (var, value, unused, key)
shell_name = static_shell_name;
return var;
}
static void
set_argv0 ()
{
SHELL_VAR *v;
v = find_variable ("BASH_ARGV0");
if (v && imported_p (v))
assign_bash_argv0 (v, value_cell (v), 0, 0);
}
static SHELL_VAR *
get_bash_command (var)