mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-06-28 16:09:51 +02:00
Bash-5.2-rc1 release
This commit is contained in:
@@ -1,3 +1,55 @@
|
||||
This document details the changes between this version, bash-5.2-rc1, and
|
||||
the previous version, bash-5.2-beta.
|
||||
|
||||
1. Changes to Bash
|
||||
|
||||
a. Changes to `wait -p' and how it sets the variable name in the presence of
|
||||
valid and invalid PID arguments.
|
||||
|
||||
b. Fixed a bug that caused compgen to dump core if the completion engine was
|
||||
not initialized.
|
||||
|
||||
c. Fixed a memory leak in the variable name programmable completion code.
|
||||
|
||||
d. Here-documents and here-strings use tempfiles if the shell compatibility
|
||||
level is 50 or lower.
|
||||
|
||||
e. Non-interactive shells exit on a syntax error encountered while parsing a
|
||||
command substitution.
|
||||
|
||||
f. Fixed a bug with inherited parser state while parsing a command substitution.
|
||||
|
||||
g. Fixed a bug that caused the shell not to check for terminating signals
|
||||
after executing the command_string supplied with `-c' and before executing
|
||||
the exit trap.
|
||||
|
||||
h. Changes to avoid a make race condition while generating builtins.c.
|
||||
|
||||
i. Make it explicit that BASH_REMATCH is always a global variable, and that
|
||||
local copies are (currently) ignored.
|
||||
|
||||
j. Fixed a bug that caused an ambiguous redirection (>&word) to be printed
|
||||
incorrectly (>&word) if no file descriptor was supplied.
|
||||
|
||||
2. Changes to Readline
|
||||
|
||||
a. Fixed a bug that caused rl_eof_found to be set prematurely while reading a
|
||||
multi-character key sequence in callback mode.
|
||||
|
||||
3. New Features in Bash
|
||||
|
||||
a. In posix mode, the `printf' builtin checks for the `L' length modifier and
|
||||
uses long double for floating point conversion specifiers if it's present,
|
||||
double otherwise.
|
||||
|
||||
b. The `globbing' completion code now takes the `globstar' option into account.
|
||||
|
||||
c. `suspend -f' now forces the shell to suspend even if job control is not
|
||||
currently enabled.
|
||||
|
||||
4. New Features in Readline
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
This document details the changes between this version, bash-5.2-beta, and
|
||||
the previous version, bash-5.2-alpha.
|
||||
|
||||
@@ -291,10 +343,10 @@ h. The `unset' builtin now attempts to treat arguments as array subscripts
|
||||
i. There is a default value for $BASH_LOADABLES_PATH in config-top.h.
|
||||
|
||||
j. Associative array assignment and certain instances of referencing (e.g.,
|
||||
`test -v' now allow `@' and `*' to be used as keys.
|
||||
`test -v') now allow `@' and `*' to be used as keys.
|
||||
|
||||
k. Bash attempts to expand indexed array subscripts only once when executing
|
||||
shell constructs and word expansions.
|
||||
k. Bash attempts to expand indexed and associative array subscripts only
|
||||
once when executing shell constructs and word expansions.
|
||||
|
||||
l. The `unset' builtin allows a subscript of `@' or `*' to unset a key with
|
||||
that value for associative arrays instead of unsetting the entire array
|
||||
|
||||
@@ -550,6 +550,9 @@ compat50 (set using BASH_COMPAT)
|
||||
printed an informational message to that effect even when writing
|
||||
output in a format that can be reused as input (-l). Bash-5.1
|
||||
suppresses that message if -l is supplied
|
||||
- Bash-5.1 and later use pipes for here-documents and here-strings if
|
||||
they are smaller than the pipe capacity. If the shell compatibility
|
||||
level is set to 50 or lower, it reverts to using temporary files.
|
||||
|
||||
compat51 (set using BASH_COMPAT)
|
||||
- The `unset' builtin will unset the array a given an argument like
|
||||
@@ -560,6 +563,10 @@ compat51 (set using BASH_COMPAT)
|
||||
for statement can be expanded more than once
|
||||
- expressions used as arguments to arithmetic operators in the [[
|
||||
conditional command can be expanded more than once
|
||||
- indexed and associative array subscripts used as arguments to the
|
||||
operators in the [[ conditional command (e.g., `[[ -v') can be
|
||||
expanded more than once. Bash-5.2 behaves as if the
|
||||
`assoc_expand_once' option were enabled.
|
||||
- the expressions in substring parameter brace expansion can be
|
||||
expanded more than once
|
||||
- the expressions in the $(( ... )) word expansion can be expanded
|
||||
|
||||
+238
-1
@@ -2870,7 +2870,7 @@ subst.c
|
||||
- parameter_brace_expand: when expanding an indirect variable, extend
|
||||
the special case for array[@] and array[*] (set -u/no positional
|
||||
parameters, obeying the baroque quoting rules) to the value of the
|
||||
indirection. Report amd fix from konsolebox <konsolebox@gmail.com>
|
||||
indirection. Report and fix from konsolebox <konsolebox@gmail.com>
|
||||
|
||||
12/31
|
||||
-----
|
||||
@@ -3449,3 +3449,240 @@ lib/readline/{complete,histfile,histsearch,isearch,terminal}.c
|
||||
---
|
||||
configure.ac
|
||||
- bumped version to bash-5.2-beta
|
||||
|
||||
[bash-5.2-beta frozen]
|
||||
|
||||
4/8
|
||||
---
|
||||
lib/readline/input.c
|
||||
- _rl_orig_sigset: need extern declaration if HAVE_SELECT is defined.
|
||||
From https://savannah.gnu.org/support/?110634
|
||||
|
||||
examples/loadables/seq.c
|
||||
- PRIdMAX: redefine if PRI_MACROS_BROKEN is defined.
|
||||
From https://savannah.gnu.org/support/index.php?110635
|
||||
|
||||
4/11
|
||||
----
|
||||
configure.ac
|
||||
- BASH_FUNC_STRTOIMAX: replace strtoimax if the system doesn't provide
|
||||
a declaration in a standard header file. Uses new m4/strtoimax.m4.
|
||||
From https://savannah.gnu.org/support/index.php?110633
|
||||
|
||||
builtins/printf.def
|
||||
- getdouble: new function, parses string into `double' using strtod
|
||||
- printf_builtin: check for the `L' length modifier and use long
|
||||
doubles for the floating point conversion specifiers. If it's not
|
||||
supplied, use `double' when in posix mode (as posix specifies) and
|
||||
long double (if it's available, double if not) in default mode.
|
||||
From a report from Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
4/12
|
||||
----
|
||||
lib/sh/oslib.c
|
||||
- bzero: update function signature to modern BSD version
|
||||
|
||||
4/14
|
||||
----
|
||||
lib/sh/oslib.c
|
||||
- bcopy, gethostname, mkfifo: update function signatures to modern
|
||||
versions
|
||||
|
||||
4/15
|
||||
----
|
||||
jobs.c,nojobs.c
|
||||
- wait_for_single_pid: if the pid or job argument is invalid -- isn't
|
||||
a child of this shell -- return 257, which is out of the range of
|
||||
valid 8-bit status values
|
||||
|
||||
execute_cmd.c
|
||||
- execute_pipeline: if wait_for_single_pid returns > 256, set it to
|
||||
127 (invalid process)
|
||||
|
||||
jobs.c
|
||||
- wait_for_background_pids: if wait_for_single_pid returns > 256, set
|
||||
the status we return in PS to 127 (what it was before)
|
||||
|
||||
builtins/wait.def
|
||||
- wait_builtin: if wait_for_single_pid returns > 256, treat it as an
|
||||
error and set pstat.pid to NO_PID
|
||||
- wait_builtin: if -p supplied, and we get to the end of the argument
|
||||
list with PSTAT.PID != NO_PID (which we assume means that the return
|
||||
value is set from PSTAT.STATUS), set the variable name to PSTAT.PID.
|
||||
From a report by Robert Elz <kre@munnari.OZ.AU>
|
||||
- wait_builtin: for compatibility with the netbsd sh, leave the variable
|
||||
name specified with `-p' unset if there are no PID arguments.
|
||||
From a report by Robert Elz <kre@munnari.OZ.AU>
|
||||
|
||||
4/17
|
||||
----
|
||||
parse.y
|
||||
- xparse_dolparen: if (flags & SX_NOLONGJMP), don't call
|
||||
jump_to_top_level() on errors
|
||||
|
||||
bashline.c
|
||||
- bash_quote_filename: don't call quote_word_break_chars() unless we
|
||||
have word break chars initialized. Fixes bug reported by
|
||||
Sam James <sam@gentoo.org>
|
||||
|
||||
4/18
|
||||
----
|
||||
pcomplete.c
|
||||
- gen_globpat_matches: call glob_filename with the GX_GLOBSTAR flag if
|
||||
the `globstar' shell option is enabled. From a report by
|
||||
Steve <bash@lonetwin.net>
|
||||
|
||||
lib/malloc/malloc.c
|
||||
- internal_free: remove the GLIBC21 code (!)
|
||||
- internal_free: make the code that tests against memtop and calls
|
||||
lesscore depend on USE_LESSCORE being defined, which it is by
|
||||
default
|
||||
|
||||
lib/malloc/imalloc.h
|
||||
- USE_LESSCORE: define
|
||||
|
||||
parse.y,shell.h
|
||||
- token_buffer_size and its corresponding saved value in the shell's
|
||||
parser state are now size_t instead of int
|
||||
|
||||
stringlib.c
|
||||
- strsub,strcreplace: use size_t instead of int for local length and
|
||||
indexing variables
|
||||
|
||||
lib/sh/zmapfd.c
|
||||
- zmapfd: use size_t instead of int for local length and indexing
|
||||
variables
|
||||
|
||||
lib/sh/zgetline.c
|
||||
- zgetline: use size_t instead of int for local length and indexing
|
||||
variables
|
||||
|
||||
4/20
|
||||
----
|
||||
pcomplete.c
|
||||
- init_itemlist_from_varlist: free VLIST after assigning it from
|
||||
*SVFUNC and after we get the variable names and values out of it.
|
||||
Report from Robert E. Griffith <bobg@junga.com>
|
||||
|
||||
4/25
|
||||
----
|
||||
redir.c
|
||||
- here_document_to_fd: if the shell compatibility level is bash-5.0 or
|
||||
earlier, use tempfiles for all here-documents and here-strings. From
|
||||
a bug-bash discussion started by Sam Liddicott <sam@liddicott.com>
|
||||
|
||||
4/26
|
||||
----
|
||||
parse.y
|
||||
- parse_comsub: non-interactive shells exit on a syntax error while
|
||||
parsing the command substitution
|
||||
- parse_comsub: unset additional PARSER_STATE flags before calling
|
||||
yyparse(). Inspired by https://bugs.gentoo.org/837203; unsetting
|
||||
PST_COMPASSIGN is the fix for that bug
|
||||
- parse_string_to_word_list: use save_parser_state/restore_parser_state
|
||||
instead of saving pieces of the shell state in individual variables
|
||||
- parse_compound_assignment: use save_parser_state/restore_parser_state
|
||||
instead of saving pieces of the shell state in individual variables
|
||||
- parse_compound_assignment: unset additional PARSER_STATE flags before
|
||||
calling read_token(); set esacs_needed_count and expecting_in_token
|
||||
to 0 like in parse_comsub() since read_token can use them
|
||||
|
||||
4/27
|
||||
----
|
||||
lib/sh/strvis.c
|
||||
- sh_charvis: changes to handle being compiled without multibyte support
|
||||
|
||||
4/29
|
||||
----
|
||||
lib/readline/callback.c
|
||||
- rl_callback_read_char: don't set rl_eof_found unless eof is > 0,
|
||||
since it can be -3 if we need to read more input in a multi-key
|
||||
sequence. Report from Andrew Burgess <aburgess@redhat.com>
|
||||
|
||||
examples/loadables/Makefile.sample.in
|
||||
- new file, containing the rules to build the example shared object
|
||||
- includes Makefile.inc from wherever it's installed. Suggested by
|
||||
Robert E. Griffith <bobg@junga.com>
|
||||
|
||||
examples/loadables/Makefile.inc.in
|
||||
- remove rules that create the example shared object
|
||||
|
||||
4/30
|
||||
----
|
||||
builtins/evalstring.c
|
||||
- parse_and_execute: check for terminating signals before returning,
|
||||
after any longjmp, to improve responsiveness and fix the -c code
|
||||
path before running any exit trap. Report from
|
||||
Emanuele Torre <torreemanuele6@gmail.com>
|
||||
|
||||
5/17
|
||||
----
|
||||
builtins/suspend.def
|
||||
- suspend_builtin: the -f option now forces a suspend even if job
|
||||
control is not enabled. Inspired by a discussion with
|
||||
Robert Elz <kre@munnari.OZ.AU>
|
||||
|
||||
doc/{bash.1,bashref.texi}
|
||||
- suspend: updated description to include expanded -f behavior
|
||||
|
||||
5/25
|
||||
----
|
||||
builtins/mkbuiltins.c
|
||||
- -includefile: new argument, specifies extern filename to insert
|
||||
into the #include statement in the structfile (builtins.c) and
|
||||
the filename in the comment in the extern file (builtext.h).
|
||||
From Alexander Kanavin <alex.kanavin@gmail.com> via
|
||||
https://savannah.gnu.org/patch/?10210
|
||||
|
||||
builtins/Makefile.in
|
||||
- builtins.c: change call to mkbuiltins to add -includefile option
|
||||
- builtins.c: change recipe to run all the commands in the same shell
|
||||
invocation
|
||||
- builtins.c: change recipe to specify new filenames in the call to
|
||||
mkbuiltins and move them onto builtins.c/builtext.h if the new ones
|
||||
are different; make the new filenames use the current make recipe
|
||||
shell pid in the filename ($$RECPID).
|
||||
Inspired by Alexander Kanavin <alex.kanavin@gmail.com> via
|
||||
https://savannah.gnu.org/patch/?10210
|
||||
|
||||
6/2
|
||||
---
|
||||
builtins/common.c
|
||||
- builtin_find_indexed_array: new function, factored common code out
|
||||
of mapfile and read builtins to find an in-scope indexed array or
|
||||
create one
|
||||
|
||||
builtins/common.h
|
||||
- builtin_find_indexed_array: extern declaration
|
||||
|
||||
builtins/{mapfile,read}.def
|
||||
- change callers to use builtin_find_indexed_array
|
||||
|
||||
variables.c
|
||||
- unbind_global_variable, unbind_global_variable_noref: new functions
|
||||
that remove variables from the global_variables table
|
||||
|
||||
lib/sh/shmatch.c
|
||||
- sh_regmatch: use unbind_global_variable_noref to make sure we act on
|
||||
the copy of BASH_REMATCH in the global scope all the time, ignoring
|
||||
any local variables that might exist. Tentative fix for memory leak
|
||||
report from Emanuele Torre <torreemanuele6@gmail.com>
|
||||
|
||||
doc/{bash.1,bashref.texi}
|
||||
- BASH_REMATCH: add caveat about making it a local variable
|
||||
|
||||
6/6
|
||||
---
|
||||
print_cmd.c
|
||||
- print_redirection: if the redirectee for r_duplicating_output_word
|
||||
(r_duplicating_input_word) is 1 (0), don't print it; only print a
|
||||
non-default file descriptor number
|
||||
- print_redirection_list: remove the code that tries to temporarily
|
||||
translate a >&word redirection to >&word now that we won't print a
|
||||
non-default file descriptor number. Fixes issue with `declare -f' and
|
||||
function export reported by Namikaze Minato <lloydsensei@gmail.com>
|
||||
|
||||
6/13
|
||||
----
|
||||
configure.ac
|
||||
- bumped version to bash-5.2-rc1
|
||||
|
||||
@@ -206,7 +206,7 @@ builtins/umask.def f
|
||||
builtins/wait.def f
|
||||
builtins/psize.c f
|
||||
builtins/psize.sh f
|
||||
builtins/inlib.def f
|
||||
#builtins/inlib.def f
|
||||
builtins/bashgetopt.c f
|
||||
builtins/common.h f
|
||||
builtins/bashgetopt.h f
|
||||
@@ -484,6 +484,7 @@ lib/tilde/Makefile.in f
|
||||
lib/tilde/tilde.c f
|
||||
lib/tilde/tilde.h f
|
||||
lib/tilde/shell.c f
|
||||
m4/strtoimax.m4 f
|
||||
m4/stat-time.m4 f
|
||||
m4/timespec.m4 f
|
||||
m4/codeset.m4 f
|
||||
@@ -716,6 +717,7 @@ examples/loadables/template.c f
|
||||
examples/loadables/loadables.h f
|
||||
examples/loadables/Makefile.in f
|
||||
examples/loadables/Makefile.inc.in f
|
||||
examples/loadables/Makefile.sample.in f
|
||||
examples/loadables/necho.c f
|
||||
examples/loadables/hello.c f
|
||||
examples/loadables/asort.c f
|
||||
@@ -825,6 +827,7 @@ examples/functions/which f
|
||||
#examples/scripts/adventure.sh f
|
||||
#examples/scripts/bash-hexdump.sh f
|
||||
#examples/scripts/bcsh.sh f
|
||||
examples/scripts/bcalc f
|
||||
examples/scripts/cat.sh f
|
||||
examples/scripts/center f
|
||||
#examples/scripts/dd-ex.sh f
|
||||
@@ -1012,6 +1015,7 @@ tests/comsub-posix1.sub f
|
||||
tests/comsub-posix2.sub f
|
||||
tests/comsub-posix3.sub f
|
||||
tests/comsub-posix5.sub f
|
||||
tests/comsub-posix6.sub f
|
||||
tests/cond.tests f
|
||||
tests/cond.right f
|
||||
tests/cond-regexp1.sub f
|
||||
|
||||
+3
-2
@@ -468,7 +468,8 @@ INSTALLED_HEADERS = shell.h bashjmp.h command.h syntax.h general.h error.h \
|
||||
make_cmd.h subst.h sig.h externs.h builtins.h \
|
||||
bashtypes.h xmalloc.h config-top.h config-bot.h \
|
||||
bashintl.h bashansi.h bashjmp.h alias.h hashlib.h \
|
||||
conftypes.h unwind_prot.h jobs.h siglist.h
|
||||
conftypes.h unwind_prot.h jobs.h siglist.h \
|
||||
execute_cmd.h
|
||||
INSTALLED_BUILTINS_HEADERS = bashgetopt.h common.h getopt.h
|
||||
INSTALLED_INCFILES = posixstat.h ansi_stdlib.h filecntl.h posixdir.h \
|
||||
memalloc.h stdc.h posixjmp.h posixwait.h posixtime.h systimes.h \
|
||||
@@ -570,7 +571,7 @@ CREATED_MAKEFILES = Makefile builtins/Makefile doc/Makefile \
|
||||
lib/readline/Makefile lib/glob/Makefile \
|
||||
lib/sh/Makefile lib/tilde/Makefile lib/malloc/Makefile \
|
||||
lib/termcap/Makefile examples/loadables/Makefile \
|
||||
examples/loadables/Makefile.inc \
|
||||
examples/loadables/Makefile.inc examples/loadables/Makefile.sample \
|
||||
examples/loadables/perl/Makefile support/Makefile \
|
||||
lib/intl/Makefile po/Makefile po/Makefile.in
|
||||
CREATED_HEADERS = signames.h config.h pathnames.h version.h y.tab.h \
|
||||
|
||||
@@ -100,6 +100,15 @@ bb. Array references using `@' and `*' that are the value of nameref variables
|
||||
cc. There is a new bindable readline command name:
|
||||
`vi-edit-and-execute-command'.
|
||||
|
||||
dd. In posix mode, the `printf' builtin checks for the `L' length modifier and
|
||||
uses long double for floating point conversion specifiers if it's present,
|
||||
double otherwise.
|
||||
|
||||
ee. The `globbing' completion code now takes the `globstar' option into account.
|
||||
|
||||
ff. `suspend -f' now forces the shell to suspend even if job control is not
|
||||
currently enabled.
|
||||
|
||||
2. New Features in Readline
|
||||
|
||||
a. There is now an HS_HISTORY_VERSION containing the version number of the
|
||||
|
||||
@@ -240,7 +240,12 @@ The following list is what's changed when 'POSIX mode' is in effect:
|
||||
'read', the trap handler executes and 'read' returns an exit status
|
||||
greater than 128.
|
||||
|
||||
60. Bash removes an exited background process's status from the list
|
||||
60. The 'printf' builting uses 'double' (via 'strtod') to convert
|
||||
arguments corresponding to floating point conversion specifiers,
|
||||
instead of 'long double' if it's available. The 'L' length
|
||||
modifier forces 'printf' to use 'long double' if it's available.
|
||||
|
||||
61. Bash removes an exited background process's status from the list
|
||||
of such statuses after the 'wait' builtin is used to obtain it.
|
||||
|
||||
There is other POSIX behavior that Bash does not implement by default
|
||||
|
||||
+1
-1
@@ -4341,7 +4341,7 @@ bash_quote_filename (s, rtype, qcp)
|
||||
/* We may need to quote additional characters: those that readline treats
|
||||
as word breaks that are not quoted by backslash_quote. */
|
||||
/* XXX - test complete_fullquote here? */
|
||||
if (rtext && cs == COMPLETE_BSQUOTE)
|
||||
if (rtext && cs == COMPLETE_BSQUOTE && rl_completer_word_break_characters)
|
||||
{
|
||||
mtext = quote_word_break_chars (rtext);
|
||||
free (rtext);
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ extern int unbind_unix_command PARAMS((char *));
|
||||
|
||||
extern char **bash_default_completion PARAMS((const char *, int, int, int, int));
|
||||
|
||||
void set_directory_hook PARAMS((void));
|
||||
extern void set_directory_hook PARAMS((void));
|
||||
|
||||
/* Used by programmable completion code. */
|
||||
extern char *command_word_completion_function PARAMS((const char *, int));
|
||||
|
||||
+17
-15
@@ -1,6 +1,6 @@
|
||||
# This Makefile for building libbuiltins.a is in -*- text -*- for Emacs.
|
||||
#
|
||||
# Copyright (C) 1996-2021 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1996-2022 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
|
||||
@@ -186,20 +186,22 @@ gen-helpfiles: tmpbuiltins.o gen-helpfiles.o
|
||||
$(CC_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ gen-helpfiles.o tmpbuiltins.o $(LIBS_FOR_BUILD)
|
||||
|
||||
builtext.h builtins.c: $(MKBUILTINS) $(DEFSRC)
|
||||
@-if test -f builtins.c; then mv -f builtins.c old-builtins.c; fi
|
||||
@-if test -f builtext.h; then mv -f builtext.h old-builtext.h; fi
|
||||
./$(MKBUILTINS) -externfile builtext.h -structfile builtins.c \
|
||||
-noproduction $(DIRECTDEFINE) $(HELPDIRDEFINE) $(HELPSTRINGS) $(DEFSRC)
|
||||
@-if cmp -s old-builtext.h builtext.h 2>/dev/null; then \
|
||||
mv old-builtext.h builtext.h; \
|
||||
else \
|
||||
$(RM) old-builtext.h; \
|
||||
fi
|
||||
@-if cmp -s old-builtins.c builtins.c 2>/dev/null; then \
|
||||
mv old-builtins.c builtins.c; \
|
||||
else \
|
||||
$(RM) old-builtins.c; \
|
||||
fi
|
||||
@RECPID=$$$$ ; \
|
||||
NEW_BUILTEXT=builtext-$$RECPID.h NEW_BUILTINS=builtins-$$RECPID.c ; \
|
||||
./$(MKBUILTINS) -externfile $$NEW_BUILTEXT \
|
||||
-includefile builtext.h \
|
||||
-structfile $$NEW_BUILTINS \
|
||||
-noproduction $(DIRECTDEFINE) $(HELPDIRDEFINE) $(HELPSTRINGS) $(DEFSRC) ; \
|
||||
if cmp -s $$NEW_BUILTEXT builtext.h 2>/dev/null; then \
|
||||
$(RM) $$NEW_BUILTEXT; \
|
||||
else \
|
||||
mv $$NEW_BUILTEXT builtext.h; \
|
||||
fi ; \
|
||||
if cmp -s $$NEW_BUILTINS builtins.c 2>/dev/null; then \
|
||||
$(RM) $$NEW_BUILTINS ; \
|
||||
else \
|
||||
mv $$NEW_BUILTINS builtins.c; \
|
||||
fi
|
||||
|
||||
helpdoc: gen-helpfiles
|
||||
./gen-helpfiles ${HELPDIRDEFINE}
|
||||
|
||||
@@ -1024,6 +1024,40 @@ builtin_bind_var_to_int (name, val, flags)
|
||||
return v;
|
||||
}
|
||||
|
||||
#if defined (ARRAY_VARS)
|
||||
SHELL_VAR *
|
||||
builtin_find_indexed_array (array_name, flags)
|
||||
char *array_name;
|
||||
int flags;
|
||||
{
|
||||
SHELL_VAR *entry;
|
||||
|
||||
if ((flags & 2) && legal_identifier (array_name) == 0)
|
||||
{
|
||||
sh_invalidid (array_name);
|
||||
return (SHELL_VAR *)NULL;
|
||||
}
|
||||
|
||||
entry = find_or_make_array_variable (array_name, 1);
|
||||
/* With flags argument & 1, find_or_make_array_variable checks for readonly
|
||||
and noassign variables and prints error messages. */
|
||||
if (entry == 0)
|
||||
return entry;
|
||||
else if (array_p (entry) == 0)
|
||||
{
|
||||
builtin_error (_("%s: not an indexed array"), array_name);
|
||||
return (SHELL_VAR *)NULL;
|
||||
}
|
||||
else if (invisible_p (entry))
|
||||
VUNSETATTR (entry, att_invisible); /* no longer invisible */
|
||||
|
||||
if (flags & 1)
|
||||
array_flush (array_cell (entry));
|
||||
|
||||
return entry;
|
||||
}
|
||||
#endif /* ARRAY_VARS */
|
||||
|
||||
/* Like check_unbind_variable, but for use by builtins (only matters for
|
||||
error messages). */
|
||||
int
|
||||
|
||||
@@ -235,6 +235,7 @@ extern SHELL_VAR *builtin_bind_variable PARAMS((char *, char *, int));
|
||||
extern SHELL_VAR *builtin_bind_var_to_int PARAMS((char *, intmax_t, int));
|
||||
extern int builtin_unbind_variable PARAMS((const char *));
|
||||
|
||||
extern SHELL_VAR *builtin_find_indexed_array PARAMS((char *, int));
|
||||
extern int builtin_arrayref_flags PARAMS((WORD_DESC *, int));
|
||||
|
||||
/* variables from evalfile.c */
|
||||
|
||||
@@ -426,7 +426,7 @@ parse_and_execute (string, from_file, flags)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (parse_command () == 0)
|
||||
{
|
||||
if ((flags & SEVAL_PARSEONLY) || (interactive_shell == 0 && read_but_dont_execute))
|
||||
@@ -561,6 +561,8 @@ parse_and_execute (string, from_file, flags)
|
||||
throw_to_top_level ();
|
||||
}
|
||||
|
||||
CHECK_TERMSIG;
|
||||
|
||||
if (should_jump_to_top_level)
|
||||
jump_to_top_level (code);
|
||||
|
||||
@@ -594,7 +596,6 @@ parse_string (string, from_file, flags, cmdp, endp)
|
||||
sigprocmask (SIG_BLOCK, (sigset_t *)NULL, (sigset_t *)&ps_sigmask);
|
||||
#endif
|
||||
|
||||
/*itrace("parse_string: `%s'", string);*/
|
||||
/* Reset the line number if the caller wants us to. If we don't reset the
|
||||
line number, we have to subtract one, because we will add one just
|
||||
before executing the next command (resetting the line number sets it to
|
||||
|
||||
+3
-18
@@ -167,24 +167,9 @@ mapfile (fd, line_count_goal, origin, nskip, callback_quantum, callback, array_n
|
||||
/* The following check should be done before reading any lines. Doing it
|
||||
here allows us to call bind_array_element instead of bind_array_variable
|
||||
and skip the variable lookup on every call. */
|
||||
entry = find_or_make_array_variable (array_name, 1);
|
||||
if (entry == 0 || readonly_p (entry) || noassign_p (entry))
|
||||
{
|
||||
if (entry && readonly_p (entry))
|
||||
err_readonly (array_name);
|
||||
|
||||
return (EXECUTION_FAILURE);
|
||||
}
|
||||
else if (array_p (entry) == 0)
|
||||
{
|
||||
builtin_error (_("%s: not an indexed array"), array_name);
|
||||
return (EXECUTION_FAILURE);
|
||||
}
|
||||
else if (invisible_p (entry))
|
||||
VUNSETATTR (entry, att_invisible); /* no longer invisible */
|
||||
|
||||
if (flags & MAPF_CLEARARRAY)
|
||||
array_flush (array_cell (entry));
|
||||
entry = builtin_find_indexed_array (array_name, flags & MAPF_CLEARARRAY);
|
||||
if (entry == 0)
|
||||
return EXECUTION_FAILURE;
|
||||
|
||||
#ifndef __CYGWIN__
|
||||
/* If the delimiter is a newline, turn on unbuffered reads for pipes
|
||||
|
||||
+15
-4
@@ -1,7 +1,7 @@
|
||||
/* mkbuiltins.c - Create builtins.c, builtext.h, and builtdoc.c from
|
||||
a single source file called builtins.def. */
|
||||
|
||||
/* Copyright (C) 1987-2021 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1987-2022 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -113,6 +113,12 @@ char *struct_filename = (char *)NULL;
|
||||
/* The name of the external declaration file. */
|
||||
char *extern_filename = (char *)NULL;
|
||||
|
||||
/* The name of the include file to write into the structure file, if it's
|
||||
different from extern_filename. */
|
||||
char *include_filename = (char *)NULL;
|
||||
|
||||
/* The name of the include file to put into the generated struct filename. */
|
||||
|
||||
/* Here is a structure for manipulating arrays of data. */
|
||||
typedef struct {
|
||||
int size; /* Number of slots allocated to array. */
|
||||
@@ -241,6 +247,8 @@ main (argc, argv)
|
||||
|
||||
if (strcmp (arg, "-externfile") == 0)
|
||||
extern_filename = argv[arg_index++];
|
||||
else if (strcmp (arg, "-includefile") == 0)
|
||||
include_filename = argv[arg_index++];
|
||||
else if (strcmp (arg, "-structfile") == 0)
|
||||
struct_filename = argv[arg_index++];
|
||||
else if (strcmp (arg, "-noproduction") == 0)
|
||||
@@ -284,6 +292,9 @@ main (argc, argv)
|
||||
}
|
||||
}
|
||||
|
||||
if (include_filename == 0)
|
||||
include_filename = extern_filename;
|
||||
|
||||
/* If there are no files to process, just quit now. */
|
||||
if (arg_index == argc)
|
||||
exit (0);
|
||||
@@ -1125,7 +1136,7 @@ char *structfile_header[] = {
|
||||
"/* This file is manufactured by ./mkbuiltins, and should not be",
|
||||
" edited by hand. See the source to mkbuiltins for details. */",
|
||||
"",
|
||||
"/* Copyright (C) 1987-2021 Free Software Foundation, Inc.",
|
||||
"/* Copyright (C) 1987-2022 Free Software Foundation, Inc.",
|
||||
"",
|
||||
" This file is part of GNU Bash, the Bourne Again SHell.",
|
||||
"",
|
||||
@@ -1187,7 +1198,7 @@ write_file_headers (structfile, externfile)
|
||||
fprintf (structfile, "%s\n", structfile_header[i]);
|
||||
|
||||
fprintf (structfile, "#include \"%s\"\n",
|
||||
extern_filename ? extern_filename : "builtext.h");
|
||||
include_filename ? include_filename : "builtext.h");
|
||||
|
||||
fprintf (structfile, "#include \"bashintl.h\"\n");
|
||||
|
||||
@@ -1197,7 +1208,7 @@ write_file_headers (structfile, externfile)
|
||||
if (externfile)
|
||||
fprintf (externfile,
|
||||
"/* %s - The list of builtins found in libbuiltins.a. */\n",
|
||||
extern_filename ? extern_filename : "builtext.h");
|
||||
include_filename ? include_filename : "builtext.h");
|
||||
}
|
||||
|
||||
/* Write out any necessary closing information for
|
||||
|
||||
+53
-6
@@ -215,13 +215,16 @@ static uintmax_t getuintmax PARAMS((void));
|
||||
|
||||
#if defined (HAVE_LONG_DOUBLE) && HAVE_DECL_STRTOLD && !defined(STRTOLD_BROKEN)
|
||||
typedef long double floatmax_t;
|
||||
# define USE_LONG_DOUBLE 1
|
||||
# define FLOATMAX_CONV "L"
|
||||
# define strtofltmax strtold
|
||||
#else
|
||||
typedef double floatmax_t;
|
||||
# define USE_LONG_DOUBLE 0
|
||||
# define FLOATMAX_CONV ""
|
||||
# define strtofltmax strtod
|
||||
#endif
|
||||
static double getdouble PARAMS((void));
|
||||
static floatmax_t getfloatmax PARAMS((void));
|
||||
|
||||
static intmax_t asciicode PARAMS((void));
|
||||
@@ -247,7 +250,7 @@ printf_builtin (list)
|
||||
WORD_LIST *list;
|
||||
{
|
||||
int ch, fieldwidth, precision;
|
||||
int have_fieldwidth, have_precision;
|
||||
int have_fieldwidth, have_precision, use_Lmod;
|
||||
char convch, thisch, nextch, *format, *modstart, *precstart, *fmt, *start;
|
||||
#if defined (HANDLE_MULTIBYTE)
|
||||
char mbch[25]; /* 25 > MB_LEN_MAX, plus can handle 4-byte UTF-8 and large Unicode characters*/
|
||||
@@ -422,8 +425,12 @@ printf_builtin (list)
|
||||
|
||||
/* skip possible format modifiers */
|
||||
modstart = fmt;
|
||||
use_Lmod = 0;
|
||||
while (*fmt && strchr (LENMODS, *fmt))
|
||||
fmt++;
|
||||
{
|
||||
use_Lmod |= USE_LONG_DOUBLE && *fmt == 'L';
|
||||
fmt++;
|
||||
}
|
||||
|
||||
if (*fmt == 0)
|
||||
{
|
||||
@@ -694,11 +701,24 @@ printf_builtin (list)
|
||||
#endif
|
||||
{
|
||||
char *f;
|
||||
floatmax_t p;
|
||||
|
||||
p = getfloatmax ();
|
||||
f = mklong (start, FLOATMAX_CONV, sizeof(FLOATMAX_CONV) - 1);
|
||||
PF (f, p);
|
||||
if (use_Lmod || posixly_correct == 0)
|
||||
{
|
||||
floatmax_t p;
|
||||
|
||||
p = getfloatmax ();
|
||||
f = mklong (start, "L", 1);
|
||||
PF (f, p);
|
||||
}
|
||||
else /* posixly_correct */
|
||||
{
|
||||
double p;
|
||||
|
||||
p = getdouble ();
|
||||
f = mklong (start, "", 0);
|
||||
PF (f, p);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1248,6 +1268,33 @@ getuintmax ()
|
||||
return (ret);
|
||||
}
|
||||
|
||||
static double
|
||||
getdouble ()
|
||||
{
|
||||
double ret;
|
||||
char *ep;
|
||||
|
||||
if (garglist == 0)
|
||||
return (0);
|
||||
|
||||
if (garglist->word->word[0] == '\'' || garglist->word->word[0] == '"')
|
||||
return asciicode ();
|
||||
|
||||
errno = 0;
|
||||
ret = strtod (garglist->word->word, &ep);
|
||||
|
||||
if (*ep)
|
||||
{
|
||||
sh_invalidnum (garglist->word->word);
|
||||
conversion_error = 1;
|
||||
}
|
||||
else if (errno == ERANGE)
|
||||
printf_erange (garglist->word->word);
|
||||
|
||||
garglist = garglist->next;
|
||||
return (ret);
|
||||
}
|
||||
|
||||
static floatmax_t
|
||||
getfloatmax ()
|
||||
{
|
||||
|
||||
+3
-17
@@ -869,28 +869,14 @@ assign_vars:
|
||||
an assign them to `arrayname' in turn. */
|
||||
if (arrayname)
|
||||
{
|
||||
if (legal_identifier (arrayname) == 0)
|
||||
{
|
||||
sh_invalidid (arrayname);
|
||||
free (input_string);
|
||||
return (EXECUTION_FAILURE);
|
||||
}
|
||||
|
||||
var = find_or_make_array_variable (arrayname, 1);
|
||||
/* pass 1 for flags arg to clear the existing array + 2 to check for a
|
||||
valid identifier. */
|
||||
var = builtin_find_indexed_array (arrayname, 3);
|
||||
if (var == 0)
|
||||
{
|
||||
free (input_string);
|
||||
return EXECUTION_FAILURE; /* readonly or noassign */
|
||||
}
|
||||
if (assoc_p (var))
|
||||
{
|
||||
builtin_error (_("%s: cannot convert associative to indexed array"), arrayname);
|
||||
free (input_string);
|
||||
return EXECUTION_FAILURE; /* existing associative array */
|
||||
}
|
||||
else if (invisible_p (var))
|
||||
VUNSETATTR (var, att_invisible);
|
||||
array_flush (array_cell (var));
|
||||
|
||||
alist = list_string (input_string, ifs_chars, 0);
|
||||
if (alist)
|
||||
|
||||
+11
-10
@@ -1,7 +1,7 @@
|
||||
This file is suspend.def, from which is created suspend.c.
|
||||
It implements the builtin "suspend" in Bash.
|
||||
|
||||
Copyright (C) 1987-2020 Free Software Foundation, Inc.
|
||||
Copyright (C) 1987-2022 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -27,10 +27,12 @@ $SHORT_DOC suspend [-f]
|
||||
Suspend shell execution.
|
||||
|
||||
Suspend the execution of this shell until it receives a SIGCONT signal.
|
||||
Unless forced, login shells cannot be suspended.
|
||||
Unless forced, login shells and shells without job control cannot be
|
||||
suspended.
|
||||
|
||||
Options:
|
||||
-f force the suspend, even if the shell is a login shell
|
||||
-f force the suspend, even if the shell is a login shell or job
|
||||
control is not enabled.
|
||||
|
||||
Exit Status:
|
||||
Returns success unless job control is not enabled or an error occurs.
|
||||
@@ -96,16 +98,15 @@ suspend_builtin (list)
|
||||
}
|
||||
|
||||
list = loptend;
|
||||
|
||||
if (job_control == 0)
|
||||
{
|
||||
sh_nojobs (_("cannot suspend"));
|
||||
return (EXECUTION_FAILURE);
|
||||
}
|
||||
no_args (list);
|
||||
|
||||
if (force == 0)
|
||||
{
|
||||
no_args (list);
|
||||
if (job_control == 0)
|
||||
{
|
||||
sh_nojobs (_("cannot suspend"));
|
||||
return (EXECUTION_FAILURE);
|
||||
}
|
||||
|
||||
if (login_shell)
|
||||
{
|
||||
|
||||
+13
-3
@@ -1,4 +1,4 @@
|
||||
This file is wait.def, from which is created wait.c.
|
||||
'This file is wait.def, from which is created wait.c.
|
||||
It implements the builtin "wait" in Bash.
|
||||
|
||||
Copyright (C) 1987-2021 Free Software Foundation, Inc.
|
||||
@@ -236,8 +236,12 @@ wait_builtin (list)
|
||||
if (list == 0)
|
||||
{
|
||||
opt = wait_for_background_pids (&pstat);
|
||||
#if 0
|
||||
/* Compatibility with NetBSD sh: don't set VNAME since it doesn't
|
||||
correspond to the return status. */
|
||||
if (vname && opt)
|
||||
builtin_bind_var_to_int (vname, pstat.pid, bindflags);
|
||||
#endif
|
||||
WAIT_RETURN (EXECUTION_SUCCESS);
|
||||
}
|
||||
|
||||
@@ -255,8 +259,11 @@ wait_builtin (list)
|
||||
{
|
||||
pid = (pid_t)pid_value;
|
||||
status = wait_for_single_pid (pid, wflags|JWAIT_PERROR);
|
||||
pstat.pid = pid;
|
||||
pstat.status = status;
|
||||
/* status > 256 means pid error */
|
||||
pstat.pid = (status > 256) ? NO_PID : pid;
|
||||
pstat.status = (status > 256) ? 127 : status;
|
||||
if (status > 256)
|
||||
status = 127;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -313,6 +320,9 @@ wait_builtin (list)
|
||||
list = list->next;
|
||||
}
|
||||
|
||||
if (vname && pstat.pid != NO_PID)
|
||||
builtin_bind_var_to_int (vname, pstat.pid, bindflags);
|
||||
|
||||
WAIT_RETURN (status);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#! /bin/sh
|
||||
# From configure.ac for Bash 5.2, version 5.039.
|
||||
# From configure.ac for Bash 5.2, version 5.041.
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.71 for bash 5.2-beta.
|
||||
# Generated by GNU Autoconf 2.71 for bash 5.2-rc1.
|
||||
#
|
||||
# Report bugs to <bug-bash@gnu.org>.
|
||||
#
|
||||
@@ -612,8 +612,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='bash'
|
||||
PACKAGE_TARNAME='bash'
|
||||
PACKAGE_VERSION='5.2-beta'
|
||||
PACKAGE_STRING='bash 5.2-beta'
|
||||
PACKAGE_VERSION='5.2-rc1'
|
||||
PACKAGE_STRING='bash 5.2-rc1'
|
||||
PACKAGE_BUGREPORT='bug-bash@gnu.org'
|
||||
PACKAGE_URL=''
|
||||
|
||||
@@ -1467,7 +1467,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures bash 5.2-beta to adapt to many kinds of systems.
|
||||
\`configure' configures bash 5.2-rc1 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1533,7 +1533,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of bash 5.2-beta:";;
|
||||
short | recursive ) echo "Configuration of bash 5.2-rc1:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1740,7 +1740,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
bash configure 5.2-beta
|
||||
bash configure 5.2-rc1
|
||||
generated by GNU Autoconf 2.71
|
||||
|
||||
Copyright (C) 2021 Free Software Foundation, Inc.
|
||||
@@ -2397,7 +2397,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by bash $as_me 5.2-beta, which was
|
||||
It was created by bash $as_me 5.2-rc1, which was
|
||||
generated by GNU Autoconf 2.71. Invocation command line was
|
||||
|
||||
$ $0$ac_configure_args_raw
|
||||
@@ -3176,7 +3176,7 @@ ac_config_headers="$ac_config_headers config.h"
|
||||
|
||||
|
||||
BASHVERS=5.2
|
||||
RELSTATUS=beta
|
||||
RELSTATUS=rc1
|
||||
|
||||
case "$RELSTATUS" in
|
||||
alp*|bet*|dev*|rc*|releng*|maint*) DEBUG='-DDEBUG' MALLOC_DEBUG='-DMALLOC_DEBUG' ;;
|
||||
@@ -6659,6 +6659,11 @@ fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# codeset.m4 serial 5 (gettext-0.18.2)
|
||||
|
||||
|
||||
@@ -15503,19 +15508,6 @@ else $as_nop
|
||||
;;
|
||||
esac
|
||||
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "strtoimax" "ac_cv_func_strtoimax"
|
||||
if test "x$ac_cv_func_strtoimax" = xyes
|
||||
then :
|
||||
printf "%s\n" "#define HAVE_STRTOIMAX 1" >>confdefs.h
|
||||
|
||||
else $as_nop
|
||||
case " $LIBOBJS " in
|
||||
*" strtoimax.$ac_objext "* ) ;;
|
||||
*) LIBOBJS="$LIBOBJS strtoimax.$ac_objext"
|
||||
;;
|
||||
esac
|
||||
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "strtoumax" "ac_cv_func_strtoumax"
|
||||
if test "x$ac_cv_func_strtoumax" = xyes
|
||||
@@ -15711,15 +15703,6 @@ printf "%s\n" "$bash_cv_strtold_broken" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
ac_fn_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
|
||||
if test "x$ac_cv_have_decl_strtoimax" = xyes
|
||||
then :
|
||||
ac_have_decl=1
|
||||
else $as_nop
|
||||
ac_have_decl=0
|
||||
fi
|
||||
printf "%s\n" "#define HAVE_DECL_STRTOIMAX $ac_have_decl" >>confdefs.h
|
||||
|
||||
ac_fn_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
|
||||
if test "x$ac_cv_have_decl_strtol" = xyes
|
||||
then :
|
||||
@@ -20417,6 +20400,60 @@ printf "%s\n" "#define HAVE_VSNPRINTF 0" >>confdefs.h
|
||||
|
||||
|
||||
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for usable strtoimax" >&5
|
||||
printf %s "checking for usable strtoimax... " >&6; }
|
||||
if test ${bash_cv_func_strtoimax+y}
|
||||
then :
|
||||
printf %s "(cached) " >&6
|
||||
else $as_nop
|
||||
|
||||
HAVE_STRTOIMAX=0 HAVE_DECL_STRTOIMAX=0
|
||||
|
||||
ac_fn_c_check_func "$LINENO" "strtoimax" "ac_cv_func_strtoimax"
|
||||
if test "x$ac_cv_func_strtoimax" = xyes
|
||||
then :
|
||||
printf "%s\n" "#define HAVE_STRTOIMAX 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
ac_fn_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
|
||||
if test "x$ac_cv_have_decl_strtoimax" = xyes
|
||||
then :
|
||||
ac_have_decl=1
|
||||
else $as_nop
|
||||
ac_have_decl=0
|
||||
fi
|
||||
printf "%s\n" "#define HAVE_DECL_STRTOIMAX $ac_have_decl" >>confdefs.h
|
||||
|
||||
|
||||
if test "$ac_cv_func_strtoimax" = "yes" ; then
|
||||
HAVE_STRTOIMAX=1
|
||||
fi
|
||||
if test "$ac_cv_have_decl_strtoimax" = "yes" ; then
|
||||
HAVE_DECL_STRTOIMAX=1
|
||||
fi
|
||||
|
||||
if test "$HAVE_STRTOIMAX" = 0 || test "$HAVE_DECL_STRTOIMAX" = 0 ; then
|
||||
bash_cv_func_strtoimax=no REPLACE_STRTOIMAX=1
|
||||
else
|
||||
bash_cv_func_strtoimax=yes
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_strtoimax" >&5
|
||||
printf "%s\n" "$bash_cv_func_strtoimax" >&6; }
|
||||
if test $bash_cv_func_strtoimax = yes; then
|
||||
case " $LIBOBJS " in
|
||||
*" strtoimax.$ac_objext "* ) ;;
|
||||
*) LIBOBJS="$LIBOBJS strtoimax.$ac_objext"
|
||||
;;
|
||||
esac
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if test "$ac_cv_func_putenv" = "yes"; then
|
||||
|
||||
|
||||
@@ -21826,7 +21863,7 @@ fi
|
||||
#AC_SUBST(ALLOCA_SOURCE)
|
||||
#AC_SUBST(ALLOCA_OBJECT)
|
||||
|
||||
ac_config_files="$ac_config_files Makefile builtins/Makefile lib/readline/Makefile lib/glob/Makefile lib/intl/Makefile lib/malloc/Makefile lib/sh/Makefile lib/termcap/Makefile lib/tilde/Makefile doc/Makefile support/Makefile po/Makefile.in examples/loadables/Makefile examples/loadables/Makefile.inc examples/loadables/perl/Makefile support/bash.pc support/bashbug.sh"
|
||||
ac_config_files="$ac_config_files Makefile builtins/Makefile lib/readline/Makefile lib/glob/Makefile lib/intl/Makefile lib/malloc/Makefile lib/sh/Makefile lib/termcap/Makefile lib/tilde/Makefile doc/Makefile support/Makefile po/Makefile.in examples/loadables/Makefile examples/loadables/Makefile.inc examples/loadables/Makefile.sample examples/loadables/perl/Makefile support/bash.pc support/bashbug.sh"
|
||||
|
||||
|
||||
ac_config_commands="$ac_config_commands stamp-h"
|
||||
@@ -22332,7 +22369,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by bash $as_me 5.2-beta, which was
|
||||
This file was extended by bash $as_me 5.2-rc1, which was
|
||||
generated by GNU Autoconf 2.71. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -22400,7 +22437,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config='$ac_cs_config_escaped'
|
||||
ac_cs_version="\\
|
||||
bash config.status 5.2-beta
|
||||
bash config.status 5.2-rc1
|
||||
configured by $0, generated by GNU Autoconf 2.71,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
@@ -22549,6 +22586,7 @@ do
|
||||
"po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
|
||||
"examples/loadables/Makefile") CONFIG_FILES="$CONFIG_FILES examples/loadables/Makefile" ;;
|
||||
"examples/loadables/Makefile.inc") CONFIG_FILES="$CONFIG_FILES examples/loadables/Makefile.inc" ;;
|
||||
"examples/loadables/Makefile.sample") CONFIG_FILES="$CONFIG_FILES examples/loadables/Makefile.sample" ;;
|
||||
"examples/loadables/perl/Makefile") CONFIG_FILES="$CONFIG_FILES examples/loadables/perl/Makefile" ;;
|
||||
"support/bash.pc") CONFIG_FILES="$CONFIG_FILES support/bash.pc" ;;
|
||||
"support/bashbug.sh") CONFIG_FILES="$CONFIG_FILES support/bashbug.sh" ;;
|
||||
|
||||
+8
-4
@@ -21,10 +21,10 @@ dnl Process this file with autoconf to produce a configure script.
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
AC_REVISION([for Bash 5.2, version 5.039])dnl
|
||||
AC_REVISION([for Bash 5.2, version 5.041])dnl
|
||||
|
||||
define(bashvers, 5.2)
|
||||
define(relstatus, beta)
|
||||
define(relstatus, rc1)
|
||||
|
||||
AC_INIT([bash], bashvers-relstatus, [bug-bash@gnu.org])
|
||||
|
||||
@@ -713,6 +713,8 @@ AC_SUBST(SIZE)
|
||||
m4_include([m4/stat-time.m4])
|
||||
m4_include([m4/timespec.m4])
|
||||
|
||||
m4_include([m4/strtoimax.m4])
|
||||
|
||||
dnl include files for gettext
|
||||
|
||||
m4_include([m4/codeset.m4])
|
||||
@@ -859,7 +861,7 @@ AC_CHECK_FUNCS(arc4random)
|
||||
|
||||
AC_REPLACE_FUNCS(getcwd memset)
|
||||
AC_REPLACE_FUNCS(strcasecmp strcasestr strerror strftime strnlen strpbrk strstr)
|
||||
AC_REPLACE_FUNCS(strtod strtol strtoul strtoll strtoull strtoimax strtoumax)
|
||||
AC_REPLACE_FUNCS(strtod strtol strtoul strtoll strtoull strtoumax)
|
||||
AC_REPLACE_FUNCS(dprintf)
|
||||
AC_REPLACE_FUNCS(strchrnul)
|
||||
AC_REPLACE_FUNCS(strdup)
|
||||
@@ -894,7 +896,6 @@ AC_CHECK_DECLS([strtold], [
|
||||
fi
|
||||
])
|
||||
|
||||
AC_CHECK_DECLS(strtoimax)
|
||||
AC_CHECK_DECLS(strtol)
|
||||
AC_CHECK_DECLS(strtoll)
|
||||
AC_CHECK_DECLS(strtoul)
|
||||
@@ -1068,6 +1069,8 @@ BASH_FUNC_STRCOLL
|
||||
BASH_FUNC_SNPRINTF
|
||||
BASH_FUNC_VSNPRINTF
|
||||
|
||||
BASH_FUNC_STRTOIMAX
|
||||
|
||||
dnl If putenv or unsetenv is not present, set the right define so the
|
||||
dnl prototype and declaration in lib/sh/getenv.c will be standard-conformant
|
||||
|
||||
@@ -1313,6 +1316,7 @@ AC_CONFIG_FILES([Makefile builtins/Makefile lib/readline/Makefile \
|
||||
lib/tilde/Makefile doc/Makefile support/Makefile \
|
||||
po/Makefile.in examples/loadables/Makefile \
|
||||
examples/loadables/Makefile.inc \
|
||||
examples/loadables/Makefile.sample \
|
||||
examples/loadables/perl/Makefile \
|
||||
support/bash.pc support/bashbug.sh])
|
||||
|
||||
|
||||
+1760
-1756
File diff suppressed because it is too large
Load Diff
+26
-11
@@ -5,12 +5,12 @@
|
||||
.\" Case Western Reserve University
|
||||
.\" chet.ramey@case.edu
|
||||
.\"
|
||||
.\" Last Change: Fri Mar 11 10:16:50 EST 2022
|
||||
.\" Last Change: Fri Jun 3 10:47:26 EDT 2022
|
||||
.\"
|
||||
.\" bash_builtins, strip all but Built-Ins section
|
||||
.if \n(zZ=1 .ig zZ
|
||||
.if \n(zY=1 .ig zY
|
||||
.TH BASH 1 "2022 March 11" "GNU Bash 5.2"
|
||||
.TH BASH 1 "2022 June 3" "GNU Bash 5.2"
|
||||
.\"
|
||||
.\" There's some problem with having a `@'
|
||||
.\" in a tagged paragraph with the BSD man macros.
|
||||
@@ -420,12 +420,14 @@ No other startup files are read.
|
||||
.PP
|
||||
.B Bash
|
||||
attempts to determine when it is being run with its standard input
|
||||
connected to a network connection, as when executed by the remote shell
|
||||
daemon, usually \fIrshd\fP, or the secure shell daemon \fIsshd\fP.
|
||||
connected to a network connection, as when executed by
|
||||
the historical remote shell daemon, usually \fIrshd\fP,
|
||||
or the secure shell daemon \fIsshd\fP.
|
||||
If
|
||||
.B bash
|
||||
determines it is being run in this fashion, it reads and executes
|
||||
commands from \fI~/.bashrc\fP, if that file exists and is readable.
|
||||
determines it is being run non-interactively in this fashion,
|
||||
it reads and executes commands from \fI~/.bashrc\fP,
|
||||
if that file exists and is readable.
|
||||
It will not do this if invoked as \fBsh\fP.
|
||||
The
|
||||
.B \-\-norc
|
||||
@@ -589,7 +591,9 @@ The
|
||||
variable may be used to specify the format of
|
||||
the time information.
|
||||
.PP
|
||||
Each command in a pipeline is executed in a \fIsubshell\fP, which is a
|
||||
Each command in a multi-command pipeline,
|
||||
where pipes are created,
|
||||
is executed in a \fIsubshell\fP, which is a
|
||||
separate process.
|
||||
See
|
||||
.SM
|
||||
@@ -787,6 +791,11 @@ indices. The element of
|
||||
.B BASH_REMATCH
|
||||
with index \fIn\fP is the portion of the
|
||||
string matching the \fIn\fPth parenthesized subexpression.
|
||||
Bash sets
|
||||
.SM
|
||||
.B BASH_REMATCH
|
||||
in the global scope; declaring it as a local variable will lead to
|
||||
unexpected results.
|
||||
.if t .sp 0.5
|
||||
.if n .sp 1
|
||||
Expressions may be combined using the following operators, listed
|
||||
@@ -3874,7 +3883,9 @@ is a
|
||||
or a
|
||||
.B ^
|
||||
then any character not enclosed is matched.
|
||||
The sorting order of characters in range expressions is determined by
|
||||
The sorting order of characters in range expressions,
|
||||
and the characters included in the range,
|
||||
are determined by
|
||||
the current locale and the values of the
|
||||
.SM
|
||||
.B LC_COLLATE
|
||||
@@ -10638,12 +10649,16 @@ by default.
|
||||
Suspend the execution of this shell until it receives a
|
||||
.SM
|
||||
.B SIGCONT
|
||||
signal. A login shell cannot be suspended; the
|
||||
signal. A login shell,
|
||||
or a shell without job control enabled,
|
||||
cannot be suspended; the
|
||||
.B \-f
|
||||
option can be used to override this and force the suspension.
|
||||
The return status is 0 unless the shell is a login shell and
|
||||
The return status is 0 unless the shell is a login shell
|
||||
or job control is not enabled
|
||||
and
|
||||
.B \-f
|
||||
is not supplied, or if job control is not enabled.
|
||||
is not supplied.
|
||||
.TP
|
||||
\fBtest\fP \fIexpr\fP
|
||||
.PD 0
|
||||
|
||||
+29
-13
@@ -3,7 +3,7 @@
|
||||
</HEAD>
|
||||
<BODY><TABLE WIDTH=100%>
|
||||
<TR>
|
||||
<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2022 March 11<TH ALIGN=RIGHT width=33%>BASH(1)
|
||||
<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2022 June 3<TH ALIGN=RIGHT width=33%>BASH(1)
|
||||
</TR>
|
||||
</TABLE>
|
||||
<BR><A HREF="#index">Index</A>
|
||||
@@ -556,13 +556,15 @@ No other startup files are read.
|
||||
<B>Bash</B>
|
||||
|
||||
attempts to determine when it is being run with its standard input
|
||||
connected to a network connection, as when executed by the remote shell
|
||||
daemon, usually <I>rshd</I>, or the secure shell daemon <I>sshd</I>.
|
||||
connected to a network connection, as when executed by
|
||||
the historical remote shell daemon, usually <I>rshd</I>,
|
||||
or the secure shell daemon <I>sshd</I>.
|
||||
If
|
||||
<B>bash</B>
|
||||
|
||||
determines it is being run in this fashion, it reads and executes
|
||||
commands from <A HREF="file:~/.bashrc"><I>~/.bashrc</I></A>, if that file exists and is readable.
|
||||
determines it is being run non-interactively in this fashion,
|
||||
it reads and executes commands from <A HREF="file:~/.bashrc"><I>~/.bashrc</I></A>,
|
||||
if that file exists and is readable.
|
||||
It will not do this if invoked as <B>sh</B>.
|
||||
The
|
||||
<B>--norc</B>
|
||||
@@ -787,7 +789,9 @@ variable may be used to specify the format of
|
||||
the time information.
|
||||
<P>
|
||||
|
||||
Each command in a pipeline is executed in a <I>subshell</I>, which is a
|
||||
Each command in a multi-command pipeline,
|
||||
where pipes are created,
|
||||
is executed in a <I>subshell</I>, which is a
|
||||
separate process.
|
||||
See
|
||||
<FONT SIZE=-1><B>COMMAND EXECUTION ENVIRONMENT</B></FONT>
|
||||
@@ -1024,6 +1028,12 @@ indices. The element of
|
||||
</FONT>
|
||||
with index <I>n</I> is the portion of the
|
||||
string matching the <I>n</I>th parenthesized subexpression.
|
||||
Bash sets
|
||||
<FONT SIZE=-1><B>BASH_REMATCH</B>
|
||||
|
||||
</FONT>
|
||||
in the global scope; declaring it as a local variable will lead to
|
||||
unexpected results.
|
||||
<P>
|
||||
|
||||
|
||||
@@ -4856,7 +4866,9 @@ or a
|
||||
<B>^</B>
|
||||
|
||||
then any character not enclosed is matched.
|
||||
The sorting order of characters in range expressions is determined by
|
||||
The sorting order of characters in range expressions,
|
||||
and the characters included in the range,
|
||||
are determined by
|
||||
the current locale and the values of the
|
||||
<FONT SIZE=-1><B>LC_COLLATE</B>
|
||||
|
||||
@@ -13396,14 +13408,18 @@ Suspend the execution of this shell until it receives a
|
||||
<FONT SIZE=-1><B>SIGCONT</B>
|
||||
|
||||
</FONT>
|
||||
signal. A login shell cannot be suspended; the
|
||||
signal. A login shell,
|
||||
or a shell without job control enabled,
|
||||
cannot be suspended; the
|
||||
<B>-f</B>
|
||||
|
||||
option can be used to override this and force the suspension.
|
||||
The return status is 0 unless the shell is a login shell and
|
||||
The return status is 0 unless the shell is a login shell
|
||||
or job control is not enabled
|
||||
and
|
||||
<B>-f</B>
|
||||
|
||||
is not supplied, or if job control is not enabled.
|
||||
is not supplied.
|
||||
<DT><B>test</B> <I>expr</I><DD>
|
||||
|
||||
<DT><B>[</B> <I>expr</I> <B>]</B><DD>
|
||||
@@ -14677,7 +14693,7 @@ There may be only one active coprocess at a time.
|
||||
<HR>
|
||||
<TABLE WIDTH=100%>
|
||||
<TR>
|
||||
<TH ALIGN=LEFT width=33%>GNU Bash 5.2<TH ALIGN=CENTER width=33%>2022 March 11<TH ALIGN=RIGHT width=33%>BASH(1)
|
||||
<TH ALIGN=LEFT width=33%>GNU Bash 5.2<TH ALIGN=CENTER width=33%>2022 June 3<TH ALIGN=RIGHT width=33%>BASH(1)
|
||||
</TR>
|
||||
</TABLE>
|
||||
<HR>
|
||||
@@ -14783,7 +14799,7 @@ There may be only one active coprocess at a time.
|
||||
<DT><A HREF="#lbDI">BUGS</A><DD>
|
||||
</DL>
|
||||
<HR>
|
||||
This document was created by man2html from bash.1.<BR>
|
||||
Time: 08 April 2022 15:46:17 EDT
|
||||
This document was created by man2html from /usr/local/src/bash/bash-20220609/doc/bash.1.<BR>
|
||||
Time: 13 June 2022 11:04:39 EDT
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
||||
+169
-155
@@ -1,9 +1,9 @@
|
||||
This is bash.info, produced by makeinfo version 6.8 from bashref.texi.
|
||||
|
||||
This text is a brief description of the features that are present in the
|
||||
Bash shell (version 5.2, 24 February 2022).
|
||||
Bash shell (version 5.2, 3 June 2022).
|
||||
|
||||
This is Edition 5.2, last updated 24 February 2022, of 'The GNU Bash
|
||||
This is Edition 5.2, last updated 3 June 2022, of 'The GNU Bash
|
||||
Reference Manual', for 'Bash', Version 5.2.
|
||||
|
||||
Copyright (C) 1988-2022 Free Software Foundation, Inc.
|
||||
@@ -26,10 +26,10 @@ Bash Features
|
||||
*************
|
||||
|
||||
This text is a brief description of the features that are present in the
|
||||
Bash shell (version 5.2, 24 February 2022). The Bash home page is
|
||||
Bash shell (version 5.2, 3 June 2022). The Bash home page is
|
||||
<http://www.gnu.org/software/bash/>.
|
||||
|
||||
This is Edition 5.2, last updated 24 February 2022, of 'The GNU Bash
|
||||
This is Edition 5.2, last updated 3 June 2022, of 'The GNU Bash
|
||||
Reference Manual', for 'Bash', Version 5.2.
|
||||
|
||||
Bash contains features that appear in other popular shells, and some
|
||||
@@ -704,11 +704,12 @@ information.
|
||||
If the pipeline is not executed asynchronously (*note Lists::), the
|
||||
shell waits for all commands in the pipeline to complete.
|
||||
|
||||
Each command in a pipeline is executed in its own "subshell", which
|
||||
is a separate process (*note Command Execution Environment::). If the
|
||||
'lastpipe' option is enabled using the 'shopt' builtin (*note The Shopt
|
||||
Builtin::), the last element of a pipeline may be run by the shell
|
||||
process when job control is not active.
|
||||
Each command in a multi-command pipeline, where pipes are created, is
|
||||
executed in its own "subshell", which is a separate process (*note
|
||||
Command Execution Environment::). If the 'lastpipe' option is enabled
|
||||
using the 'shopt' builtin (*note The Shopt Builtin::), the last element
|
||||
of a pipeline may be run by the shell process when job control is not
|
||||
active.
|
||||
|
||||
The exit status of a pipeline is the exit status of the last command
|
||||
in the pipeline, unless the 'pipefail' option is enabled (*note The Set
|
||||
@@ -1143,6 +1144,9 @@ File: bash.info, Node: Conditional Constructs, Next: Command Grouping, Prev:
|
||||
is the portion of the string matching the Nth parenthesized
|
||||
subexpression.
|
||||
|
||||
Bash sets 'BASH_REMATCH' in the global scope; declaring it as a
|
||||
local variable will lead to unexpected results.
|
||||
|
||||
Expressions may be combined using the following operators, listed
|
||||
in decreasing order of precedence:
|
||||
|
||||
@@ -2431,9 +2435,10 @@ characters must be quoted if they are to be matched literally.
|
||||
character not enclosed is matched. A '-' may be matched by
|
||||
including it as the first or last character in the set. A ']' may
|
||||
be matched by including it as the first character in the set. The
|
||||
sorting order of characters in range expressions is determined by
|
||||
the current locale and the values of the 'LC_COLLATE' and 'LC_ALL'
|
||||
shell variables, if set.
|
||||
sorting order of characters in range expressions, and the
|
||||
characters included in the range, are determined by the current
|
||||
locale and the values of the 'LC_COLLATE' and 'LC_ALL' shell
|
||||
variables, if set.
|
||||
|
||||
For example, in the default C locale, '[a-dx-z]' is equivalent to
|
||||
'[abcdxyz]'. Many locales sort characters in dictionary order, and
|
||||
@@ -6146,14 +6151,15 @@ Invoked by remote shell daemon
|
||||
..............................
|
||||
|
||||
Bash attempts to determine when it is being run with its standard input
|
||||
connected to a network connection, as when executed by the remote shell
|
||||
daemon, usually 'rshd', or the secure shell daemon 'sshd'. If Bash
|
||||
determines it is being run in this fashion, it reads and executes
|
||||
commands from '~/.bashrc', if that file exists and is readable. It will
|
||||
not do this if invoked as 'sh'. The '--norc' option may be used to
|
||||
inhibit this behavior, and the '--rcfile' option may be used to force
|
||||
another file to be read, but neither 'rshd' nor 'sshd' generally invoke
|
||||
the shell with those options or allow them to be specified.
|
||||
connected to a network connection, as when executed by the historical
|
||||
remote shell daemon, usually 'rshd', or the secure shell daemon 'sshd'.
|
||||
If Bash determines it is being run non-interactively in this fashion, it
|
||||
reads and executes commands from '~/.bashrc', if that file exists and is
|
||||
readable. It will not do this if invoked as 'sh'. The '--norc' option
|
||||
may be used to inhibit this behavior, and the '--rcfile' option may be
|
||||
used to force another file to be read, but neither 'rshd' nor 'sshd'
|
||||
generally invoke the shell with those options or allow them to be
|
||||
specified.
|
||||
|
||||
Invoked with unequal effective and real UID/GIDs
|
||||
................................................
|
||||
@@ -7248,7 +7254,12 @@ startup files.
|
||||
'read', the trap handler executes and 'read' returns an exit status
|
||||
greater than 128.
|
||||
|
||||
60. Bash removes an exited background process's status from the list
|
||||
60. The 'printf' builting uses 'double' (via 'strtod') to convert
|
||||
arguments corresponding to floating point conversion specifiers,
|
||||
instead of 'long double' if it's available. The 'L' length
|
||||
modifier forces 'printf' to use 'long double' if it's available.
|
||||
|
||||
61. Bash removes an exited background process's status from the list
|
||||
of such statuses after the 'wait' builtin is used to obtain it.
|
||||
|
||||
There is other POSIX behavior that Bash does not implement by default
|
||||
@@ -7645,8 +7656,11 @@ File: bash.info, Node: Job Control Builtins, Next: Job Control Variables, Pre
|
||||
suspend [-f]
|
||||
|
||||
Suspend the execution of this shell until it receives a 'SIGCONT'
|
||||
signal. A login shell cannot be suspended; the '-f' option can be
|
||||
used to override this and force the suspension.
|
||||
signal. A login shell, or a shell without job control enabled,
|
||||
cannot be suspended; the '-f' option can be used to override this
|
||||
and force the suspension. The return status is 0 unless the shell
|
||||
is a login shell or job control is not enabled and '-f' is not
|
||||
supplied.
|
||||
|
||||
When job control is not active, the 'kill' and 'wait' builtins do not
|
||||
accept JOBSPEC arguments. They must be supplied process IDs.
|
||||
@@ -12494,138 +12508,138 @@ D.5 Concept Index
|
||||
|
||||
|
||||
Tag Table:
|
||||
Node: Top894
|
||||
Node: Introduction2811
|
||||
Node: What is Bash?3024
|
||||
Node: What is a shell?4135
|
||||
Node: Definitions6670
|
||||
Node: Basic Shell Features9618
|
||||
Node: Shell Syntax10834
|
||||
Node: Shell Operation11857
|
||||
Node: Quoting13147
|
||||
Node: Escape Character14448
|
||||
Node: Single Quotes14930
|
||||
Node: Double Quotes15275
|
||||
Node: ANSI-C Quoting16550
|
||||
Node: Locale Translation17857
|
||||
Node: Creating Internationalized Scripts19165
|
||||
Node: Comments23279
|
||||
Node: Shell Commands23894
|
||||
Node: Reserved Words24829
|
||||
Node: Simple Commands25582
|
||||
Node: Pipelines26233
|
||||
Node: Lists29189
|
||||
Node: Compound Commands30981
|
||||
Node: Looping Constructs31990
|
||||
Node: Conditional Constructs34482
|
||||
Node: Command Grouping48823
|
||||
Node: Coprocesses50298
|
||||
Node: GNU Parallel52958
|
||||
Node: Shell Functions53872
|
||||
Node: Shell Parameters61754
|
||||
Node: Positional Parameters66139
|
||||
Node: Special Parameters67038
|
||||
Node: Shell Expansions70249
|
||||
Node: Brace Expansion72373
|
||||
Node: Tilde Expansion75104
|
||||
Node: Shell Parameter Expansion77722
|
||||
Node: Command Substitution96070
|
||||
Node: Arithmetic Expansion97422
|
||||
Node: Process Substitution98387
|
||||
Node: Word Splitting99504
|
||||
Node: Filename Expansion101445
|
||||
Node: Pattern Matching104191
|
||||
Node: Quote Removal108796
|
||||
Node: Redirections109088
|
||||
Node: Executing Commands118745
|
||||
Node: Simple Command Expansion119412
|
||||
Node: Command Search and Execution121519
|
||||
Node: Command Execution Environment123894
|
||||
Node: Environment126926
|
||||
Node: Exit Status128586
|
||||
Node: Signals130367
|
||||
Node: Shell Scripts133813
|
||||
Node: Shell Builtin Commands136837
|
||||
Node: Bourne Shell Builtins138872
|
||||
Node: Bash Builtins160330
|
||||
Node: Modifying Shell Behavior191183
|
||||
Node: The Set Builtin191525
|
||||
Node: The Shopt Builtin202123
|
||||
Node: Special Builtins218032
|
||||
Node: Shell Variables219008
|
||||
Node: Bourne Shell Variables219442
|
||||
Node: Bash Variables221543
|
||||
Node: Bash Features254356
|
||||
Node: Invoking Bash255366
|
||||
Node: Bash Startup Files261376
|
||||
Node: Interactive Shells266476
|
||||
Node: What is an Interactive Shell?266883
|
||||
Node: Is this Shell Interactive?267529
|
||||
Node: Interactive Shell Behavior268341
|
||||
Node: Bash Conditional Expressions271967
|
||||
Node: Shell Arithmetic276606
|
||||
Node: Aliases279547
|
||||
Node: Arrays282157
|
||||
Node: The Directory Stack288545
|
||||
Node: Directory Stack Builtins289326
|
||||
Node: Controlling the Prompt293583
|
||||
Node: The Restricted Shell296545
|
||||
Node: Bash POSIX Mode299152
|
||||
Node: Shell Compatibility Mode310799
|
||||
Node: Job Control318825
|
||||
Node: Job Control Basics319282
|
||||
Node: Job Control Builtins324281
|
||||
Node: Job Control Variables329678
|
||||
Node: Command Line Editing330831
|
||||
Node: Introduction and Notation332499
|
||||
Node: Readline Interaction334119
|
||||
Node: Readline Bare Essentials335307
|
||||
Node: Readline Movement Commands337087
|
||||
Node: Readline Killing Commands338044
|
||||
Node: Readline Arguments339959
|
||||
Node: Searching341000
|
||||
Node: Readline Init File343183
|
||||
Node: Readline Init File Syntax344441
|
||||
Node: Conditional Init Constructs367637
|
||||
Node: Sample Init File371830
|
||||
Node: Bindable Readline Commands374951
|
||||
Node: Commands For Moving376152
|
||||
Node: Commands For History378200
|
||||
Node: Commands For Text383191
|
||||
Node: Commands For Killing386837
|
||||
Node: Numeric Arguments389867
|
||||
Node: Commands For Completion391003
|
||||
Node: Keyboard Macros395191
|
||||
Node: Miscellaneous Commands395875
|
||||
Node: Readline vi Mode401811
|
||||
Node: Programmable Completion402715
|
||||
Node: Programmable Completion Builtins410492
|
||||
Node: A Programmable Completion Example421184
|
||||
Node: Using History Interactively426428
|
||||
Node: Bash History Facilities427109
|
||||
Node: Bash History Builtins430111
|
||||
Node: History Interaction435116
|
||||
Node: Event Designators438733
|
||||
Node: Word Designators440084
|
||||
Node: Modifiers441841
|
||||
Node: Installing Bash443649
|
||||
Node: Basic Installation444783
|
||||
Node: Compilers and Options448502
|
||||
Node: Compiling For Multiple Architectures449240
|
||||
Node: Installation Names450930
|
||||
Node: Specifying the System Type453036
|
||||
Node: Sharing Defaults453749
|
||||
Node: Operation Controls454419
|
||||
Node: Optional Features455374
|
||||
Node: Reporting Bugs466589
|
||||
Node: Major Differences From The Bourne Shell467861
|
||||
Node: GNU Free Documentation License484708
|
||||
Node: Indexes509882
|
||||
Node: Builtin Index510333
|
||||
Node: Reserved Word Index517157
|
||||
Node: Variable Index519602
|
||||
Node: Function Index536373
|
||||
Node: Concept Index550154
|
||||
Node: Top884
|
||||
Node: Introduction2791
|
||||
Node: What is Bash?3004
|
||||
Node: What is a shell?4115
|
||||
Node: Definitions6650
|
||||
Node: Basic Shell Features9598
|
||||
Node: Shell Syntax10814
|
||||
Node: Shell Operation11837
|
||||
Node: Quoting13127
|
||||
Node: Escape Character14428
|
||||
Node: Single Quotes14910
|
||||
Node: Double Quotes15255
|
||||
Node: ANSI-C Quoting16530
|
||||
Node: Locale Translation17837
|
||||
Node: Creating Internationalized Scripts19145
|
||||
Node: Comments23259
|
||||
Node: Shell Commands23874
|
||||
Node: Reserved Words24809
|
||||
Node: Simple Commands25562
|
||||
Node: Pipelines26213
|
||||
Node: Lists29209
|
||||
Node: Compound Commands31001
|
||||
Node: Looping Constructs32010
|
||||
Node: Conditional Constructs34502
|
||||
Node: Command Grouping48966
|
||||
Node: Coprocesses50441
|
||||
Node: GNU Parallel53101
|
||||
Node: Shell Functions54015
|
||||
Node: Shell Parameters61897
|
||||
Node: Positional Parameters66282
|
||||
Node: Special Parameters67181
|
||||
Node: Shell Expansions70392
|
||||
Node: Brace Expansion72516
|
||||
Node: Tilde Expansion75247
|
||||
Node: Shell Parameter Expansion77865
|
||||
Node: Command Substitution96213
|
||||
Node: Arithmetic Expansion97565
|
||||
Node: Process Substitution98530
|
||||
Node: Word Splitting99647
|
||||
Node: Filename Expansion101588
|
||||
Node: Pattern Matching104334
|
||||
Node: Quote Removal108988
|
||||
Node: Redirections109280
|
||||
Node: Executing Commands118937
|
||||
Node: Simple Command Expansion119604
|
||||
Node: Command Search and Execution121711
|
||||
Node: Command Execution Environment124086
|
||||
Node: Environment127118
|
||||
Node: Exit Status128778
|
||||
Node: Signals130559
|
||||
Node: Shell Scripts134005
|
||||
Node: Shell Builtin Commands137029
|
||||
Node: Bourne Shell Builtins139064
|
||||
Node: Bash Builtins160522
|
||||
Node: Modifying Shell Behavior191375
|
||||
Node: The Set Builtin191717
|
||||
Node: The Shopt Builtin202315
|
||||
Node: Special Builtins218224
|
||||
Node: Shell Variables219200
|
||||
Node: Bourne Shell Variables219634
|
||||
Node: Bash Variables221735
|
||||
Node: Bash Features254548
|
||||
Node: Invoking Bash255558
|
||||
Node: Bash Startup Files261568
|
||||
Node: Interactive Shells266696
|
||||
Node: What is an Interactive Shell?267103
|
||||
Node: Is this Shell Interactive?267749
|
||||
Node: Interactive Shell Behavior268561
|
||||
Node: Bash Conditional Expressions272187
|
||||
Node: Shell Arithmetic276826
|
||||
Node: Aliases279767
|
||||
Node: Arrays282377
|
||||
Node: The Directory Stack288765
|
||||
Node: Directory Stack Builtins289546
|
||||
Node: Controlling the Prompt293803
|
||||
Node: The Restricted Shell296765
|
||||
Node: Bash POSIX Mode299372
|
||||
Node: Shell Compatibility Mode311293
|
||||
Node: Job Control319319
|
||||
Node: Job Control Basics319776
|
||||
Node: Job Control Builtins324775
|
||||
Node: Job Control Variables330342
|
||||
Node: Command Line Editing331495
|
||||
Node: Introduction and Notation333163
|
||||
Node: Readline Interaction334783
|
||||
Node: Readline Bare Essentials335971
|
||||
Node: Readline Movement Commands337751
|
||||
Node: Readline Killing Commands338708
|
||||
Node: Readline Arguments340623
|
||||
Node: Searching341664
|
||||
Node: Readline Init File343847
|
||||
Node: Readline Init File Syntax345105
|
||||
Node: Conditional Init Constructs368301
|
||||
Node: Sample Init File372494
|
||||
Node: Bindable Readline Commands375615
|
||||
Node: Commands For Moving376816
|
||||
Node: Commands For History378864
|
||||
Node: Commands For Text383855
|
||||
Node: Commands For Killing387501
|
||||
Node: Numeric Arguments390531
|
||||
Node: Commands For Completion391667
|
||||
Node: Keyboard Macros395855
|
||||
Node: Miscellaneous Commands396539
|
||||
Node: Readline vi Mode402475
|
||||
Node: Programmable Completion403379
|
||||
Node: Programmable Completion Builtins411156
|
||||
Node: A Programmable Completion Example421848
|
||||
Node: Using History Interactively427092
|
||||
Node: Bash History Facilities427773
|
||||
Node: Bash History Builtins430775
|
||||
Node: History Interaction435780
|
||||
Node: Event Designators439397
|
||||
Node: Word Designators440748
|
||||
Node: Modifiers442505
|
||||
Node: Installing Bash444313
|
||||
Node: Basic Installation445447
|
||||
Node: Compilers and Options449166
|
||||
Node: Compiling For Multiple Architectures449904
|
||||
Node: Installation Names451594
|
||||
Node: Specifying the System Type453700
|
||||
Node: Sharing Defaults454413
|
||||
Node: Operation Controls455083
|
||||
Node: Optional Features456038
|
||||
Node: Reporting Bugs467253
|
||||
Node: Major Differences From The Bourne Shell468525
|
||||
Node: GNU Free Documentation License485372
|
||||
Node: Indexes510546
|
||||
Node: Builtin Index510997
|
||||
Node: Reserved Word Index517821
|
||||
Node: Variable Index520266
|
||||
Node: Function Index537037
|
||||
Node: Concept Index550818
|
||||
|
||||
End Tag Table
|
||||
|
||||
|
||||
Binary file not shown.
+6217
-6215
File diff suppressed because it is too large
Load Diff
Binary file not shown.
+36
-12
@@ -4,9 +4,9 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<!-- This text is a brief description of the features that are present in
|
||||
the Bash shell (version 5.2, 24 February 2022).
|
||||
the Bash shell (version 5.2, 3 June 2022).
|
||||
|
||||
This is Edition 5.2, last updated 24 February 2022,
|
||||
This is Edition 5.2, last updated 3 June 2022,
|
||||
of The GNU Bash Reference Manual,
|
||||
for Bash, Version 5.2.
|
||||
|
||||
@@ -77,10 +77,10 @@ Next: <a href="#Introduction" accesskey="n" rel="next">Introduction</a>, Previou
|
||||
<span id="Bash-Features-1"></span><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.2, 24 February 2022).
|
||||
the Bash shell (version 5.2, 3 June 2022).
|
||||
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.2, last updated 24 February 2022,
|
||||
<p>This is Edition 5.2, last updated 3 June 2022,
|
||||
of <cite>The GNU Bash Reference Manual</cite>,
|
||||
for <code>Bash</code>, Version 5.2.
|
||||
</p>
|
||||
@@ -1104,7 +1104,9 @@ the time information.
|
||||
<p>If the pipeline is not executed asynchronously (see <a href="#Lists">Lists of Commands</a>), the
|
||||
shell waits for all commands in the pipeline to complete.
|
||||
</p>
|
||||
<p>Each command in a pipeline is executed in its own <em>subshell</em>, which is a
|
||||
<p>Each command in a multi-command pipeline,
|
||||
where pipes are created,
|
||||
is executed in its own <em>subshell</em>, which is a
|
||||
separate process (see <a href="#Command-Execution-Environment">Command Execution Environment</a>).
|
||||
If the <code>lastpipe</code> option is enabled using the <code>shopt</code> builtin
|
||||
(see <a href="#The-Shopt-Builtin">The Shopt Builtin</a>),
|
||||
@@ -1652,6 +1654,11 @@ expression are saved in the remaining <code>BASH_REMATCH</code> indices.
|
||||
The element of <code>BASH_REMATCH</code> with index <var>n</var> is the portion of the
|
||||
string matching the <var>n</var>th parenthesized subexpression.
|
||||
</p>
|
||||
<p>Bash sets
|
||||
<code>BASH_REMATCH</code>
|
||||
in the global scope; declaring it as a local variable will lead to
|
||||
unexpected results.
|
||||
</p>
|
||||
<p>Expressions may be combined using the following operators, listed
|
||||
in decreasing order of precedence:
|
||||
</p>
|
||||
@@ -3307,7 +3314,9 @@ then any character not enclosed is matched. A ‘<samp>-</samp>’
|
||||
may be matched by including it as the first or last character
|
||||
in the set. A ‘<samp>]</samp>’ may be matched by including it as the first
|
||||
character in the set.
|
||||
The sorting order of characters in range expressions is determined by
|
||||
The sorting order of characters in range expressions,
|
||||
and the characters included in the range,
|
||||
are determined by
|
||||
the current locale and the values of the
|
||||
<code>LC_COLLATE</code> and <code>LC_ALL</code> shell variables, if set.
|
||||
</p>
|
||||
@@ -7987,10 +7996,12 @@ No other startup files are read.
|
||||
<span id="Invoked-by-remote-shell-daemon"></span><h4 class="subsubheading">Invoked by remote shell daemon</h4>
|
||||
|
||||
<p>Bash attempts to determine when it is being run with its standard input
|
||||
connected to a network connection, as when executed by the remote shell
|
||||
daemon, usually <code>rshd</code>, or the secure shell daemon <code>sshd</code>.
|
||||
If Bash determines it is being run in
|
||||
this fashion, it reads and executes commands from <samp>~/.bashrc</samp>, if that
|
||||
connected to a network connection, as when executed by
|
||||
the historical remote shell daemon, usually <code>rshd</code>,
|
||||
or the secure shell daemon <code>sshd</code>.
|
||||
If Bash
|
||||
determines it is being run non-interactively in this fashion,
|
||||
it reads and executes commands from <samp>~/.bashrc</samp>, if that
|
||||
file exists and is readable.
|
||||
It will not do this if invoked as <code>sh</code>.
|
||||
The <samp>--norc</samp> option may be used to inhibit this behavior, and the
|
||||
@@ -9347,6 +9358,11 @@ has been set.
|
||||
If Bash receives a trapped signal while executing <code>read</code>, the trap
|
||||
handler executes and <code>read</code> returns an exit status greater than 128.
|
||||
|
||||
</li><li> The <code>printf</code> builting uses <code>double</code> (via <code>strtod</code>) to convert
|
||||
arguments corresponding to floating point conversion specifiers, instead of
|
||||
<code>long double</code> if it’s available. The ‘<samp>L</samp>’ length modifier forces
|
||||
<code>printf</code> to use <code>long double</code> if it’s available.
|
||||
|
||||
</li><li> Bash removes an exited background process’s status from the list of such
|
||||
statuses after the <code>wait</code> builtin is used to obtain it.
|
||||
|
||||
@@ -9860,9 +9876,17 @@ argument restricts operation to running jobs.
|
||||
|
||||
<p>Suspend the execution of this shell until it receives a
|
||||
<code>SIGCONT</code> signal.
|
||||
A login shell cannot be suspended; the <samp>-f</samp>
|
||||
A login shell,
|
||||
or a shell without job control enabled,
|
||||
cannot be suspended; the <samp>-f</samp>
|
||||
option can be used to override this and force the suspension.
|
||||
</p></dd>
|
||||
The return status is 0 unless the shell is a login shell
|
||||
or job control is not enabled
|
||||
and
|
||||
<samp>-f</samp>
|
||||
is not supplied.
|
||||
</p>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<p>When job control is not active, the <code>kill</code> and <code>wait</code>
|
||||
|
||||
+169
-155
@@ -2,9 +2,9 @@ This is bashref.info, produced by makeinfo version 6.8 from
|
||||
bashref.texi.
|
||||
|
||||
This text is a brief description of the features that are present in the
|
||||
Bash shell (version 5.2, 24 February 2022).
|
||||
Bash shell (version 5.2, 3 June 2022).
|
||||
|
||||
This is Edition 5.2, last updated 24 February 2022, of 'The GNU Bash
|
||||
This is Edition 5.2, last updated 3 June 2022, of 'The GNU Bash
|
||||
Reference Manual', for 'Bash', Version 5.2.
|
||||
|
||||
Copyright (C) 1988-2022 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.2, 24 February 2022). The Bash home page is
|
||||
Bash shell (version 5.2, 3 June 2022). The Bash home page is
|
||||
<http://www.gnu.org/software/bash/>.
|
||||
|
||||
This is Edition 5.2, last updated 24 February 2022, of 'The GNU Bash
|
||||
This is Edition 5.2, last updated 3 June 2022, of 'The GNU Bash
|
||||
Reference Manual', for 'Bash', Version 5.2.
|
||||
|
||||
Bash contains features that appear in other popular shells, and some
|
||||
@@ -705,11 +705,12 @@ information.
|
||||
If the pipeline is not executed asynchronously (*note Lists::), the
|
||||
shell waits for all commands in the pipeline to complete.
|
||||
|
||||
Each command in a pipeline is executed in its own "subshell", which
|
||||
is a separate process (*note Command Execution Environment::). If the
|
||||
'lastpipe' option is enabled using the 'shopt' builtin (*note The Shopt
|
||||
Builtin::), the last element of a pipeline may be run by the shell
|
||||
process when job control is not active.
|
||||
Each command in a multi-command pipeline, where pipes are created, is
|
||||
executed in its own "subshell", which is a separate process (*note
|
||||
Command Execution Environment::). If the 'lastpipe' option is enabled
|
||||
using the 'shopt' builtin (*note The Shopt Builtin::), the last element
|
||||
of a pipeline may be run by the shell process when job control is not
|
||||
active.
|
||||
|
||||
The exit status of a pipeline is the exit status of the last command
|
||||
in the pipeline, unless the 'pipefail' option is enabled (*note The Set
|
||||
@@ -1144,6 +1145,9 @@ File: bashref.info, Node: Conditional Constructs, Next: Command Grouping, Pre
|
||||
is the portion of the string matching the Nth parenthesized
|
||||
subexpression.
|
||||
|
||||
Bash sets 'BASH_REMATCH' in the global scope; declaring it as a
|
||||
local variable will lead to unexpected results.
|
||||
|
||||
Expressions may be combined using the following operators, listed
|
||||
in decreasing order of precedence:
|
||||
|
||||
@@ -2432,9 +2436,10 @@ characters must be quoted if they are to be matched literally.
|
||||
character not enclosed is matched. A '-' may be matched by
|
||||
including it as the first or last character in the set. A ']' may
|
||||
be matched by including it as the first character in the set. The
|
||||
sorting order of characters in range expressions is determined by
|
||||
the current locale and the values of the 'LC_COLLATE' and 'LC_ALL'
|
||||
shell variables, if set.
|
||||
sorting order of characters in range expressions, and the
|
||||
characters included in the range, are determined by the current
|
||||
locale and the values of the 'LC_COLLATE' and 'LC_ALL' shell
|
||||
variables, if set.
|
||||
|
||||
For example, in the default C locale, '[a-dx-z]' is equivalent to
|
||||
'[abcdxyz]'. Many locales sort characters in dictionary order, and
|
||||
@@ -6147,14 +6152,15 @@ Invoked by remote shell daemon
|
||||
..............................
|
||||
|
||||
Bash attempts to determine when it is being run with its standard input
|
||||
connected to a network connection, as when executed by the remote shell
|
||||
daemon, usually 'rshd', or the secure shell daemon 'sshd'. If Bash
|
||||
determines it is being run in this fashion, it reads and executes
|
||||
commands from '~/.bashrc', if that file exists and is readable. It will
|
||||
not do this if invoked as 'sh'. The '--norc' option may be used to
|
||||
inhibit this behavior, and the '--rcfile' option may be used to force
|
||||
another file to be read, but neither 'rshd' nor 'sshd' generally invoke
|
||||
the shell with those options or allow them to be specified.
|
||||
connected to a network connection, as when executed by the historical
|
||||
remote shell daemon, usually 'rshd', or the secure shell daemon 'sshd'.
|
||||
If Bash determines it is being run non-interactively in this fashion, it
|
||||
reads and executes commands from '~/.bashrc', if that file exists and is
|
||||
readable. It will not do this if invoked as 'sh'. The '--norc' option
|
||||
may be used to inhibit this behavior, and the '--rcfile' option may be
|
||||
used to force another file to be read, but neither 'rshd' nor 'sshd'
|
||||
generally invoke the shell with those options or allow them to be
|
||||
specified.
|
||||
|
||||
Invoked with unequal effective and real UID/GIDs
|
||||
................................................
|
||||
@@ -7249,7 +7255,12 @@ startup files.
|
||||
'read', the trap handler executes and 'read' returns an exit status
|
||||
greater than 128.
|
||||
|
||||
60. Bash removes an exited background process's status from the list
|
||||
60. The 'printf' builting uses 'double' (via 'strtod') to convert
|
||||
arguments corresponding to floating point conversion specifiers,
|
||||
instead of 'long double' if it's available. The 'L' length
|
||||
modifier forces 'printf' to use 'long double' if it's available.
|
||||
|
||||
61. Bash removes an exited background process's status from the list
|
||||
of such statuses after the 'wait' builtin is used to obtain it.
|
||||
|
||||
There is other POSIX behavior that Bash does not implement by default
|
||||
@@ -7646,8 +7657,11 @@ File: bashref.info, Node: Job Control Builtins, Next: Job Control Variables,
|
||||
suspend [-f]
|
||||
|
||||
Suspend the execution of this shell until it receives a 'SIGCONT'
|
||||
signal. A login shell cannot be suspended; the '-f' option can be
|
||||
used to override this and force the suspension.
|
||||
signal. A login shell, or a shell without job control enabled,
|
||||
cannot be suspended; the '-f' option can be used to override this
|
||||
and force the suspension. The return status is 0 unless the shell
|
||||
is a login shell or job control is not enabled and '-f' is not
|
||||
supplied.
|
||||
|
||||
When job control is not active, the 'kill' and 'wait' builtins do not
|
||||
accept JOBSPEC arguments. They must be supplied process IDs.
|
||||
@@ -12495,138 +12509,138 @@ D.5 Concept Index
|
||||
|
||||
|
||||
Tag Table:
|
||||
Node: Top897
|
||||
Node: Introduction2817
|
||||
Node: What is Bash?3033
|
||||
Node: What is a shell?4147
|
||||
Node: Definitions6685
|
||||
Node: Basic Shell Features9636
|
||||
Node: Shell Syntax10855
|
||||
Node: Shell Operation11881
|
||||
Node: Quoting13174
|
||||
Node: Escape Character14478
|
||||
Node: Single Quotes14963
|
||||
Node: Double Quotes15311
|
||||
Node: ANSI-C Quoting16589
|
||||
Node: Locale Translation17899
|
||||
Node: Creating Internationalized Scripts19210
|
||||
Node: Comments23327
|
||||
Node: Shell Commands23945
|
||||
Node: Reserved Words24883
|
||||
Node: Simple Commands25639
|
||||
Node: Pipelines26293
|
||||
Node: Lists29252
|
||||
Node: Compound Commands31047
|
||||
Node: Looping Constructs32059
|
||||
Node: Conditional Constructs34554
|
||||
Node: Command Grouping48898
|
||||
Node: Coprocesses50376
|
||||
Node: GNU Parallel53039
|
||||
Node: Shell Functions53956
|
||||
Node: Shell Parameters61841
|
||||
Node: Positional Parameters66229
|
||||
Node: Special Parameters67131
|
||||
Node: Shell Expansions70345
|
||||
Node: Brace Expansion72472
|
||||
Node: Tilde Expansion75206
|
||||
Node: Shell Parameter Expansion77827
|
||||
Node: Command Substitution96178
|
||||
Node: Arithmetic Expansion97533
|
||||
Node: Process Substitution98501
|
||||
Node: Word Splitting99621
|
||||
Node: Filename Expansion101565
|
||||
Node: Pattern Matching104314
|
||||
Node: Quote Removal108922
|
||||
Node: Redirections109217
|
||||
Node: Executing Commands118877
|
||||
Node: Simple Command Expansion119547
|
||||
Node: Command Search and Execution121657
|
||||
Node: Command Execution Environment124035
|
||||
Node: Environment127070
|
||||
Node: Exit Status128733
|
||||
Node: Signals130517
|
||||
Node: Shell Scripts133966
|
||||
Node: Shell Builtin Commands136993
|
||||
Node: Bourne Shell Builtins139031
|
||||
Node: Bash Builtins160492
|
||||
Node: Modifying Shell Behavior191348
|
||||
Node: The Set Builtin191693
|
||||
Node: The Shopt Builtin202294
|
||||
Node: Special Builtins218206
|
||||
Node: Shell Variables219185
|
||||
Node: Bourne Shell Variables219622
|
||||
Node: Bash Variables221726
|
||||
Node: Bash Features254542
|
||||
Node: Invoking Bash255555
|
||||
Node: Bash Startup Files261568
|
||||
Node: Interactive Shells266671
|
||||
Node: What is an Interactive Shell?267081
|
||||
Node: Is this Shell Interactive?267730
|
||||
Node: Interactive Shell Behavior268545
|
||||
Node: Bash Conditional Expressions272174
|
||||
Node: Shell Arithmetic276816
|
||||
Node: Aliases279760
|
||||
Node: Arrays282373
|
||||
Node: The Directory Stack288764
|
||||
Node: Directory Stack Builtins289548
|
||||
Node: Controlling the Prompt293808
|
||||
Node: The Restricted Shell296773
|
||||
Node: Bash POSIX Mode299383
|
||||
Node: Shell Compatibility Mode311033
|
||||
Node: Job Control319062
|
||||
Node: Job Control Basics319522
|
||||
Node: Job Control Builtins324524
|
||||
Node: Job Control Variables329924
|
||||
Node: Command Line Editing331080
|
||||
Node: Introduction and Notation332751
|
||||
Node: Readline Interaction334374
|
||||
Node: Readline Bare Essentials335565
|
||||
Node: Readline Movement Commands337348
|
||||
Node: Readline Killing Commands338308
|
||||
Node: Readline Arguments340226
|
||||
Node: Searching341270
|
||||
Node: Readline Init File343456
|
||||
Node: Readline Init File Syntax344717
|
||||
Node: Conditional Init Constructs367916
|
||||
Node: Sample Init File372112
|
||||
Node: Bindable Readline Commands375236
|
||||
Node: Commands For Moving376440
|
||||
Node: Commands For History378491
|
||||
Node: Commands For Text383485
|
||||
Node: Commands For Killing387134
|
||||
Node: Numeric Arguments390167
|
||||
Node: Commands For Completion391306
|
||||
Node: Keyboard Macros395497
|
||||
Node: Miscellaneous Commands396184
|
||||
Node: Readline vi Mode402123
|
||||
Node: Programmable Completion403030
|
||||
Node: Programmable Completion Builtins410810
|
||||
Node: A Programmable Completion Example421505
|
||||
Node: Using History Interactively426752
|
||||
Node: Bash History Facilities427436
|
||||
Node: Bash History Builtins430441
|
||||
Node: History Interaction435449
|
||||
Node: Event Designators439069
|
||||
Node: Word Designators440423
|
||||
Node: Modifiers442183
|
||||
Node: Installing Bash443994
|
||||
Node: Basic Installation445131
|
||||
Node: Compilers and Options448853
|
||||
Node: Compiling For Multiple Architectures449594
|
||||
Node: Installation Names451287
|
||||
Node: Specifying the System Type453396
|
||||
Node: Sharing Defaults454112
|
||||
Node: Operation Controls454785
|
||||
Node: Optional Features455743
|
||||
Node: Reporting Bugs466961
|
||||
Node: Major Differences From The Bourne Shell468236
|
||||
Node: GNU Free Documentation License485086
|
||||
Node: Indexes510263
|
||||
Node: Builtin Index510717
|
||||
Node: Reserved Word Index517544
|
||||
Node: Variable Index519992
|
||||
Node: Function Index536766
|
||||
Node: Concept Index550550
|
||||
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 Character14458
|
||||
Node: Single Quotes14943
|
||||
Node: Double Quotes15291
|
||||
Node: ANSI-C Quoting16569
|
||||
Node: Locale Translation17879
|
||||
Node: Creating Internationalized Scripts19190
|
||||
Node: Comments23307
|
||||
Node: Shell Commands23925
|
||||
Node: Reserved Words24863
|
||||
Node: Simple Commands25619
|
||||
Node: Pipelines26273
|
||||
Node: Lists29272
|
||||
Node: Compound Commands31067
|
||||
Node: Looping Constructs32079
|
||||
Node: Conditional Constructs34574
|
||||
Node: Command Grouping49041
|
||||
Node: Coprocesses50519
|
||||
Node: GNU Parallel53182
|
||||
Node: Shell Functions54099
|
||||
Node: Shell Parameters61984
|
||||
Node: Positional Parameters66372
|
||||
Node: Special Parameters67274
|
||||
Node: Shell Expansions70488
|
||||
Node: Brace Expansion72615
|
||||
Node: Tilde Expansion75349
|
||||
Node: Shell Parameter Expansion77970
|
||||
Node: Command Substitution96321
|
||||
Node: Arithmetic Expansion97676
|
||||
Node: Process Substitution98644
|
||||
Node: Word Splitting99764
|
||||
Node: Filename Expansion101708
|
||||
Node: Pattern Matching104457
|
||||
Node: Quote Removal109114
|
||||
Node: Redirections109409
|
||||
Node: Executing Commands119069
|
||||
Node: Simple Command Expansion119739
|
||||
Node: Command Search and Execution121849
|
||||
Node: Command Execution Environment124227
|
||||
Node: Environment127262
|
||||
Node: Exit Status128925
|
||||
Node: Signals130709
|
||||
Node: Shell Scripts134158
|
||||
Node: Shell Builtin Commands137185
|
||||
Node: Bourne Shell Builtins139223
|
||||
Node: Bash Builtins160684
|
||||
Node: Modifying Shell Behavior191540
|
||||
Node: The Set Builtin191885
|
||||
Node: The Shopt Builtin202486
|
||||
Node: Special Builtins218398
|
||||
Node: Shell Variables219377
|
||||
Node: Bourne Shell Variables219814
|
||||
Node: Bash Variables221918
|
||||
Node: Bash Features254734
|
||||
Node: Invoking Bash255747
|
||||
Node: Bash Startup Files261760
|
||||
Node: Interactive Shells266891
|
||||
Node: What is an Interactive Shell?267301
|
||||
Node: Is this Shell Interactive?267950
|
||||
Node: Interactive Shell Behavior268765
|
||||
Node: Bash Conditional Expressions272394
|
||||
Node: Shell Arithmetic277036
|
||||
Node: Aliases279980
|
||||
Node: Arrays282593
|
||||
Node: The Directory Stack288984
|
||||
Node: Directory Stack Builtins289768
|
||||
Node: Controlling the Prompt294028
|
||||
Node: The Restricted Shell296993
|
||||
Node: Bash POSIX Mode299603
|
||||
Node: Shell Compatibility Mode311527
|
||||
Node: Job Control319556
|
||||
Node: Job Control Basics320016
|
||||
Node: Job Control Builtins325018
|
||||
Node: Job Control Variables330588
|
||||
Node: Command Line Editing331744
|
||||
Node: Introduction and Notation333415
|
||||
Node: Readline Interaction335038
|
||||
Node: Readline Bare Essentials336229
|
||||
Node: Readline Movement Commands338012
|
||||
Node: Readline Killing Commands338972
|
||||
Node: Readline Arguments340890
|
||||
Node: Searching341934
|
||||
Node: Readline Init File344120
|
||||
Node: Readline Init File Syntax345381
|
||||
Node: Conditional Init Constructs368580
|
||||
Node: Sample Init File372776
|
||||
Node: Bindable Readline Commands375900
|
||||
Node: Commands For Moving377104
|
||||
Node: Commands For History379155
|
||||
Node: Commands For Text384149
|
||||
Node: Commands For Killing387798
|
||||
Node: Numeric Arguments390831
|
||||
Node: Commands For Completion391970
|
||||
Node: Keyboard Macros396161
|
||||
Node: Miscellaneous Commands396848
|
||||
Node: Readline vi Mode402787
|
||||
Node: Programmable Completion403694
|
||||
Node: Programmable Completion Builtins411474
|
||||
Node: A Programmable Completion Example422169
|
||||
Node: Using History Interactively427416
|
||||
Node: Bash History Facilities428100
|
||||
Node: Bash History Builtins431105
|
||||
Node: History Interaction436113
|
||||
Node: Event Designators439733
|
||||
Node: Word Designators441087
|
||||
Node: Modifiers442847
|
||||
Node: Installing Bash444658
|
||||
Node: Basic Installation445795
|
||||
Node: Compilers and Options449517
|
||||
Node: Compiling For Multiple Architectures450258
|
||||
Node: Installation Names451951
|
||||
Node: Specifying the System Type454060
|
||||
Node: Sharing Defaults454776
|
||||
Node: Operation Controls455449
|
||||
Node: Optional Features456407
|
||||
Node: Reporting Bugs467625
|
||||
Node: Major Differences From The Bourne Shell468900
|
||||
Node: GNU Free Documentation License485750
|
||||
Node: Indexes510927
|
||||
Node: Builtin Index511381
|
||||
Node: Reserved Word Index518208
|
||||
Node: Variable Index520656
|
||||
Node: Function Index537430
|
||||
Node: Concept Index551214
|
||||
|
||||
End Tag Table
|
||||
|
||||
|
||||
Binary file not shown.
+386
-372
File diff suppressed because it is too large
Load Diff
+32
-7
@@ -801,7 +801,9 @@ the time information.
|
||||
If the pipeline is not executed asynchronously (@pxref{Lists}), the
|
||||
shell waits for all commands in the pipeline to complete.
|
||||
|
||||
Each command in a pipeline is executed in its own @dfn{subshell}, which is a
|
||||
Each command in a multi-command pipeline,
|
||||
where pipes are created,
|
||||
is executed in its own @dfn{subshell}, which is a
|
||||
separate process (@pxref{Command Execution Environment}).
|
||||
If the @code{lastpipe} option is enabled using the @code{shopt} builtin
|
||||
(@pxref{The Shopt Builtin}),
|
||||
@@ -1333,6 +1335,11 @@ expression are saved in the remaining @code{BASH_REMATCH} indices.
|
||||
The element of @code{BASH_REMATCH} with index @var{n} is the portion of the
|
||||
string matching the @var{n}th parenthesized subexpression.
|
||||
|
||||
Bash sets
|
||||
@code{BASH_REMATCH}
|
||||
in the global scope; declaring it as a local variable will lead to
|
||||
unexpected results.
|
||||
|
||||
Expressions may be combined using the following operators, listed
|
||||
in decreasing order of precedence:
|
||||
|
||||
@@ -2863,7 +2870,9 @@ then any character not enclosed is matched. A @samp{@minus{}}
|
||||
may be matched by including it as the first or last character
|
||||
in the set. A @samp{]} may be matched by including it as the first
|
||||
character in the set.
|
||||
The sorting order of characters in range expressions is determined by
|
||||
The sorting order of characters in range expressions,
|
||||
and the characters included in the range,
|
||||
are determined by
|
||||
the current locale and the values of the
|
||||
@env{LC_COLLATE} and @env{LC_ALL} shell variables, if set.
|
||||
|
||||
@@ -7101,10 +7110,12 @@ No other startup files are read.
|
||||
@subsubheading Invoked by remote shell daemon
|
||||
|
||||
Bash attempts to determine when it is being run with its standard input
|
||||
connected to a network connection, as when executed by the remote shell
|
||||
daemon, usually @code{rshd}, or the secure shell daemon @code{sshd}.
|
||||
If Bash determines it is being run in
|
||||
this fashion, it reads and executes commands from @file{~/.bashrc}, if that
|
||||
connected to a network connection, as when executed by
|
||||
the historical remote shell daemon, usually @code{rshd},
|
||||
or the secure shell daemon @code{sshd}.
|
||||
If Bash
|
||||
determines it is being run non-interactively in this fashion,
|
||||
it reads and executes commands from @file{~/.bashrc}, if that
|
||||
file exists and is readable.
|
||||
It will not do this if invoked as @code{sh}.
|
||||
The @option{--norc} option may be used to inhibit this behavior, and the
|
||||
@@ -8398,6 +8409,12 @@ has been set.
|
||||
If Bash receives a trapped signal while executing @code{read}, the trap
|
||||
handler executes and @code{read} returns an exit status greater than 128.
|
||||
|
||||
@item
|
||||
The @code{printf} builting uses @code{double} (via @code{strtod}) to convert
|
||||
arguments corresponding to floating point conversion specifiers, instead of
|
||||
@code{long double} if it's available. The @samp{L} length modifier forces
|
||||
@code{printf} to use @code{long double} if it's available.
|
||||
|
||||
@item
|
||||
Bash removes an exited background process's status from the list of such
|
||||
statuses after the @code{wait} builtin is used to obtain it.
|
||||
@@ -8905,8 +8922,16 @@ suspend [-f]
|
||||
|
||||
Suspend the execution of this shell until it receives a
|
||||
@code{SIGCONT} signal.
|
||||
A login shell cannot be suspended; the @option{-f}
|
||||
A login shell,
|
||||
or a shell without job control enabled,
|
||||
cannot be suspended; the @option{-f}
|
||||
option can be used to override this and force the suspension.
|
||||
The return status is 0 unless the shell is a login shell
|
||||
or job control is not enabled
|
||||
and
|
||||
@option{-f}
|
||||
is not supplied.
|
||||
|
||||
@end table
|
||||
|
||||
When job control is not active, the @code{kill} and @code{wait}
|
||||
|
||||
+194
-193
@@ -1679,28 +1679,29 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
|
||||
|
||||
ssuussppeenndd [--ff]
|
||||
Suspend the execution of this shell until it receives a SSIIGGCCOONNTT
|
||||
signal. A login shell cannot be suspended; the --ff option can be
|
||||
used to override this and force the suspension. The return sta-
|
||||
tus is 0 unless the shell is a login shell and --ff is not sup-
|
||||
plied, or if job control is not enabled.
|
||||
signal. A login shell, or a shell without job control enabled,
|
||||
cannot be suspended; the --ff option can be used to override this
|
||||
and force the suspension. The return status is 0 unless the
|
||||
shell is a login shell or job control is not enabled and --ff is
|
||||
not supplied.
|
||||
|
||||
tteesstt _e_x_p_r
|
||||
[[ _e_x_p_r ]]
|
||||
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 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
|
||||
erand must be a separate argument. Expressions are composed of
|
||||
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,
|
||||
listed in decreasing order of precedence. The evaluation de-
|
||||
pends on the number of arguments; see below. Operator prece-
|
||||
Expressions may be combined using the following operators,
|
||||
listed in decreasing order of precedence. The evaluation de-
|
||||
pends 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.
|
||||
@@ -1717,139 +1718,139 @@ 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
|
||||
The following conditions are applied in the order listed.
|
||||
If the first argument is !!, the result is the negation of
|
||||
the three-argument expression composed of the remaining
|
||||
arguments. the two-argument test using the second and
|
||||
third arguments. If the first argument is exactly (( and
|
||||
the fourth argument is exactly )), the result is the two-
|
||||
argument test of the second and third arguments. Other-
|
||||
the three-argument expression composed of the remaining
|
||||
arguments. the two-argument test using the second and
|
||||
third arguments. If the first argument is exactly (( and
|
||||
the fourth argument is exactly )), the result is the two-
|
||||
argument test of the second and third arguments. Other-
|
||||
wise, the expression is parsed and evaluated 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 re-
|
||||
The command _a_r_g is to be read and executed when the shell re-
|
||||
ceives signal(s) _s_i_g_s_p_e_c. If _a_r_g is absent (and there is a sin-
|
||||
gle _s_i_g_s_p_e_c) or --, each specified signal is reset to its origi-
|
||||
nal 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
|
||||
gle _s_i_g_s_p_e_c) or --, each specified signal is reset to its origi-
|
||||
nal 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 com-
|
||||
mands associated with each signal. The --ll option causes the
|
||||
shell to print a list of signal names and their corresponding
|
||||
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
|
||||
supplied or if only --pp is given, ttrraapp prints the list of com-
|
||||
mands associated with each signal. The --ll option causes the
|
||||
shell to print a list of signal names and their corresponding
|
||||
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
|
||||
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) op-
|
||||
tion.
|
||||
|
||||
Signals ignored upon entry to the shell cannot be trapped or re-
|
||||
set. Trapped signals that are not being ignored are reset to
|
||||
set. 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 re-
|
||||
turned. 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 specified
|
||||
as a command name, or nothing if ``type -t name'' would not re-
|
||||
turn _f_i_l_e. The --PP option forces a PPAATTHH search for each _n_a_m_e,
|
||||
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 re-
|
||||
turned. 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 specified
|
||||
as a command name, or nothing if ``type -t name'' would not re-
|
||||
turn _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 [--HHSS] --aa
|
||||
uulliimmiitt [--HHSS] [--bbccddeeffiikkllmmnnppqqrrssttuuvvxxPPRRTT [_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, re-
|
||||
spectively. If _l_i_m_i_t is omitted, the current value of the soft
|
||||
current hard limit, the current soft limit, and no limit, re-
|
||||
spectively. 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, if appropriate, are printed before the value. Other op-
|
||||
When more than one resource is specified, the limit name and
|
||||
unit, if appropriate, are printed before the value. Other op-
|
||||
tions are interpreted as follows:
|
||||
--aa All current limits are reported; no limits are set
|
||||
--bb The maximum socket buffer size
|
||||
--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)
|
||||
@@ -1858,132 +1859,132 @@ 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
|
||||
--RR The maximum time a real-time process can run before
|
||||
--RR The maximum time a real-time process can run before
|
||||
blocking, in microseconds
|
||||
--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; --RR, which is in microseconds; --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 increments. The return status is 0
|
||||
unless an invalid option or argument is supplied, or an error
|
||||
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; --RR, which is in microseconds; --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 increments. The return status is 0
|
||||
unless an invalid option or argument 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, a function with that name, if any, is unset.
|
||||
Each unset variable or function is removed from the environment
|
||||
passed to subsequent commands. If any of BBAASSHH__AALLIIAASSEESS,
|
||||
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, a function with that name, if any, is unset.
|
||||
Each unset variable or function is removed from the environment
|
||||
passed to subsequent commands. If any of BBAASSHH__AALLIIAASSEESS,
|
||||
BBAASSHH__AARRGGVV00, BBAASSHH__CCMMDDSS, BBAASSHH__CCOOMMMMAANNDD, BBAASSHH__SSUUBBSSHHEELLLL, BBAASSHHPPIIDD,
|
||||
CCOOMMPP__WWOORRDDBBRREEAAKKSS, DDIIRRSSTTAACCKK, EEPPOOCCHHRREEAALLTTIIMMEE, EEPPOOCCHHSSEECCOONNDDSS, FFUUNNCC--
|
||||
NNAAMMEE, GGRROOUUPPSS, HHIISSTTCCMMDD, LLIINNEENNOO, RRAANNDDOOMM, SSEECCOONNDDSS, or SSRRAANNDDOOMM are
|
||||
CCOOMMPP__WWOORRDDBBRREEAAKKSS, DDIIRRSSTTAACCKK, EEPPOOCCHHRREEAALLTTIIMMEE, EEPPOOCCHHSSEECCOONNDDSS, FFUUNNCC--
|
||||
NNAAMMEE, GGRROOUUPPSS, HHIISSTTCCMMDD, LLIINNEENNOO, RRAANNDDOOMM, SSEECCOONNDDSS, or SSRRAANNDDOOMM 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 or may not be unset.
|
||||
|
||||
wwaaiitt [--ffnn] [--pp _v_a_r_n_a_m_e] [_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, wwaaiitt waits for all running
|
||||
background jobs and the last-executed process substitution, if
|
||||
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 from
|
||||
If the --nn option is supplied, wwaaiitt waits for a single job from
|
||||
the list of _i_ds or, if no _i_ds are supplied, any job, to complete
|
||||
and returns its exit status. If none of the supplied arguments
|
||||
and returns its exit status. If none of the supplied arguments
|
||||
is a child of the shell, or if no arguments are supplied and the
|
||||
shell has no unwaited-for children, the exit status is 127. If
|
||||
the --pp option is supplied, the process or job identifier of the
|
||||
job for which the exit status is returned is assigned to the
|
||||
variable _v_a_r_n_a_m_e named by the option argument. The variable
|
||||
will be unset initially, before any assignment. This is useful
|
||||
only when the --nn option is supplied. Supplying the --ff option,
|
||||
when job control is enabled, forces wwaaiitt to wait for _i_d to ter-
|
||||
shell has no unwaited-for children, the exit status is 127. If
|
||||
the --pp option is supplied, the process or job identifier of the
|
||||
job for which the exit status is returned is assigned to the
|
||||
variable _v_a_r_n_a_m_e named by the option argument. The variable
|
||||
will be unset initially, before any assignment. This is useful
|
||||
only when the --nn option is supplied. 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
|
||||
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.
|
||||
|
||||
SSHHEELLLL CCOOMMPPAATTIIBBIILLIITTYY MMOODDEE
|
||||
Bash-4.0 introduced the concept of a _s_h_e_l_l _c_o_m_p_a_t_i_b_i_l_i_t_y _l_e_v_e_l, speci-
|
||||
fied as a set of options to the shopt builtin ( ccoommppaatt3311, ccoommppaatt3322,
|
||||
ccoommppaatt4400, ccoommppaatt4411, and so on). There is only one current compatibil-
|
||||
ity level -- each option is mutually exclusive. The compatibility
|
||||
level is intended to allow users to select behavior from previous ver-
|
||||
sions that is incompatible with newer versions while they migrate
|
||||
scripts to use current features and behavior. It's intended to be a
|
||||
Bash-4.0 introduced the concept of a _s_h_e_l_l _c_o_m_p_a_t_i_b_i_l_i_t_y _l_e_v_e_l, speci-
|
||||
fied as a set of options to the shopt builtin ( ccoommppaatt3311, ccoommppaatt3322,
|
||||
ccoommppaatt4400, ccoommppaatt4411, and so on). There is only one current compatibil-
|
||||
ity level -- each option is mutually exclusive. The compatibility
|
||||
level is intended to allow users to select behavior from previous ver-
|
||||
sions that is incompatible with newer versions while they migrate
|
||||
scripts to use current features and behavior. It's intended to be a
|
||||
temporary solution.
|
||||
|
||||
This section does not mention behavior that is standard for a particu-
|
||||
lar version (e.g., setting ccoommppaatt3322 means that quoting the rhs of the
|
||||
regexp matching operator quotes special regexp characters in the word,
|
||||
This section does not mention behavior that is standard for a particu-
|
||||
lar version (e.g., setting ccoommppaatt3322 means that quoting the rhs of the
|
||||
regexp matching operator quotes special regexp characters in the word,
|
||||
which is default behavior in bash-3.2 and above).
|
||||
|
||||
If a user enables, say, ccoommppaatt3322, it may affect the behavior of other
|
||||
compatibility levels up to and including the current compatibility
|
||||
level. The idea is that each compatibility level controls behavior
|
||||
that changed in that version of bbaasshh, but that behavior may have been
|
||||
present in earlier versions. For instance, the change to use locale-
|
||||
based comparisons with the [[[[ command came in bash-4.1, and earlier
|
||||
If a user enables, say, ccoommppaatt3322, it may affect the behavior of other
|
||||
compatibility levels up to and including the current compatibility
|
||||
level. The idea is that each compatibility level controls behavior
|
||||
that changed in that version of bbaasshh, but that behavior may have been
|
||||
present in earlier versions. For instance, the change to use locale-
|
||||
based comparisons with the [[[[ command came in bash-4.1, and earlier
|
||||
versions used ASCII-based comparisons, so enabling ccoommppaatt3322 will enable
|
||||
ASCII-based comparisons as well. That granularity may not be suffi-
|
||||
cient for all uses, and as a result users should employ compatibility
|
||||
levels carefully. Read the documentation for a particular feature to
|
||||
ASCII-based comparisons as well. That granularity may not be suffi-
|
||||
cient for all uses, and as a result users should employ compatibility
|
||||
levels carefully. Read the documentation for a particular feature to
|
||||
find out the current behavior.
|
||||
|
||||
Bash-4.3 introduced a new shell variable: BBAASSHH__CCOOMMPPAATT. The value as-
|
||||
Bash-4.3 introduced a new shell variable: BBAASSHH__CCOOMMPPAATT. The value as-
|
||||
signed to this variable (a decimal version number like 4.2, or an inte-
|
||||
ger corresponding to the ccoommppaatt_N_N option, like 42) determines the com-
|
||||
ger corresponding to the ccoommppaatt_N_N option, like 42) determines the com-
|
||||
patibility level.
|
||||
|
||||
Starting with bash-4.4, Bash has begun deprecating older compatibility
|
||||
levels. Eventually, the options will be removed in favor of BBAASSHH__CCOOMM--
|
||||
Starting with bash-4.4, Bash has begun deprecating older compatibility
|
||||
levels. Eventually, the options will be removed in favor of BBAASSHH__CCOOMM--
|
||||
PPAATT.
|
||||
|
||||
Bash-5.0 is the final version for which there will be an individual
|
||||
shopt option for the previous version. Users should use BBAASSHH__CCOOMMPPAATT on
|
||||
Bash-5.0 is the final version for which there will be an individual
|
||||
shopt option for the previous version. Users should use BBAASSHH__CCOOMMPPAATT on
|
||||
bash-5.0 and later versions.
|
||||
|
||||
The following table describes the behavior changes controlled by each
|
||||
The following table describes the behavior changes controlled by each
|
||||
compatibility level setting. The ccoommppaatt_N_N tag is used as shorthand for
|
||||
setting the compatibility level to _N_N using one of the following mecha-
|
||||
nisms. For versions prior to bash-5.0, the compatibility level may be
|
||||
set using the corresponding ccoommppaatt_N_N shopt option. For bash-4.3 and
|
||||
later versions, the BBAASSHH__CCOOMMPPAATT variable is preferred, and it is re-
|
||||
nisms. For versions prior to bash-5.0, the compatibility level may be
|
||||
set using the corresponding ccoommppaatt_N_N shopt option. For bash-4.3 and
|
||||
later versions, the BBAASSHH__CCOOMMPPAATT variable is preferred, and it is re-
|
||||
quired for bash-5.1 and later versions.
|
||||
|
||||
ccoommppaatt3311
|
||||
@@ -1991,85 +1992,85 @@ SSHHEELLLL CCOOMMPPAATTIIBBIILLIITTYY MMOODDEE
|
||||
ator (=~) has no special effect
|
||||
|
||||
ccoommppaatt3322
|
||||
+o interrupting a command list such as "a ; b ; c" causes
|
||||
the execution of the next command in the list (in
|
||||
bash-4.0 and later versions, the shell acts as if it re-
|
||||
ceived the interrupt, so interrupting one command in a
|
||||
+o interrupting a command list such as "a ; b ; c" causes
|
||||
the execution of the next command in the list (in
|
||||
bash-4.0 and later versions, the shell acts as if it re-
|
||||
ceived the interrupt, so interrupting one command in a
|
||||
list aborts the execution of the entire list)
|
||||
|
||||
ccoommppaatt4400
|
||||
+o the << and >> operators to the [[[[ command do not consider
|
||||
+o the << and >> operators to the [[[[ command do not consider
|
||||
the current locale when comparing strings; they use ASCII
|
||||
ordering. Bash versions prior to bash-4.1 use ASCII col-
|
||||
lation and _s_t_r_c_m_p(3); bash-4.1 and later use the current
|
||||
lation and _s_t_r_c_m_p(3); bash-4.1 and later use the current
|
||||
locale's collation sequence and _s_t_r_c_o_l_l(3).
|
||||
|
||||
ccoommppaatt4411
|
||||
+o in _p_o_s_i_x mode, ttiimmee may be followed by options and still
|
||||
+o in _p_o_s_i_x mode, ttiimmee may be followed by options and still
|
||||
be recognized as a reserved word (this is POSIX interpre-
|
||||
tation 267)
|
||||
+o in _p_o_s_i_x mode, the parser requires that an even number of
|
||||
single quotes occur in the _w_o_r_d portion of a double-
|
||||
quoted parameter expansion and treats them specially, so
|
||||
that characters within the single quotes are considered
|
||||
single quotes occur in the _w_o_r_d portion of a double-
|
||||
quoted parameter expansion and treats them specially, so
|
||||
that characters within the single quotes are considered
|
||||
quoted (this is POSIX interpretation 221)
|
||||
|
||||
ccoommppaatt4422
|
||||
+o the replacement string in double-quoted pattern substitu-
|
||||
tion does not undergo quote removal, as it does in ver-
|
||||
tion does not undergo quote removal, as it does in ver-
|
||||
sions after bash-4.2
|
||||
+o in posix mode, single quotes are considered special when
|
||||
expanding the _w_o_r_d portion of a double-quoted parameter
|
||||
expansion and can be used to quote a closing brace or
|
||||
other special character (this is part of POSIX interpre-
|
||||
tation 221); in later versions, single quotes are not
|
||||
+o in posix mode, single quotes are considered special when
|
||||
expanding the _w_o_r_d portion of a double-quoted parameter
|
||||
expansion and can be used to quote a closing brace or
|
||||
other special character (this is part of POSIX interpre-
|
||||
tation 221); in later versions, single quotes are not
|
||||
special within double-quoted word expansions
|
||||
|
||||
ccoommppaatt4433
|
||||
+o the shell does not print a warning message if an attempt
|
||||
is made to use a quoted compound assignment as an argu-
|
||||
ment to declare (declare -a foo='(1 2)'). Later versions
|
||||
+o the shell does not print a warning message if an attempt
|
||||
is made to use a quoted compound assignment as an argu-
|
||||
ment to declare (declare -a foo='(1 2)'). Later versions
|
||||
warn that this usage is deprecated
|
||||
+o word expansion errors are considered non-fatal errors
|
||||
that cause the current command to fail, even in posix
|
||||
mode (the default behavior is to make them fatal errors
|
||||
+o word expansion errors are considered non-fatal errors
|
||||
that cause the current command to fail, even in posix
|
||||
mode (the default behavior is to make them fatal errors
|
||||
that cause the shell to exit)
|
||||
+o when executing a shell function, the loop state
|
||||
+o when executing a shell function, the loop state
|
||||
(while/until/etc.) is not reset, so bbrreeaakk or ccoonnttiinnuuee in
|
||||
that function will break or continue loops in the calling
|
||||
context. Bash-4.4 and later reset the loop state to pre-
|
||||
context. Bash-4.4 and later reset the loop state to pre-
|
||||
vent this
|
||||
|
||||
ccoommppaatt4444
|
||||
+o the shell sets up the values used by BBAASSHH__AARRGGVV and
|
||||
BBAASSHH__AARRGGCC so they can expand to the shell's positional
|
||||
+o the shell sets up the values used by BBAASSHH__AARRGGVV and
|
||||
BBAASSHH__AARRGGCC so they can expand to the shell's positional
|
||||
parameters even if extended debugging mode is not enabled
|
||||
+o a subshell inherits loops from its parent context, so
|
||||
bbrreeaakk or ccoonnttiinnuuee will cause the subshell to exit.
|
||||
Bash-5.0 and later reset the loop state to prevent the
|
||||
+o a subshell inherits loops from its parent context, so
|
||||
bbrreeaakk or ccoonnttiinnuuee will cause the subshell to exit.
|
||||
Bash-5.0 and later reset the loop state to prevent the
|
||||
exit
|
||||
+o variable assignments preceding builtins like eexxppoorrtt and
|
||||
+o variable assignments preceding builtins like eexxppoorrtt and
|
||||
rreeaaddoonnllyy that set attributes continue to affect variables
|
||||
with the same name in the calling environment even if the
|
||||
shell is not in posix mode
|
||||
|
||||
ccoommppaatt5500
|
||||
+o Bash-5.1 changed the way $$RRAANNDDOOMM is generated to intro-
|
||||
+o Bash-5.1 changed the way $$RRAANNDDOOMM is generated to intro-
|
||||
duce slightly more randomness. If the shell compatibility
|
||||
level is set to 50 or lower, it reverts to the method
|
||||
from bash-5.0 and previous versions, so seeding the ran-
|
||||
dom number generator by assigning a value to RRAANNDDOOMM will
|
||||
level is set to 50 or lower, it reverts to the method
|
||||
from bash-5.0 and previous versions, so seeding the ran-
|
||||
dom number generator by assigning a value to RRAANNDDOOMM will
|
||||
produce the same sequence as in bash-5.0
|
||||
+o If the command hash table is empty, bash versions prior
|
||||
to bash-5.1 printed an informational message to that ef-
|
||||
fect, even when producing output that can be reused as
|
||||
input. Bash-5.1 suppresses that message when the --ll op-
|
||||
+o If the command hash table is empty, bash versions prior
|
||||
to bash-5.1 printed an informational message to that ef-
|
||||
fect, even when producing output that can be reused as
|
||||
input. Bash-5.1 suppresses that message when the --ll op-
|
||||
tion is supplied.
|
||||
|
||||
ccoommppaatt5511
|
||||
+o The uunnsseett builtin treats attempts to unset array sub-
|
||||
scripts @@ and ** differently depending on whether the ar-
|
||||
ray is indexed or associative, and differently than in
|
||||
+o The uunnsseett builtin treats attempts to unset array sub-
|
||||
scripts @@ and ** differently depending on whether the ar-
|
||||
ray is indexed or associative, and differently than in
|
||||
previous versions.
|
||||
|
||||
SSEEEE AALLSSOO
|
||||
|
||||
+349
-350
@@ -1,6 +1,6 @@
|
||||
%!PS-Adobe-3.0
|
||||
%%Creator: groff version 1.22.4
|
||||
%%CreationDate: Fri Apr 8 15:46:03 2022
|
||||
%%CreationDate: Mon Jun 13 11:04:35 2022
|
||||
%%DocumentNeededResources: font Times-Roman
|
||||
%%+ font Times-Bold
|
||||
%%+ font Times-Italic
|
||||
@@ -2782,195 +2782,194 @@ he)184 283.2 R/F3 10/Times-Italic@0 SF({varname})3.24 E F0(redi-)3.24 E
|
||||
(ving them open when the com-)-.2 F(mand completes.)184 307.2 Q F1
|
||||
(xpg_echo)144 324 Q F0(If set, the)184 336 Q F1(echo)2.5 E F0 -.2(bu)2.5
|
||||
G(iltin e).2 E(xpands backslash-escape sequences by def)-.15 E(ault.)-.1
|
||||
E F1(suspend)108 352.8 Q F0([)2.5 E F1<ad66>A F0(])A 1.001
|
||||
(Suspend the e)144 364.8 R -.15(xe)-.15 G 1.001
|
||||
(cution of this shell until it recei).15 F -.15(ve)-.25 G 3.501(sa).15 G
|
||||
F2(SIGCONT)A F0 3.502(signal. A)3.252 F 1.002(login shell cannot be)
|
||||
3.502 F .023(suspended; the)144 376.8 R F1<ad66>2.523 E F0 .023
|
||||
(option can be used to o)2.523 F -.15(ve)-.15 G .022
|
||||
(rride this and force the suspension.).15 F .022(The return status is)
|
||||
5.022 F 2.5(0u)144 388.8 S(nless the shell is a login shell and)-2.5 E
|
||||
F1<ad66>2.5 E F0(is not supplied, or if job control is not enabled.)2.5
|
||||
E F1(test)108 405.6 Q F3 -.2(ex)2.5 G(pr).2 E F1([)108 417.6 Q F3 -.2
|
||||
(ex)2.5 G(pr).2 E F1(])2.5 E F0 .877
|
||||
(Return a status of 0 \(true\) or 1 \(f)144 417.6 R .878
|
||||
(alse\) depending on the e)-.1 F -.25(va)-.25 G .878
|
||||
(luation of the conditional e).25 F(xpression)-.15 E F3 -.2(ex)144 429.6
|
||||
E F1(suspend)108 352.8 Q F0([)2.5 E F1<ad66>A F0(])A .909(Suspend the e)
|
||||
144 364.8 R -.15(xe)-.15 G .909(cution of this shell until it recei).15
|
||||
F -.15(ve)-.25 G 3.41(sa).15 G F2(SIGCONT)A F0 3.41(signal. A)3.16 F .91
|
||||
(login shell, or a shell)3.41 F .753
|
||||
(without job control enabled, cannot be suspended; the)144 376.8 R F1
|
||||
<ad66>3.253 E F0 .752(option can be used to o)3.252 F -.15(ve)-.15 G
|
||||
.752(rride this and).15 F .107(force the suspension.)144 388.8 R .107(T\
|
||||
he return status is 0 unless the shell is a login shell or job control \
|
||||
is not en-)5.107 F(abled and)144 400.8 Q F1<ad66>2.5 E F0
|
||||
(is not supplied.)2.5 E F1(test)108 417.6 Q F3 -.2(ex)2.5 G(pr).2 E F1
|
||||
([)108 429.6 Q F3 -.2(ex)2.5 G(pr).2 E F1(])2.5 E F0 .878
|
||||
(Return a status of 0 \(true\) or 1 \(f)144 429.6 R .877
|
||||
(alse\) depending on the e)-.1 F -.25(va)-.25 G .877
|
||||
(luation of the conditional e).25 F(xpression)-.15 E F3 -.2(ex)144 441.6
|
||||
S(pr).2 E F0 5.53(.E).73 G .53
|
||||
(ach operator and operand must be a separate ar)-5.53 F 3.03
|
||||
(gument. Expressions)-.18 F .53(are composed of the)3.03 F .072
|
||||
(primaries described in the)144 441.6 R F1(bash)2.573 E F0 .073
|
||||
(gument. Expressions)-.18 F .53(are composed of the)3.03 F .073
|
||||
(primaries described in the)144 453.6 R F1(bash)2.573 E F0 .073
|
||||
(manual page under)2.573 F F2(CONDITION)2.573 E .073(AL EXPRESSIONS)-.18
|
||||
F/F4 9/Times-Roman@0 SF(.)A F1(test)4.573 E F0 .073(does not)2.573 F
|
||||
.695(accept an)144 453.6 R 3.195(yo)-.15 G .695
|
||||
(ptions, nor does it accept and ignore an ar)-3.195 F .694(gument of)
|
||||
-.18 F F1<adad>3.194 E F0 .694(as signifying the end of op-)3.194 F
|
||||
(tions.)144 465.6 Q .785(Expressions may be combined using the follo)144
|
||||
483.6 R .786(wing operators, listed in decreasing order of prece-)-.25 F
|
||||
3.412(dence. The)144 495.6 R -.25(eva)3.412 G .912
|
||||
(luation depends on the number of ar).25 F .911(guments; see belo)-.18 F
|
||||
4.711 -.65(w. O)-.25 H .911(perator precedence is).65 F
|
||||
(used when there are \214v)144 507.6 Q 2.5(eo)-.15 G 2.5(rm)-2.5 G
|
||||
(ore ar)-2.5 E(guments.)-.18 E F1(!)144 519.6 Q F3 -.2(ex)2.5 G(pr).2 E
|
||||
F0 -.35(Tr)180 519.6 S(ue if).35 E F3 -.2(ex)2.5 G(pr).2 E F0(is f)3.23
|
||||
E(alse.)-.1 E F1(\()144 531.6 Q F3 -.2(ex)2.5 G(pr).2 E F1(\))2.5 E F0
|
||||
.26(Returns the v)180 531.6 R .26(alue of)-.25 F F3 -.2(ex)2.76 G(pr).2
|
||||
F/F4 9/Times-Roman@0 SF(.)A F1(test)4.573 E F0 .072(does not)2.572 F
|
||||
.694(accept an)144 465.6 R 3.194(yo)-.15 G .694
|
||||
(ptions, nor does it accept and ignore an ar)-3.194 F .695(gument of)
|
||||
-.18 F F1<adad>3.195 E F0 .695(as signifying the end of op-)3.195 F
|
||||
(tions.)144 477.6 Q .786(Expressions may be combined using the follo)144
|
||||
495.6 R .785(wing operators, listed in decreasing order of prece-)-.25 F
|
||||
3.411(dence. The)144 507.6 R -.25(eva)3.411 G .911
|
||||
(luation depends on the number of ar).25 F .912(guments; see belo)-.18 F
|
||||
4.712 -.65(w. O)-.25 H .912(perator precedence is).65 F
|
||||
(used when there are \214v)144 519.6 Q 2.5(eo)-.15 G 2.5(rm)-2.5 G
|
||||
(ore ar)-2.5 E(guments.)-.18 E F1(!)144 531.6 Q F3 -.2(ex)2.5 G(pr).2 E
|
||||
F0 -.35(Tr)180 531.6 S(ue if).35 E F3 -.2(ex)2.5 G(pr).2 E F0(is f)3.23
|
||||
E(alse.)-.1 E F1(\()144 543.6 Q F3 -.2(ex)2.5 G(pr).2 E F1(\))2.5 E F0
|
||||
.26(Returns the v)180 543.6 R .26(alue of)-.25 F F3 -.2(ex)2.76 G(pr).2
|
||||
E F0 5.26(.T)C .26(his may be used to o)-5.26 F -.15(ve)-.15 G .26
|
||||
(rride the normal precedence of opera-).15 F(tors.)180 543.6 Q F3 -.2
|
||||
(ex)144 555.6 S(pr1).2 E F0<ad>2.5 E F1(a)A F3 -.2(ex)2.5 G(pr2).2 E F0
|
||||
-.35(Tr)180 567.6 S(ue if both).35 E F3 -.2(ex)2.5 G(pr1).2 E F0(and)2.5
|
||||
E F3 -.2(ex)2.5 G(pr2).2 E F0(are true.)2.52 E F3 -.2(ex)144 579.6 S
|
||||
(rride the normal precedence of opera-).15 F(tors.)180 555.6 Q F3 -.2
|
||||
(ex)144 567.6 S(pr1).2 E F0<ad>2.5 E F1(a)A F3 -.2(ex)2.5 G(pr2).2 E F0
|
||||
-.35(Tr)180 579.6 S(ue if both).35 E F3 -.2(ex)2.5 G(pr1).2 E F0(and)2.5
|
||||
E F3 -.2(ex)2.5 G(pr2).2 E F0(are true.)2.52 E F3 -.2(ex)144 591.6 S
|
||||
(pr1).2 E F0<ad>2.5 E F1(o)A F3 -.2(ex)2.5 G(pr2).2 E F0 -.35(Tr)180
|
||||
591.6 S(ue if either).35 E F3 -.2(ex)2.5 G(pr1).2 E F0(or)2.5 E F3 -.2
|
||||
(ex)2.5 G(pr2).2 E F0(is true.)2.52 E F1(test)144 608.4 Q F0(and)2.5 E
|
||||
603.6 S(ue if either).35 E F3 -.2(ex)2.5 G(pr1).2 E F0(or)2.5 E F3 -.2
|
||||
(ex)2.5 G(pr2).2 E F0(is true.)2.52 E F1(test)144 620.4 Q F0(and)2.5 E
|
||||
F1([)2.5 E F0 -.25(eva)2.5 G(luate conditional e).25 E
|
||||
(xpressions using a set of rules based on the number of ar)-.15 E
|
||||
(guments.)-.18 E 2.5(0a)144 626.4 S -.18(rg)-2.5 G(uments).18 E(The e)
|
||||
180 638.4 Q(xpression is f)-.15 E(alse.)-.1 E 2.5(1a)144 650.4 S -.18
|
||||
(rg)-2.5 G(ument).18 E(The e)180 662.4 Q
|
||||
(guments.)-.18 E 2.5(0a)144 638.4 S -.18(rg)-2.5 G(uments).18 E(The e)
|
||||
180 650.4 Q(xpression is f)-.15 E(alse.)-.1 E 2.5(1a)144 662.4 S -.18
|
||||
(rg)-2.5 G(ument).18 E(The e)180 674.4 Q
|
||||
(xpression is true if and only if the ar)-.15 E(gument is not null.)-.18
|
||||
E 2.5(2a)144 674.4 S -.18(rg)-2.5 G(uments).18 E .37(If the \214rst ar)
|
||||
180 686.4 R .37(gument is)-.18 F F1(!)2.87 E F0 2.87(,t)C .37(he e)-2.87
|
||||
E 2.5(2a)144 686.4 S -.18(rg)-2.5 G(uments).18 E .37(If the \214rst ar)
|
||||
180 698.4 R .37(gument is)-.18 F F1(!)2.87 E F0 2.87(,t)C .37(he e)-2.87
|
||||
F .37(xpression is true if and only if the second ar)-.15 F .37
|
||||
(gument is null.)-.18 F .379(If the \214rst ar)180 698.4 R .38
|
||||
(gument is one of the unary conditional operators listed abo)-.18 F .68
|
||||
-.15(ve u)-.15 H(nder).15 E F2(CONDI-)2.88 E(TION)180 710.4 Q .553
|
||||
(AL EXPRESSIONS)-.18 F F4(,)A F0 .552(the e)2.802 F .552
|
||||
(xpression is true if the unary test is true.)-.15 F .552
|
||||
(If the \214rst ar)5.552 F(gu-)-.18 E(ment is not a v)180 722.4 Q
|
||||
(alid unary conditional operator)-.25 E 2.5(,t)-.4 G(he e)-2.5 E
|
||||
(xpression is f)-.15 E(alse.)-.1 E(GNU Bash 5.2)72 768 Q(2021 No)136.385
|
||||
E -.15(ve)-.15 G(mber 22).15 E(22)185.545 E 0 Cg EP
|
||||
(gument is null.)-.18 F .38(If the \214rst ar)180 710.4 R .38
|
||||
(gument is one of the unary conditional operators listed abo)-.18 F .679
|
||||
-.15(ve u)-.15 H(nder).15 E F2(CONDI-)2.879 E(TION)180 722.4 Q 2.264
|
||||
(AL EXPRESSIONS)-.18 F F4(,)A F0 2.264(the e)4.514 F 2.264
|
||||
(xpression is true if the unary test is true.)-.15 F 2.265
|
||||
(If the \214rst)7.265 F(GNU Bash 5.2)72 768 Q(2021 No)136.385 E -.15(ve)
|
||||
-.15 G(mber 22).15 E(22)185.545 E 0 Cg EP
|
||||
%%Page: 23 23
|
||||
%%BeginPageSetup
|
||||
BP
|
||||
%%EndPageSetup
|
||||
/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 87.61
|
||||
(TINS\(1\) General)-.92 F(Commands Manual)2.5 E -.35(BA)90.11 G(SH_B).35
|
||||
E(UIL)-.1 E(TINS\(1\))-.92 E 2.5(3a)144 84 S -.18(rg)-2.5 G(uments).18 E
|
||||
.236(The follo)180 96 R .236
|
||||
E(UIL)-.1 E(TINS\(1\))-.92 E(ar)180 84 Q(gument is not a v)-.18 E
|
||||
(alid unary conditional operator)-.25 E 2.5(,t)-.4 G(he e)-2.5 E
|
||||
(xpression is f)-.15 E(alse.)-.1 E 2.5(3a)144 96 S -.18(rg)-2.5 G
|
||||
(uments).18 E .236(The follo)180 108 R .236
|
||||
(wing conditions are applied in the order listed.)-.25 F .236
|
||||
(If the second ar)5.236 F .236(gument is one of)-.18 F .855
|
||||
(the binary conditional operators listed abo)180 108 R 1.155 -.15(ve u)
|
||||
(the binary conditional operators listed abo)180 120 R 1.155 -.15(ve u)
|
||||
-.15 H(nder).15 E/F1 9/Times-Bold@0 SF(CONDITION)3.355 E .855
|
||||
(AL EXPRESSIONS)-.18 F/F2 9/Times-Roman@0 SF(,)A F0(the)3.104 E .578
|
||||
(result of the e)180 120 R .578(xpression is the result of the binary t\
|
||||
est using the \214rst and third ar)-.15 F(guments)-.18 E 1.333
|
||||
(as operands.)180 132 R(The)6.333 E/F3 10/Times-Bold@0 SF<ad61>3.833 E
|
||||
F0(and)3.833 E F3<ad6f>3.832 E F0 1.332
|
||||
(AL EXPRESSIONS)-.18 F/F2 9/Times-Roman@0 SF(,)A F0(the)3.105 E .579
|
||||
(result of the e)180 132 R .578(xpression is the result of the binary t\
|
||||
est using the \214rst and third ar)-.15 F(guments)-.18 E 1.332
|
||||
(as operands.)180 144 R(The)6.332 E/F3 10/Times-Bold@0 SF<ad61>3.832 E
|
||||
F0(and)3.832 E F3<ad6f>3.832 E F0 1.333
|
||||
(operators are considered binary operators when there are)3.832 F .558
|
||||
(three ar)180 144 R 3.058(guments. If)-.18 F .558(the \214rst ar)3.058 F
|
||||
(three ar)180 156 R 3.058(guments. If)-.18 F .558(the \214rst ar)3.058 F
|
||||
.558(gument is)-.18 F F3(!)3.058 E F0 3.058(,t)C .558(he v)-3.058 F .558
|
||||
(alue is the ne)-.25 F -.05(ga)-.15 G .558(tion of the tw).05 F(o-ar)-.1
|
||||
E(gument)-.18 E .521(test using the second and third ar)180 156 R 3.021
|
||||
(guments. If)-.18 F .521(the \214rst ar)3.021 F .52(gument is e)-.18 F
|
||||
(xactly)-.15 E F3(\()3.02 E F0 .52(and the third)3.02 F(ar)180 168 Q
|
||||
E(gument)-.18 E .52(test using the second and third ar)180 168 R 3.021
|
||||
(guments. If)-.18 F .521(the \214rst ar)3.021 F .521(gument is e)-.18 F
|
||||
(xactly)-.15 E F3(\()3.021 E F0 .521(and the third)3.021 F(ar)180 180 Q
|
||||
.485(gument is e)-.18 F(xactly)-.15 E F3(\))2.985 E F0 2.985(,t)C .485
|
||||
(he result is the one-ar)-2.985 F .485(gument test of the second ar)-.18
|
||||
F 2.985(gument. Other)-.18 F(-)-.2 E(wise, the e)180 180 Q
|
||||
(xpression is f)-.15 E(alse.)-.1 E 2.5(4a)144 192 S -.18(rg)-2.5 G
|
||||
(uments).18 E .43(The follo)180 204 R .43
|
||||
(wing conditions are applied in the order listed.)-.25 F .429
|
||||
(If the \214rst ar)5.429 F .429(gument is)-.18 F F3(!)2.929 E F0 2.929
|
||||
(,t)C .429(he re-)-2.929 F 1.314(sult is the ne)180 216 R -.05(ga)-.15 G
|
||||
1.314(tion of the three-ar).05 F 1.314(gument e)-.18 F 1.314
|
||||
(xpression composed of the remaining ar)-.15 F(gu-)-.18 E 2.745
|
||||
(ments. the)180 228 R(tw)2.745 E(o-ar)-.1 E .245
|
||||
(gument test using the second and third ar)-.18 F 2.744(guments. If)-.18
|
||||
F .244(the \214rst ar)2.744 F(gument)-.18 E .309(is e)180 240 R(xactly)
|
||||
-.15 E F3(\()2.809 E F0 .309(and the fourth ar)2.809 F .309(gument is e)
|
||||
-.18 F(xactly)-.15 E F3(\))2.809 E F0 2.809(,t)C .31
|
||||
(he result is the tw)-2.809 F(o-ar)-.1 E .31(gument test of the)-.18 F
|
||||
.184(second and third ar)180 252 R 2.684(guments. Otherwise,)-.18 F .184
|
||||
(the e)2.684 F .183(xpression is parsed and e)-.15 F -.25(va)-.25 G .183
|
||||
(luated according).25 F(to precedence using the rules listed abo)180 264
|
||||
Q -.15(ve)-.15 G(.).15 E 2.5(5o)144 276 S 2.5(rm)-2.5 G(ore ar)-2.5 E
|
||||
(guments)-.18 E 1.635(The e)180 288 R 1.635(xpression is parsed and e)
|
||||
F 2.985(gument. Other)-.18 F(-)-.2 E(wise, the e)180 192 Q
|
||||
(xpression is f)-.15 E(alse.)-.1 E 2.5(4a)144 204 S -.18(rg)-2.5 G
|
||||
(uments).18 E .429(The follo)180 216 R .429
|
||||
(wing conditions are applied in the order listed.)-.25 F .43
|
||||
(If the \214rst ar)5.429 F .43(gument is)-.18 F F3(!)2.93 E F0 2.93(,t)C
|
||||
.43(he re-)-2.93 F 1.315(sult is the ne)180 228 R -.05(ga)-.15 G 1.314
|
||||
(tion of the three-ar).05 F 1.314(gument e)-.18 F 1.314
|
||||
(xpression composed of the remaining ar)-.15 F(gu-)-.18 E 2.744
|
||||
(ments. the)180 240 R(tw)2.744 E(o-ar)-.1 E .245
|
||||
(gument test using the second and third ar)-.18 F 2.745(guments. If)-.18
|
||||
F .245(the \214rst ar)2.745 F(gument)-.18 E .31(is e)180 252 R(xactly)
|
||||
-.15 E F3(\()2.81 E F0 .31(and the fourth ar)2.81 F .31(gument is e)-.18
|
||||
F(xactly)-.15 E F3(\))2.809 E F0 2.809(,t)C .309(he result is the tw)
|
||||
-2.809 F(o-ar)-.1 E .309(gument test of the)-.18 F .183
|
||||
(second and third ar)180 264 R 2.683(guments. Otherwise,)-.18 F .184
|
||||
(the e)2.684 F .184(xpression is parsed and e)-.15 F -.25(va)-.25 G .184
|
||||
(luated according).25 F(to precedence using the rules listed abo)180 276
|
||||
Q -.15(ve)-.15 G(.).15 E 2.5(5o)144 288 S 2.5(rm)-2.5 G(ore ar)-2.5 E
|
||||
(guments)-.18 E 1.635(The e)180 300 R 1.635(xpression is parsed and e)
|
||||
-.15 F -.25(va)-.25 G 1.635
|
||||
(luated according to precedence using the rules listed).25 F(abo)180 300
|
||||
Q -.15(ve)-.15 G(.).15 E(When used with)144 318 Q F3(test)2.5 E F0(or)
|
||||
(luated according to precedence using the rules listed).25 F(abo)180 312
|
||||
Q -.15(ve)-.15 G(.).15 E(When used with)144 330 Q F3(test)2.5 E F0(or)
|
||||
2.5 E F3([)2.5 E F0 2.5(,t)C(he)-2.5 E F3(<)2.5 E F0(and)2.5 E F3(>)2.5
|
||||
E F0(operators sort le)2.5 E(xicographically using ASCII ordering.)-.15
|
||||
E F3(times)108 334.8 Q F0 1.229(Print the accumulated user and system t\
|
||||
imes for the shell and for processes run from the shell.)144 334.8 R
|
||||
(The return status is 0.)144 346.8 Q F3(trap)108 363.6 Q F0([)2.5 E F3
|
||||
E F3(times)108 346.8 Q F0 1.229(Print the accumulated user and system t\
|
||||
imes for the shell and for processes run from the shell.)144 346.8 R
|
||||
(The return status is 0.)144 358.8 Q F3(trap)108 375.6 Q F0([)2.5 E F3
|
||||
(\255lp)A F0 2.5(][)C([)-2.5 E/F4 10/Times-Italic@0 SF(ar)A(g)-.37 E F0
|
||||
(])A F4(sigspec)2.5 E F0(...])2.5 E .682(The command)144 375.6 R F4(ar)
|
||||
3.512 E(g)-.37 E F0 .682(is to be read and e)3.402 F -.15(xe)-.15 G .682
|
||||
(cuted when the shell recei).15 F -.15(ve)-.25 G 3.183(ss).15 G
|
||||
(ignal\(s\))-3.183 E F4(sigspec)3.523 E F0 5.683(.I).31 G(f)-5.683 E F4
|
||||
(ar)3.513 E(g)-.37 E F0(is)3.403 E .609(absent \(and there is a single)
|
||||
144 387.6 R F4(sigspec)3.108 E F0 3.108(\)o)C(r)-3.108 E F3<ad>3.108 E
|
||||
(])A F4(sigspec)2.5 E F0(...])2.5 E .683(The command)144 387.6 R F4(ar)
|
||||
3.513 E(g)-.37 E F0 .683(is to be read and e)3.403 F -.15(xe)-.15 G .682
|
||||
(cuted when the shell recei).15 F -.15(ve)-.25 G 3.182(ss).15 G
|
||||
(ignal\(s\))-3.182 E F4(sigspec)3.522 E F0 5.682(.I).31 G(f)-5.682 E F4
|
||||
(ar)3.512 E(g)-.37 E F0(is)3.402 E .608(absent \(and there is a single)
|
||||
144 399.6 R F4(sigspec)3.108 E F0 3.108(\)o)C(r)-3.108 E F3<ad>3.108 E
|
||||
F0 3.108(,e)C .608
|
||||
(ach speci\214ed signal is reset to its original disposition)-3.108 F
|
||||
.658(\(the v)144 399.6 R .658(alue it had upon entrance to the shell\).)
|
||||
-.25 F(If)5.658 E F4(ar)3.488 E(g)-.37 E F0 .659
|
||||
.659(\(the v)144 411.6 R .659(alue it had upon entrance to the shell\).)
|
||||
-.25 F(If)5.658 E F4(ar)3.488 E(g)-.37 E F0 .658
|
||||
(is the null string the signal speci\214ed by each)3.378 F F4(sigspec)
|
||||
144.34 411.6 Q F0 .581
|
||||
(is ignored by the shell and by the commands it in)3.391 F -.2(vo)-.4 G
|
||||
-.1(ke).2 G 3.08(s. If).1 F F4(ar)3.41 E(g)-.37 E F0 .58
|
||||
(is not present and)3.3 F F3<ad70>3.08 E F0(has)3.08 E 1.214
|
||||
(been supplied, then the trap commands associated with each)144 423.6 R
|
||||
F4(sigspec)4.054 E F0 1.215(are displayed.)4.024 F 1.215(If no ar)6.215
|
||||
F(gu-)-.18 E .86(ments are supplied or if only)144 435.6 R F3<ad70>3.36
|
||||
144.34 423.6 Q F0 .58(is ignored by the shell and by the commands it in)
|
||||
3.39 F -.2(vo)-.4 G -.1(ke).2 G 3.081(s. If).1 F F4(ar)3.411 E(g)-.37 E
|
||||
F0 .581(is not present and)3.301 F F3<ad70>3.081 E F0(has)3.081 E 1.215
|
||||
(been supplied, then the trap commands associated with each)144 435.6 R
|
||||
F4(sigspec)4.054 E F0 1.214(are displayed.)4.024 F 1.214(If no ar)6.214
|
||||
F(gu-)-.18 E .86(ments are supplied or if only)144 447.6 R F3<ad70>3.36
|
||||
E F0 .86(is gi)3.36 F -.15(ve)-.25 G(n,).15 E F3(trap)3.36 E F0 .86
|
||||
(prints the list of commands associated with each)3.36 F 2.83
|
||||
(signal. The)144 447.6 R F3<ad6c>2.83 E F0 .33(option causes the shell \
|
||||
to print a list of signal names and their corresponding num-)2.83 F
|
||||
4.311(bers. Each)144 459.6 R F4(sigspec)4.651 E F0 1.811
|
||||
(is either a signal name de\214ned in <)4.621 F F4(signal.h)A F0 1.81
|
||||
(>, or a signal number)B 6.81(.S)-.55 G(ignal)-6.81 E
|
||||
(names are case insensiti)144 471.6 Q .3 -.15(ve a)-.25 H(nd the).15 E
|
||||
F1(SIG)2.5 E F0(pre\214x is optional.)2.25 E .666(If a)144 489.6 R F4
|
||||
(sigspec)3.506 E F0(is)3.476 E F1(EXIT)3.166 E F0 .666
|
||||
(\(0\) the command)2.916 F F4(ar)3.496 E(g)-.37 E F0 .666(is e)3.386 F
|
||||
-.15(xe)-.15 G .666(cuted on e).15 F .667(xit from the shell.)-.15 F
|
||||
.667(If a)5.667 F F4(sigspec)3.507 E F0(is)3.477 E F1(DE-)3.167 E -.09
|
||||
(BU)144 501.6 S(G).09 E F2(,)A F0 .484(the command)2.734 F F4(ar)3.314 E
|
||||
(g)-.37 E F0 .484(is e)3.204 F -.15(xe)-.15 G .484(cuted before e).15 F
|
||||
-.15(ve)-.25 G(ry).15 E F4 .483(simple command)2.984 F F0(,)A F4(for)
|
||||
2.983 E F0(command,)2.983 E F4(case)2.983 E F0(command,)2.983 E F4
|
||||
(select)144 513.6 Q F0 .562(command, e)3.062 F -.15(ve)-.25 G .563
|
||||
(signal. The)144 459.6 R F3<ad6c>2.83 E F0 .33(option causes the shell \
|
||||
to print a list of signal names and their corresponding num-)2.83 F 4.31
|
||||
(bers. Each)144 471.6 R F4(sigspec)4.65 E F0 1.811
|
||||
(is either a signal name de\214ned in <)4.62 F F4(signal.h)A F0 1.811
|
||||
(>, or a signal number)B 6.811(.S)-.55 G(ignal)-6.811 E
|
||||
(names are case insensiti)144 483.6 Q .3 -.15(ve a)-.25 H(nd the).15 E
|
||||
F1(SIG)2.5 E F0(pre\214x is optional.)2.25 E .667(If a)144 501.6 R F4
|
||||
(sigspec)3.507 E F0(is)3.477 E F1(EXIT)3.167 E F0 .667
|
||||
(\(0\) the command)2.917 F F4(ar)3.496 E(g)-.37 E F0 .666(is e)3.386 F
|
||||
-.15(xe)-.15 G .666(cuted on e).15 F .666(xit from the shell.)-.15 F
|
||||
.666(If a)5.666 F F4(sigspec)3.506 E F0(is)3.476 E F1(DE-)3.166 E -.09
|
||||
(BU)144 513.6 S(G).09 E F2(,)A F0 .483(the command)2.733 F F4(ar)3.313 E
|
||||
(g)-.37 E F0 .483(is e)3.203 F -.15(xe)-.15 G .484(cuted before e).15 F
|
||||
-.15(ve)-.25 G(ry).15 E F4 .484(simple command)2.984 F F0(,)A F4(for)
|
||||
2.984 E F0(command,)2.984 E F4(case)2.984 E F0(command,)2.984 E F4
|
||||
(select)144 525.6 Q F0 .563(command, e)3.063 F -.15(ve)-.25 G .563
|
||||
(ry arithmetic).15 F F4(for)3.063 E F0 .563
|
||||
(command, and before the \214rst command e)3.063 F -.15(xe)-.15 G .563
|
||||
(cutes in a shell).15 F .623(function \(see)144 525.6 R F1 .622
|
||||
(command, and before the \214rst command e)3.063 F -.15(xe)-.15 G .562
|
||||
(cutes in a shell).15 F .622(function \(see)144 537.6 R F1 .622
|
||||
(SHELL GRAMMAR)3.122 F F0(abo)2.872 E -.15(ve)-.15 G 3.122(\). Refer).15
|
||||
F .622(to the description of the)3.122 F F3(extdeb)3.122 E(ug)-.2 E F0
|
||||
.622(option to the)3.122 F F3(shopt)144 537.6 Q F0 -.2(bu)2.996 G .496
|
||||
.622(option to the)3.122 F F3(shopt)144 549.6 Q F0 -.2(bu)2.996 G .496
|
||||
(iltin for details of its ef).2 F .496(fect on the)-.25 F F3(DEB)2.996 E
|
||||
(UG)-.1 E F0 2.996(trap. If)2.996 F(a)2.996 E F4(sigspec)3.336 E F0(is)
|
||||
3.306 E F1(RETURN)2.996 E F2(,)A F0 .496(the command)2.746 F F4(ar)
|
||||
144.33 549.6 Q(g)-.37 E F0 .18(is e)2.9 F -.15(xe)-.15 G .18
|
||||
144.33 561.6 Q(g)-.37 E F0 .18(is e)2.9 F -.15(xe)-.15 G .18
|
||||
(cuted each time a shell function or a script e).15 F -.15(xe)-.15 G .18
|
||||
(cuted with the).15 F F3(.)2.68 E F0(or)2.68 E F3(sour)2.68 E(ce)-.18 E
|
||||
F0 -.2(bu)2.68 G .18(iltins \214nishes).2 F -.15(exe)144 561.6 S
|
||||
(cuting.).15 E .96(If a)144 579.6 R F4(sigspec)3.8 E F0(is)3.77 E F1
|
||||
(ERR)3.46 E F2(,)A F0 .96(the command)3.21 F F4(ar)3.791 E(g)-.37 E F0
|
||||
.961(is e)3.681 F -.15(xe)-.15 G .961(cuted whene).15 F -.15(ve)-.25 G
|
||||
3.461(rap).15 G .961(ipeline \(which may consist of a)-3.461 F .185(sin\
|
||||
F0 -.2(bu)2.68 G .18(iltins \214nishes).2 F -.15(exe)144 573.6 S
|
||||
(cuting.).15 E .961(If a)144 591.6 R F4(sigspec)3.801 E F0(is)3.771 E F1
|
||||
(ERR)3.461 E F2(,)A F0 .961(the command)3.211 F F4(ar)3.791 E(g)-.37 E
|
||||
F0 .961(is e)3.681 F -.15(xe)-.15 G .961(cuted whene).15 F -.15(ve)-.25
|
||||
G 3.461(ra).15 G .96(pipeline \(which may consist of a)-.001 F .185(sin\
|
||||
gle simple command\), a list, or a compound command returns a non\255ze\
|
||||
ro e)144 591.6 R .184(xit status, subject to)-.15 F .451(the follo)144
|
||||
603.6 R .451(wing conditions.)-.25 F(The)5.451 E F1(ERR)2.951 E F0 .451
|
||||
(trap is not e)2.701 F -.15(xe)-.15 G .451(cuted if the f).15 F .452
|
||||
(ailed command is part of the com-)-.1 F .388
|
||||
(mand list immediately follo)144 615.6 R .388(wing a)-.25 F F3(while)
|
||||
2.888 E F0(or)2.888 E F3(until)2.888 E F0 -.1(ke)2.888 G(yw)-.05 E .388
|
||||
(ord, part of the test in an)-.1 F F4(if)2.897 E F0 .387
|
||||
(statement, part)4.847 F .777(of a command e)144 627.6 R -.15(xe)-.15 G
|
||||
ro e)144 603.6 R .185(xit status, subject to)-.15 F .452(the follo)144
|
||||
615.6 R .452(wing conditions.)-.25 F(The)5.452 E F1(ERR)2.952 E F0 .451
|
||||
(trap is not e)2.701 F -.15(xe)-.15 G .451(cuted if the f).15 F .451
|
||||
(ailed command is part of the com-)-.1 F .387
|
||||
(mand list immediately follo)144 627.6 R .387(wing a)-.25 F F3(while)
|
||||
2.887 E F0(or)2.887 E F3(until)2.888 E F0 -.1(ke)2.888 G(yw)-.05 E .388
|
||||
(ord, part of the test in an)-.1 F F4(if)2.898 E F0 .388
|
||||
(statement, part)4.848 F .778(of a command e)144 639.6 R -.15(xe)-.15 G
|
||||
.778(cuted in a).15 F F3(&&)3.278 E F0(or)3.278 E F3(||)3.278 E F0 .778
|
||||
(list e)3.278 F .778(xcept the command follo)-.15 F .778
|
||||
(wing the \214nal)-.25 F F3(&&)3.278 E F0(or)3.278 E F3(||)3.278 E F0
|
||||
3.278(,a)C -.15(ny)-3.278 G 1.28(command in a pipeline b)144 639.6 R
|
||||
(wing the \214nal)-.25 F F3(&&)3.278 E F0(or)3.278 E F3(||)3.277 E F0
|
||||
3.277(,a)C -.15(ny)-3.277 G 1.28(command in a pipeline b)144 651.6 R
|
||||
1.28(ut the last, or if the command')-.2 F 3.78(sr)-.55 G 1.28(eturn v)
|
||||
-3.78 F 1.28(alue is being in)-.25 F -.15(ve)-.4 G 1.28(rted using).15 F
|
||||
F3(!)3.78 E F0(.)A(These are the same conditions obe)144 651.6 Q
|
||||
F3(!)3.78 E F0(.)A(These are the same conditions obe)144 663.6 Q
|
||||
(yed by the)-.15 E F3(err)2.5 E(exit)-.18 E F0(\()2.5 E F3<ad65>A F0 2.5
|
||||
(\)o)C(ption.)-2.5 E .132
|
||||
(\)o)C(ption.)-2.5 E .133
|
||||
(Signals ignored upon entry to the shell cannot be trapped or reset.)144
|
||||
669.6 R -.35(Tr)5.133 G .133(apped signals that are not be-).35 F .117
|
||||
(ing ignored are reset to their original v)144 681.6 R .117
|
||||
681.6 R -.35(Tr)5.132 G .132(apped signals that are not be-).35 F .117
|
||||
(ing ignored are reset to their original v)144 693.6 R .117
|
||||
(alues in a subshell or subshell en)-.25 F .117
|
||||
(vironment when one is cre-)-.4 F 2.5(ated. The)144 693.6 R
|
||||
(vironment when one is cre-)-.4 F 2.5(ated. The)144 705.6 R
|
||||
(return status is f)2.5 E(alse if an)-.1 E(y)-.15 E F4(sigspec)2.84 E F0
|
||||
(is in)2.81 E -.25(va)-.4 G(lid; otherwise).25 E F3(trap)2.5 E F0
|
||||
(returns true.)2.5 E(GNU Bash 5.2)72 768 Q(2021 No)136.385 E -.15(ve)
|
||||
@@ -2983,74 +2982,74 @@ BP
|
||||
(TINS\(1\) General)-.92 F(Commands Manual)2.5 E -.35(BA)90.11 G(SH_B).35
|
||||
E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10/Times-Bold@0 SF(type)108 84 Q F0([)
|
||||
2.5 E F1(\255aftpP)A F0(])A/F2 10/Times-Italic@0 SF(name)2.5 E F0([)2.5
|
||||
E F2(name)A F0(...])2.5 E -.4(Wi)144 96 S .173
|
||||
(th no options, indicate ho).4 F 2.673(we)-.25 G(ach)-2.673 E F2(name)
|
||||
3.033 E F0 -.1(wo)2.853 G .174
|
||||
(uld be interpreted if used as a command name.).1 F .174(If the)5.174 F
|
||||
E F2(name)A F0(...])2.5 E -.4(Wi)144 96 S .174
|
||||
(th no options, indicate ho).4 F 2.674(we)-.25 G(ach)-2.674 E F2(name)
|
||||
3.034 E F0 -.1(wo)2.854 G .173
|
||||
(uld be interpreted if used as a command name.).1 F .173(If the)5.173 F
|
||||
F1<ad74>144 108 Q F0 .715(option is used,)3.215 F F1(type)3.215 E F0
|
||||
.715(prints a string which is one of)3.215 F F2(alias)3.545 E F0(,).27 E
|
||||
F2 -.1(ke)3.215 G(ywor)-.2 E(d)-.37 E F0(,).77 E F2(function)5.185 E F0
|
||||
(,).24 E F2 -.2(bu)3.215 G(iltin).2 E F0 3.215(,o).24 G(r)-3.215 E F2
|
||||
(\214le)5.125 E F0(if)3.395 E F2(name)144.36 120 Q F0 .086
|
||||
(is an alias, shell reserv)2.766 F .086(ed w)-.15 F .086
|
||||
(ord, function, b)-.1 F .087(uiltin, or disk \214le, respecti)-.2 F -.15
|
||||
(ve)-.25 G(ly).15 E 5.087(.I)-.65 G 2.587(ft)-5.087 G(he)-2.587 E F2
|
||||
(name)2.947 E F0 .087(is not)2.767 F .119
|
||||
(\214le)5.125 E F0(if)3.395 E F2(name)144.36 120 Q F0 .087
|
||||
(is an alias, shell reserv)2.767 F .087(ed w)-.15 F .087
|
||||
(ord, function, b)-.1 F .086(uiltin, or disk \214le, respecti)-.2 F -.15
|
||||
(ve)-.25 G(ly).15 E 5.086(.I)-.65 G 2.586(ft)-5.086 G(he)-2.586 E F2
|
||||
(name)2.946 E F0 .086(is not)2.766 F .118
|
||||
(found, then nothing is printed, and an e)144 132 R .118
|
||||
(xit status of f)-.15 F .118(alse is returned.)-.1 F .118(If the)5.118 F
|
||||
F1<ad70>2.618 E F0 .118(option is used,)2.618 F F1(type)2.618 E F0 .855
|
||||
(xit status of f)-.15 F .118(alse is returned.)-.1 F .119(If the)5.119 F
|
||||
F1<ad70>2.619 E F0 .119(option is used,)2.619 F F1(type)2.619 E F0 .855
|
||||
(either returns the name of the disk \214le that w)144 144 R .855
|
||||
(ould be e)-.1 F -.15(xe)-.15 G .855(cuted if).15 F F2(name)3.715 E F0
|
||||
.855(were speci\214ed as a com-)3.535 F .529(mand name, or nothing if)
|
||||
.855(were speci\214ed as a com-)3.535 F .528(mand name, or nothing if)
|
||||
144 156 R/F3 10/Courier@0 SF .528(type -t name)3.028 F F0 -.1(wo)3.028 G
|
||||
.528(uld not return).1 F F2(\214le)4.938 E F0 5.528(.T).18 G(he)-5.528 E
|
||||
F1<ad50>3.028 E F0 .528(option forces a)3.028 F/F4 9/Times-Bold@0 SF
|
||||
-.666(PA)3.028 G(TH)-.189 E F0 .006(search for each)144 168 R F2(name)
|
||||
2.506 E F0 2.506(,e)C -.15(ve)-2.756 G 2.506(ni).15 G(f)-2.506 E F3 .007
|
||||
(type -t name)2.506 F F0 -.1(wo)2.507 G .007(uld not return).1 F F2
|
||||
(\214le)4.417 E F0 5.007(.I).18 G 2.507(fac)-5.007 G .007
|
||||
(ommand is hashed,)-2.507 F F1<ad70>2.507 E F0(and)144 180 Q F1<ad50>
|
||||
3.231 E F0 .731(print the hashed v)3.231 F .73
|
||||
F1<ad50>3.028 E F0 .529(option forces a)3.028 F/F4 9/Times-Bold@0 SF
|
||||
-.666(PA)3.029 G(TH)-.189 E F0 .007(search for each)144 168 R F2(name)
|
||||
2.507 E F0 2.507(,e)C -.15(ve)-2.757 G 2.507(ni).15 G(f)-2.507 E F3 .007
|
||||
(type -t name)2.507 F F0 -.1(wo)2.507 G .007(uld not return).1 F F2
|
||||
(\214le)4.417 E F0 5.006(.I).18 G 2.506(fac)-5.006 G .006
|
||||
(ommand is hashed,)-2.506 F F1<ad70>2.506 E F0(and)144 180 Q F1<ad50>
|
||||
3.23 E F0 .73(print the hashed v)3.23 F .731
|
||||
(alue, which is not necessarily the \214le that appears \214rst in)-.25
|
||||
F F4 -.666(PA)3.23 G(TH)-.189 E/F5 9/Times-Roman@0 SF(.)A F0 .73(If the)
|
||||
5.23 F F1<ad61>144 192 Q F0 .823(option is used,)3.323 F F1(type)3.323 E
|
||||
F0 .824(prints all of the places that contain an e)3.323 F -.15(xe)-.15
|
||||
G .824(cutable named).15 F F2(name)3.684 E F0 5.824(.T).18 G .824
|
||||
(his in-)-5.824 F 1.176
|
||||
F F4 -.666(PA)3.231 G(TH)-.189 E/F5 9/Times-Roman@0 SF(.)A F0 .731
|
||||
(If the)5.231 F F1<ad61>144 192 Q F0 .824(option is used,)3.324 F F1
|
||||
(type)3.324 E F0 .824(prints all of the places that contain an e)3.324 F
|
||||
-.15(xe)-.15 G .823(cutable named).15 F F2(name)3.683 E F0 5.823(.T).18
|
||||
G .823(his in-)-5.823 F 1.176
|
||||
(cludes aliases and functions, if and only if the)144 204 R F1<ad70>
|
||||
3.676 E F0 1.176(option is not also used.)3.676 F 1.176
|
||||
3.676 E F0 1.176(option is not also used.)3.676 F 1.177
|
||||
(The table of hashed)6.176 F 1.223(commands is not consulted when using)
|
||||
144 216 R F1<ad61>3.723 E F0 6.223(.T)C(he)-6.223 E F1<ad66>3.723 E F0
|
||||
1.223(option suppresses shell function lookup, as)3.723 F .326(with the)
|
||||
144 228 R F1(command)2.826 E F0 -.2(bu)2.826 G(iltin.).2 E F1(type)5.326
|
||||
E F0 .326(returns true if all of the ar)2.826 F .325
|
||||
(guments are found, f)-.18 F .325(alse if an)-.1 F 2.825(ya)-.15 G .325
|
||||
(re not)-2.825 F(found.)144 240 Q F1(ulimit)108 256.8 Q F0([)2.5 E F1
|
||||
1.223(option suppresses shell function lookup, as)3.723 F .325(with the)
|
||||
144 228 R F1(command)2.825 E F0 -.2(bu)2.825 G(iltin.).2 E F1(type)5.325
|
||||
E F0 .325(returns true if all of the ar)2.825 F .326
|
||||
(guments are found, f)-.18 F .326(alse if an)-.1 F 2.826(ya)-.15 G .326
|
||||
(re not)-2.826 F(found.)144 240 Q F1(ulimit)108 256.8 Q F0([)2.5 E F1
|
||||
(\255HS)A F0(])A F1<ad61>2.5 E(ulimit)108 268.8 Q F0([)2.5 E F1(\255HS)A
|
||||
F0 2.5(][)C F1(\255bcde\214klmnpqrstuvxPR)-2.5 E(T)-.4 E F0([)2.5 E F2
|
||||
(limit)A F0(]])A(Pro)144 280.8 Q .243(vides control o)-.15 F -.15(ve)
|
||||
-.15 G 2.743(rt).15 G .243(he resources a)-2.743 F -.25(va)-.2 G .244
|
||||
(limit)A F0(]])A(Pro)144 280.8 Q .244(vides control o)-.15 F -.15(ve)
|
||||
-.15 G 2.744(rt).15 G .244(he resources a)-2.744 F -.25(va)-.2 G .244
|
||||
(ilable to the shell and to processes started by it, on systems).25 F
|
||||
.944(that allo)144 292.8 R 3.444(ws)-.25 G .944(uch control.)-3.444 F
|
||||
(The)5.944 E F1<ad48>3.444 E F0(and)3.444 E F1<ad53>3.444 E F0 .943
|
||||
.943(that allo)144 292.8 R 3.443(ws)-.25 G .943(uch control.)-3.443 F
|
||||
(The)5.943 E F1<ad48>3.443 E F0(and)3.443 E F1<ad53>3.444 E F0 .944
|
||||
(options specify that the hard or soft limit is set for the)3.444 F(gi)
|
||||
144 304.8 Q -.15(ve)-.25 G 2.708(nr).15 G 2.708(esource. A)-2.708 F .208
|
||||
144 304.8 Q -.15(ve)-.25 G 2.709(nr).15 G 2.709(esource. A)-2.709 F .208
|
||||
(hard limit cannot be increased by a non-root user once it is set; a so\
|
||||
ft limit may)2.708 F .426(be increased up to the v)144 316.8 R .426
|
||||
(alue of the hard limit.)-.25 F .425(If neither)5.426 F F1<ad48>2.925 E
|
||||
F0(nor)2.925 E F1<ad53>2.925 E F0 .425
|
||||
(is speci\214ed, both the soft and)2.925 F .139(hard limits are set.)144
|
||||
ft limit may)2.709 F .425(be increased up to the v)144 316.8 R .425
|
||||
(alue of the hard limit.)-.25 F .426(If neither)5.425 F F1<ad48>2.926 E
|
||||
F0(nor)2.926 E F1<ad53>2.926 E F0 .426
|
||||
(is speci\214ed, both the soft and)2.926 F .139(hard limits are set.)144
|
||||
328.8 R .139(The v)5.139 F .139(alue of)-.25 F F2(limit)2.729 E F0 .139
|
||||
(can be a number in the unit speci\214ed for the resource or one)3.319 F
|
||||
.742(of the special v)144 340.8 R(alues)-.25 E F1(hard)3.242 E F0(,)A F1
|
||||
.741(of the special v)144 340.8 R(alues)-.25 E F1(hard)3.241 E F0(,)A F1
|
||||
(soft)3.241 E F0 3.241(,o)C(r)-3.241 E F1(unlimited)3.241 E F0 3.241(,w)
|
||||
C .741(hich stand for the current hard limit, the current)-3.241 F .023
|
||||
C .741(hich stand for the current hard limit, the current)-3.241 F .024
|
||||
(soft limit, and no limit, respecti)144 352.8 R -.15(ve)-.25 G(ly).15 E
|
||||
5.023(.I)-.65 G(f)-5.023 E F2(limit)2.613 E F0 .023
|
||||
(is omitted, the current v)3.203 F .023
|
||||
(alue of the soft limit of the re-)-.25 F .985
|
||||
(source is printed, unless the)144 364.8 R F1<ad48>3.485 E F0 .984
|
||||
(option is gi)3.485 F -.15(ve)-.25 G 3.484(n. When).15 F .984
|
||||
(alue of the soft limit of the re-)-.25 F .984
|
||||
(source is printed, unless the)144 364.8 R F1<ad48>3.484 E F0 .984
|
||||
(option is gi)3.484 F -.15(ve)-.25 G 3.484(n. When).15 F .985
|
||||
(more than one resource is speci\214ed, the)3.484 F .7
|
||||
(limit name and unit, if appropriate, are printed before the v)144 376.8
|
||||
R 3.2(alue. Other)-.25 F .7(options are interpreted as)3.2 F(follo)144
|
||||
@@ -3072,7 +3071,7 @@ Q F0(The maximum size of a process')180 436.8 Q 2.5(sd)-.55 G(ata se)
|
||||
(The maximum resident set size \(man)180 508.8 Q 2.5(ys)-.15 G
|
||||
(ystems do not honor this limit\))-2.5 E F1<ad6e>144 520.8 Q F0 .791(Th\
|
||||
e maximum number of open \214le descriptors \(most systems do not allo)
|
||||
180 520.8 R 3.29(wt)-.25 G .79(his v)-3.29 F .79(alue to)-.25 F
|
||||
180 520.8 R 3.291(wt)-.25 G .791(his v)-3.291 F .791(alue to)-.25 F
|
||||
(be set\))180 532.8 Q F1<ad70>144 544.8 Q F0
|
||||
(The pipe size in 512-byte blocks \(this may not be set\))180 544.8 Q F1
|
||||
<ad71>144 556.8 Q F0
|
||||
@@ -3092,18 +3091,18 @@ Q F1<ad73>144 580.8 Q F0(The maximum stack size)180 580.8 Q F1<ad74>144
|
||||
E F0 .468(is gi)3.648 F -.15(ve)-.25 G .468(n, and the).15 F F1<ad61>
|
||||
2.968 E F0 .468(option is not used,)2.968 F F2(limit)2.968 E F0 .468
|
||||
(is the ne)2.968 F 2.968(wv)-.25 G .468
|
||||
(alue of the speci\214ed resource.)-3.218 F(If)5.468 E .044
|
||||
(no option is gi)144 705.6 R -.15(ve)-.25 G .044(n, then).15 F F1<ad66>
|
||||
2.544 E F0 .045(is assumed.)2.545 F -1.11(Va)5.045 G .045
|
||||
(lues are in 1024-byte increments, e)1.11 F .045(xcept for)-.15 F F1
|
||||
<ad74>2.545 E F0 2.545(,w)C .045(hich is)-2.545 F .67(in seconds;)144
|
||||
(alue of the speci\214ed resource.)-3.218 F(If)5.468 E .045
|
||||
(no option is gi)144 705.6 R -.15(ve)-.25 G .045(n, then).15 F F1<ad66>
|
||||
2.545 E F0 .045(is assumed.)2.545 F -1.11(Va)5.045 G .045
|
||||
(lues are in 1024-byte increments, e)1.11 F .044(xcept for)-.15 F F1
|
||||
<ad74>2.544 E F0 2.544(,w)C .044(hich is)-2.544 F .67(in seconds;)144
|
||||
717.6 R F1<ad52>3.17 E F0 3.17(,w)C .67(hich is in microseconds;)-3.17 F
|
||||
F1<ad70>3.17 E F0 3.17(,w)C .67(hich is in units of 512-byte blocks;)
|
||||
-3.17 F F1<ad50>3.17 E F0(,)A F1<ad54>3.17 E F0(,)A F1<ad62>3.17 E F0(,)
|
||||
A F1<ad6b>144 729.6 Q F0(,)A F1<ad6e>3.736 E F0 3.736(,a)C(nd)-3.736 E
|
||||
A F1<ad6b>144 729.6 Q F0(,)A F1<ad6e>3.737 E F0 3.737(,a)C(nd)-3.737 E
|
||||
F1<ad75>3.736 E F0 3.736(,w)C 1.236(hich are unscaled v)-3.736 F 1.236
|
||||
(alues; and, when in posix mode,)-.25 F F1<ad63>3.736 E F0(and)3.736 E
|
||||
F1<ad66>3.736 E F0 3.736(,w)C 1.237(hich are in)-3.736 F(GNU Bash 5.2)72
|
||||
F1<ad66>3.736 E F0 3.736(,w)C 1.236(hich are in)-3.736 F(GNU Bash 5.2)72
|
||||
768 Q(2021 No)136.385 E -.15(ve)-.15 G(mber 22).15 E(24)185.545 E 0 Cg
|
||||
EP
|
||||
%%Page: 25 25
|
||||
@@ -3112,8 +3111,8 @@ BP
|
||||
%%EndPageSetup
|
||||
/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 87.61
|
||||
(TINS\(1\) General)-.92 F(Commands Manual)2.5 E -.35(BA)90.11 G(SH_B).35
|
||||
E(UIL)-.1 E(TINS\(1\))-.92 E .239(512-byte increments.)144 84 R .238
|
||||
(The return status is 0 unless an in)5.239 F -.25(va)-.4 G .238
|
||||
E(UIL)-.1 E(TINS\(1\))-.92 E .238(512-byte increments.)144 84 R .238
|
||||
(The return status is 0 unless an in)5.238 F -.25(va)-.4 G .238
|
||||
(lid option or ar).25 F .238(gument is supplied, or an)-.18 F
|
||||
(error occurs while setting a ne)144 96 Q 2.5(wl)-.25 G(imit.)-2.5 E/F1
|
||||
10/Times-Bold@0 SF(umask)108 112.8 Q F0([)2.5 E F1<ad70>A F0 2.5(][)C F1
|
||||
@@ -3123,87 +3122,87 @@ E(UIL)-.1 E(TINS\(1\))-.92 E .239(512-byte increments.)144 84 R .238
|
||||
(gins with a digit, it is interpreted as an octal)-.15 F .066(number; o\
|
||||
therwise it is interpreted as a symbolic mode mask similar to that acce\
|
||||
pted by)144 136.8 R F2 -.15(ch)2.566 G(mod).15 E F0(\(1\).).77 E(If)144
|
||||
148.8 Q F2(mode)3.262 E F0 .382(is omitted, the current v)3.062 F .382
|
||||
148.8 Q F2(mode)3.263 E F0 .382(is omitted, the current v)3.063 F .382
|
||||
(alue of the mask is printed.)-.25 F(The)5.382 E F1<ad53>2.882 E F0 .382
|
||||
(option causes the mask to be)2.882 F .547
|
||||
(printed in symbolic form; the def)144 160.8 R .547
|
||||
(ault output is an octal number)-.1 F 5.547(.I)-.55 G 3.047(ft)-5.547 G
|
||||
(he)-3.047 E F1<ad70>3.047 E F0 .547(option is supplied, and)3.047 F F2
|
||||
(mode)144.38 172.8 Q F0 .551
|
||||
(is omitted, the output is in a form that may be reused as input.)3.231
|
||||
F .552(The return status is 0 if the)5.552 F(mode w)144 184.8 Q
|
||||
(mode)144.38 172.8 Q F0 .552
|
||||
(is omitted, the output is in a form that may be reused as input.)3.232
|
||||
F .551(The return status is 0 if the)5.551 F(mode w)144 184.8 Q
|
||||
(as successfully changed or if no)-.1 E F2(mode)2.5 E F0(ar)2.5 E
|
||||
(gument w)-.18 E(as supplied, and f)-.1 E(alse otherwise.)-.1 E F1
|
||||
(unalias)108 201.6 Q F0<5bad>2.5 E F1(a)A F0 2.5(][)C F2(name)-2.5 E F0
|
||||
(...])2.5 E(Remo)144 213.6 Q 1.058 -.15(ve e)-.15 H(ach).15 E F2(name)
|
||||
3.258 E F0 .758(from the list of de\214ned aliases.)3.258 F(If)5.758 E
|
||||
F1<ad61>3.258 E F0 .757(is supplied, all alias de\214nitions are re-)
|
||||
(...])2.5 E(Remo)144 213.6 Q 1.057 -.15(ve e)-.15 H(ach).15 E F2(name)
|
||||
3.257 E F0 .757(from the list of de\214ned aliases.)3.257 F(If)5.758 E
|
||||
F1<ad61>3.258 E F0 .758(is supplied, all alias de\214nitions are re-)
|
||||
3.258 F(mo)144 225.6 Q -.15(ve)-.15 G 2.5(d. The).15 F(return v)2.5 E
|
||||
(alue is true unless a supplied)-.25 E F2(name)2.86 E F0
|
||||
(is not a de\214ned alias.)2.68 E F1(unset)108 242.4 Q F0<5bad>2.5 E F1
|
||||
(fv)A F0 2.5(][)C<ad>-2.5 E F1(n)A F0 2.5(][)C F2(name)-2.5 E F0(...])
|
||||
2.5 E -.15(Fo)144 254.4 S 3.803(re).15 G(ach)-3.803 E F2(name)4.163 E F0
|
||||
3.803(,r).18 G(emo)-3.803 E 1.603 -.15(ve t)-.15 H 1.303
|
||||
2.5 E -.15(Fo)144 254.4 S 3.804(re).15 G(ach)-3.804 E F2(name)4.164 E F0
|
||||
3.804(,r).18 G(emo)-3.804 E 1.604 -.15(ve t)-.15 H 1.304
|
||||
(he corresponding v).15 F 1.303(ariable or function.)-.25 F 1.303
|
||||
(If the)6.303 F F1<ad76>3.804 E F0 1.304(option is gi)3.804 F -.15(ve)
|
||||
-.25 G 1.304(n, each).15 F F2(name)144.36 266.4 Q F0 .465
|
||||
(refers to a shell v)3.145 F .464(ariable, and that v)-.25 F .464
|
||||
(ariable is remo)-.25 F -.15(ve)-.15 G 2.964(d. Read-only).15 F -.25(va)
|
||||
2.964 G .464(riables may not be un-).25 F 2.768(set. If)144 278.4 R F1
|
||||
<ad66>2.768 E F0 .269(is speci\214ed, each)2.768 F F2(name)3.129 E F0
|
||||
(If the)6.303 F F1<ad76>3.803 E F0 1.303(option is gi)3.803 F -.15(ve)
|
||||
-.25 G 1.303(n, each).15 F F2(name)144.36 266.4 Q F0 .464
|
||||
(refers to a shell v)3.144 F .464(ariable, and that v)-.25 F .464
|
||||
(ariable is remo)-.25 F -.15(ve)-.15 G 2.965(d. Read-only).15 F -.25(va)
|
||||
2.965 G .465(riables may not be un-).25 F 2.769(set. If)144 278.4 R F1
|
||||
<ad66>2.769 E F0 .269(is speci\214ed, each)2.769 F F2(name)3.129 E F0
|
||||
.269(refers to a shell function, and the function de\214nition is remo)
|
||||
2.949 F -.15(ve)-.15 G(d.).15 E .404(If the)144 290.4 R F1<ad6e>2.904 E
|
||||
2.949 F -.15(ve)-.15 G(d.).15 E .403(If the)144 290.4 R F1<ad6e>2.903 E
|
||||
F0 .404(option is supplied, and)2.904 F F2(name)2.904 E F0 .404(is a v)
|
||||
2.904 F .404(ariable with the)-.25 F F2(namer)2.904 E(ef)-.37 E F0
|
||||
(attrib)2.904 E(ute,)-.2 E F2(name)2.904 E F0 .403(will be unset)2.904 F
|
||||
.719(rather than the v)144 302.4 R .719(ariable it references.)-.25 F F1
|
||||
<ad6e>5.719 E F0 .719(has no ef)3.219 F .719(fect if the)-.25 F F1<ad66>
|
||||
3.22 E F0 .72(option is supplied.)3.22 F .72(If no options)5.72 F .737
|
||||
(are supplied, each)144 314.4 R F2(name)3.237 E F0 .737(refers to a v)
|
||||
3.237 F .737(ariable; if there is no v)-.25 F .736
|
||||
(ariable by that name, a function with)-.25 F 1.761(that name, if an)144
|
||||
326.4 R 3.061 -.65(y, i)-.15 H 4.261(su).65 G 4.261(nset. Each)-4.261 F
|
||||
(attrib)2.904 E(ute,)-.2 E F2(name)2.904 E F0 .404(will be unset)2.904 F
|
||||
.72(rather than the v)144 302.4 R .72(ariable it references.)-.25 F F1
|
||||
<ad6e>5.72 E F0 .72(has no ef)3.22 F .719(fect if the)-.25 F F1<ad66>
|
||||
3.219 E F0 .719(option is supplied.)3.219 F .719(If no options)5.719 F
|
||||
.736(are supplied, each)144 314.4 R F2(name)3.236 E F0 .736
|
||||
(refers to a v)3.236 F .737(ariable; if there is no v)-.25 F .737
|
||||
(ariable by that name, a function with)-.25 F 1.762(that name, if an)144
|
||||
326.4 R 3.062 -.65(y, i)-.15 H 4.262(su).65 G 4.261(nset. Each)-4.262 F
|
||||
1.761(unset v)4.261 F 1.761(ariable or function is remo)-.25 F -.15(ve)
|
||||
-.15 G 4.262(df).15 G 1.762(rom the en)-4.262 F(vironment)-.4 E 3.172
|
||||
-.15 G 4.261(df).15 G 1.761(rom the en)-4.261 F(vironment)-.4 E 3.171
|
||||
(passed to subsequent commands.)144 338.4 R 3.172(If an)8.172 F 5.672
|
||||
(yo)-.15 G(f)-5.672 E/F3 9/Times-Bold@0 SF -.27(BA)5.672 G(SH_ALIASES)
|
||||
.27 E/F4 9/Times-Roman@0 SF(,)A F3 -.27(BA)5.421 G(SH_ARGV0).27 E F4(,)A
|
||||
F3 -.27(BA)5.421 G(SH_CMDS).27 E F4(,)A F3 -.27(BA)144 350.4 S
|
||||
(SH_COMMAND).27 E F4(,)A F3 -.27(BA)11.481 G(SH_SUBSHELL).27 E F4(,)A F3
|
||||
.27 E/F4 9/Times-Roman@0 SF(,)A F3 -.27(BA)5.422 G(SH_ARGV0).27 E F4(,)A
|
||||
F3 -.27(BA)5.422 G(SH_CMDS).27 E F4(,)A F3 -.27(BA)144 350.4 S
|
||||
(SH_COMMAND).27 E F4(,)A F3 -.27(BA)11.482 G(SH_SUBSHELL).27 E F4(,)A F3
|
||||
-.27(BA)11.482 G(SHPID).27 E F4(,)A F3(COMP_W)11.482 E(ORDBREAKS)-.09 E
|
||||
F4(,)A F3(DIRST)11.482 E -.495(AC)-.81 G(K).495 E F4(,)A F3(EPOCHREAL)
|
||||
F4(,)A F3(DIRST)11.481 E -.495(AC)-.81 G(K).495 E F4(,)A F3(EPOCHREAL)
|
||||
144 362.4 Q(TIME)-.828 E F4(,)A F3(EPOCHSECONDS)2.67 E F4(,)A F3(FUNCN)
|
||||
2.67 E(AME)-.18 E F4(,)A F3(GR)2.67 E(OUPS)-.27 E F4(,)A F3(HISTCMD)2.67
|
||||
E F4(,)A F3(LINENO)2.67 E F4(,)A F3(RANDOM)2.67 E F4(,)A F3(SECONDS)144
|
||||
374.4 Q F4(,)A F0(or)4.029 E F3(SRANDOM)4.279 E F0 1.779(are unset, the)
|
||||
4.029 F 4.279(yl)-.15 G 1.779(ose their special properties, e)-4.279 F
|
||||
-.15(ve)-.25 G 4.279(ni).15 G 4.28(ft)-4.279 G(he)-4.28 E 4.28(ya)-.15 G
|
||||
1.78(re subse-)-4.28 F(quently reset.)144 386.4 Q(The e)5 E
|
||||
374.4 Q F4(,)A F0(or)4.03 E F3(SRANDOM)4.28 E F0 1.779(are unset, the)
|
||||
4.03 F 4.279(yl)-.15 G 1.779(ose their special properties, e)-4.279 F
|
||||
-.15(ve)-.25 G 4.279(ni).15 G 4.279(ft)-4.279 G(he)-4.279 E 4.279(ya)
|
||||
-.15 G 1.779(re subse-)-4.279 F(quently reset.)144 386.4 Q(The e)5 E
|
||||
(xit status is true unless a)-.15 E F2(name)2.86 E F0
|
||||
(is readonly or may not be unset.)2.68 E F1(wait)108 403.2 Q F0([)2.5 E
|
||||
F1(\255fn)A F0 2.5(][)C F1<ad70>-2.5 E F2(varname)2.5 E F0 2.5(][)C F2
|
||||
(id ...)-2.5 E F0(])A -.8(Wa)144 415.2 S .659(it for each speci\214ed c\
|
||||
hild process and return its termination status.).8 F(Each)5.659 E F2(id)
|
||||
3.169 E F0 .658(may be a process)3.928 F .008
|
||||
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 427.2 R -.15(ve)
|
||||
-.25 G .009(n, all processes in that job').15 F 2.509(sp)-.55 G .009
|
||||
(ipeline are w)-2.509 F .009(aited for)-.1 F 5.009(.I)-.55 G(f)-5.009 E
|
||||
F2(id)144.01 439.2 Q F0 .442(is not gi)3.712 F -.15(ve)-.25 G(n,).15 E
|
||||
F1(wait)2.942 E F0 -.1(wa)2.942 G .441
|
||||
-.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 439.2 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
|
||||
.441(cuted process substitu-).15 F .597
|
||||
.442(cuted process substitu-).15 F .598
|
||||
(tion, if its process id is the same as)144 451.2 R F1($!)3.098 E F0
|
||||
3.098(,a)C .598(nd the return status is zero.)-3.098 F .598(If the)5.598
|
||||
F F1<ad6e>3.098 E F0 .598(option is supplied,)3.098 F F1(wait)144 463.2
|
||||
Q F0 -.1(wa)3.083 G .583(its for a single job from the list of).1 F F2
|
||||
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 463.2
|
||||
Q F0 -.1(wa)3.082 G .583(its for a single job from the list of).1 F F2
|
||||
(id)3.083 E F0 3.083(so)C 1.383 -.4(r, i)-3.083 H 3.083(fn).4 G(o)-3.083
|
||||
E F2(id)3.083 E F0 3.083(sa)C .583(re supplied, an)-3.083 F 3.083(yj)
|
||||
-.15 G .582(ob, to complete and)-3.083 F .403(returns its e)144 475.2 R
|
||||
.403(xit status.)-.15 F .403(If none of the supplied ar)5.403 F .403
|
||||
(guments is a child of the shell, or if no ar)-.18 F(guments)-.18 E .573
|
||||
-.15 G .583(ob, to complete and)-3.083 F .404(returns its e)144 475.2 R
|
||||
.404(xit status.)-.15 F .403(If none of the supplied ar)5.403 F .403
|
||||
(guments is a child of the shell, or if no ar)-.18 F(guments)-.18 E .572
|
||||
(are supplied and the shell has no unw)144 487.2 R .573
|
||||
(aited-for children, the e)-.1 F .573(xit status is 127.)-.15 F .572
|
||||
(If the)5.573 F F1<ad70>3.072 E F0 .572(option is)3.072 F .39
|
||||
(aited-for children, the e)-.1 F .573(xit status is 127.)-.15 F .573
|
||||
(If the)5.573 F F1<ad70>3.073 E F0 .573(option is)3.073 F .39
|
||||
(supplied, the process or job identi\214er of the job for which the e)
|
||||
144 499.2 R .39(xit status is returned is assigned to)-.15 F .905(the v)
|
||||
144 511.2 R(ariable)-.25 E F2(varname)3.405 E F0 .905
|
||||
@@ -3212,51 +3211,51 @@ E F2(id)3.083 E F0 3.083(sa)C .583(re supplied, an)-3.083 F 3.083(yj)
|
||||
(an)144 523.2 Q 3.89(ya)-.15 G 3.89(ssignment. This)-3.89 F 1.39
|
||||
(is useful only when the)3.89 F F1<ad6e>3.89 E F0 1.39
|
||||
(option is supplied.)3.89 F 1.39(Supplying the)6.39 F F1<ad66>3.89 E F0
|
||||
(option,)3.89 E .575(when job control is enabled, forces)144 535.2 R F1
|
||||
(option,)3.89 E .574(when job control is enabled, forces)144 535.2 R F1
|
||||
(wait)3.075 E F0 .575(to w)3.075 F .575(ait for)-.1 F F2(id)3.075 E F0
|
||||
.574(to terminate before returning its status, in-)3.075 F .635
|
||||
.575(to terminate before returning its status, in-)3.075 F .635
|
||||
(stead of returning when it changes status.)144 547.2 R(If)5.635 E F2
|
||||
(id)3.145 E F0 .635(speci\214es a non-e)3.905 F .635
|
||||
(xistent process or job, the return)-.15 F(status is 127.)144 559.2 Q
|
||||
(Otherwise, the return status is the e)5 E
|
||||
(xit status of the last process or job w)-.15 E(aited for)-.1 E(.)-.55 E
|
||||
/F5 10.95/Times-Bold@0 SF(SHELL COMP)72 576 Q -1.04(AT)-.81 G
|
||||
(IBILITY MODE)1.04 E F0 1.355(Bash-4.0 introduced the concept of a)108
|
||||
(IBILITY MODE)1.04 E F0 1.354(Bash-4.0 introduced the concept of a)108
|
||||
588 R F2 1.355(shell compatibility le)3.855 F(vel)-.15 E F0 3.855(,s)C
|
||||
1.354(peci\214ed as a set of options to the shopt)-3.855 F -.2(bu)108
|
||||
600 S .398(iltin \().2 F F1(compat31)2.898 E F0(,)A F1(compat32)2.898 E
|
||||
F0(,)A F1(compat40)2.898 E F0(,)A F1(compat41)2.898 E F0 2.898(,a)C .399
|
||||
(nd so on\).)-2.898 F .399(There is only one current compatibility)5.399
|
||||
F(le)108 612 Q -.15(ve)-.25 G 3.254(l-).15 G 3.254(-e)-3.254 G .754
|
||||
(ach option is mutually e)-3.254 F(xclusi)-.15 E -.15(ve)-.25 G 5.754
|
||||
(.T).15 G .754(he compatibility le)-5.754 F -.15(ve)-.25 G 3.253(li).15
|
||||
G 3.253(si)-3.253 G .753(ntended to allo)-3.253 F 3.253(wu)-.25 G .753
|
||||
(sers to select be-)-3.253 F(ha)108 624 Q 1.083(vior from pre)-.2 F
|
||||
1.083(vious v)-.25 F 1.083(ersions that is incompatible with ne)-.15 F
|
||||
1.083(wer v)-.25 F 1.083(ersions while the)-.15 F 3.584(ym)-.15 G 1.084
|
||||
(igrate scripts to use)-3.584 F(current features and beha)108 636 Q
|
||||
1.355(peci\214ed as a set of options to the shopt)-3.855 F -.2(bu)108
|
||||
600 S .399(iltin \().2 F F1(compat31)2.899 E F0(,)A F1(compat32)2.899 E
|
||||
F0(,)A F1(compat40)2.899 E F0(,)A F1(compat41)2.899 E F0 2.899(,a)C .399
|
||||
(nd so on\).)-2.899 F .398(There is only one current compatibility)5.398
|
||||
F(le)108 612 Q -.15(ve)-.25 G 3.253(l-).15 G 3.253(-e)-3.253 G .753
|
||||
(ach option is mutually e)-3.253 F(xclusi)-.15 E -.15(ve)-.25 G 5.753
|
||||
(.T).15 G .753(he compatibility le)-5.753 F -.15(ve)-.25 G 3.254(li).15
|
||||
G 3.254(si)-3.254 G .754(ntended to allo)-3.254 F 3.254(wu)-.25 G .754
|
||||
(sers to select be-)-3.254 F(ha)108 624 Q 1.084(vior from pre)-.2 F
|
||||
1.084(vious v)-.25 F 1.083(ersions that is incompatible with ne)-.15 F
|
||||
1.083(wer v)-.25 F 1.083(ersions while the)-.15 F 3.583(ym)-.15 G 1.083
|
||||
(igrate scripts to use)-3.583 F(current features and beha)108 636 Q
|
||||
(vior)-.2 E 2.5(.I)-.55 G(t')-2.5 E 2.5(si)-.55 G
|
||||
(ntended to be a temporary solution.)-2.5 E 1.457
|
||||
(ntended to be a temporary solution.)-2.5 E 1.456
|
||||
(This section does not mention beha)108 652.8 R 1.457
|
||||
(vior that is standard for a particular v)-.2 F 1.456
|
||||
(ersion \(e.g., setting)-.15 F F1(compat32)3.956 E F0 .886
|
||||
(vior that is standard for a particular v)-.2 F 1.457
|
||||
(ersion \(e.g., setting)-.15 F F1(compat32)3.957 E F0 .887
|
||||
(means that quoting the rhs of the re)108 664.8 R(ge)-.15 E .886
|
||||
(xp matching operator quotes special re)-.15 F(ge)-.15 E .887
|
||||
(xp matching operator quotes special re)-.15 F(ge)-.15 E .886
|
||||
(xp characters in the w)-.15 F(ord,)-.1 E(which is def)108 676.8 Q
|
||||
(ault beha)-.1 E(vior in bash-3.2 and abo)-.2 E -.15(ve)-.15 G(\).).15 E
|
||||
.523(If a user enables, say)108 693.6 R(,)-.65 E F1(compat32)3.023 E F0
|
||||
.522(If a user enables, say)108 693.6 R(,)-.65 E F1(compat32)3.023 E F0
|
||||
3.023(,i)C 3.023(tm)-3.023 G .523(ay af)-3.023 F .523(fect the beha)-.25
|
||||
F .523(vior of other compatibility le)-.2 F -.15(ve)-.25 G .522
|
||||
(ls up to and includ-).15 F .259(ing the current compatibility le)108
|
||||
705.6 R -.15(ve)-.25 G 2.759(l. The).15 F .259
|
||||
(idea is that each compatibility le)2.759 F -.15(ve)-.25 G 2.76(lc).15 G
|
||||
.26(ontrols beha)-2.76 F .26(vior that changed)-.2 F 1.646(in that v)108
|
||||
717.6 R 1.646(ersion of)-.15 F F1(bash)4.146 E F0 4.146(,b)C 1.646
|
||||
(ut that beha)-4.346 F 1.646(vior may ha)-.2 F 1.946 -.15(ve b)-.2 H
|
||||
1.646(een present in earlier v).15 F 4.146(ersions. F)-.15 F 1.645
|
||||
(or instance, the)-.15 F .76
|
||||
F .523(vior of other compatibility le)-.2 F -.15(ve)-.25 G .523
|
||||
(ls up to and includ-).15 F .26(ing the current compatibility le)108
|
||||
705.6 R -.15(ve)-.25 G 2.76(l. The).15 F .259
|
||||
(idea is that each compatibility le)2.759 F -.15(ve)-.25 G 2.759(lc).15
|
||||
G .259(ontrols beha)-2.759 F .259(vior that changed)-.2 F 1.645
|
||||
(in that v)108 717.6 R 1.646(ersion of)-.15 F F1(bash)4.146 E F0 4.146
|
||||
(,b)C 1.646(ut that beha)-4.346 F 1.646(vior may ha)-.2 F 1.946 -.15
|
||||
(ve b)-.2 H 1.646(een present in earlier v).15 F 4.146(ersions. F)-.15 F
|
||||
1.646(or instance, the)-.15 F .761
|
||||
(change to use locale-based comparisons with the)108 729.6 R F1([[)3.261
|
||||
E F0 .761(command came in bash-4.1, and earlier v)3.261 F .761
|
||||
E F0 .76(command came in bash-4.1, and earlier v)3.261 F .76
|
||||
(ersions used)-.15 F(GNU Bash 5.2)72 768 Q(2021 No)136.385 E -.15(ve)
|
||||
-.15 G(mber 22).15 E(25)185.545 E 0 Cg EP
|
||||
%%Page: 26 26
|
||||
@@ -3265,42 +3264,42 @@ BP
|
||||
%%EndPageSetup
|
||||
/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 87.61
|
||||
(TINS\(1\) General)-.92 F(Commands Manual)2.5 E -.35(BA)90.11 G(SH_B).35
|
||||
E(UIL)-.1 E(TINS\(1\))-.92 E 1.905(ASCII-based comparisons, so enabling)
|
||||
108 84 R/F1 10/Times-Bold@0 SF(compat32)4.405 E F0 1.904
|
||||
(will enable ASCII-based comparisons as well.)4.405 F(That)6.904 E .295
|
||||
E(UIL)-.1 E(TINS\(1\))-.92 E 1.904(ASCII-based comparisons, so enabling)
|
||||
108 84 R/F1 10/Times-Bold@0 SF(compat32)4.404 E F0 1.905
|
||||
(will enable ASCII-based comparisons as well.)4.404 F(That)6.905 E .296
|
||||
(granularity may not be suf)108 96 R .296
|
||||
(\214cient for all uses, and as a result users should emplo)-.25 F 2.796
|
||||
(yc)-.1 G .296(ompatibility le)-2.796 F -.15(ve)-.25 G .296(ls care-).15
|
||||
(yc)-.1 G .295(ompatibility le)-2.796 F -.15(ve)-.25 G .295(ls care-).15
|
||||
F(fully)108 108 Q 5(.R)-.65 G(ead the documentation for a particular fe\
|
||||
ature to \214nd out the current beha)-5 E(vior)-.2 E(.)-.55 E .532
|
||||
(Bash-4.3 introduced a ne)108 124.8 R 3.032(ws)-.25 G .531(hell v)-3.032
|
||||
ature to \214nd out the current beha)-5 E(vior)-.2 E(.)-.55 E .531
|
||||
(Bash-4.3 introduced a ne)108 124.8 R 3.031(ws)-.25 G .531(hell v)-3.031
|
||||
F(ariable:)-.25 E/F2 9/Times-Bold@0 SF -.27(BA)3.031 G(SH_COMP).27 E
|
||||
-.855(AT)-.666 G/F3 9/Times-Roman@0 SF(.).855 E F0 .531(The v)5.031 F
|
||||
.531(alue assigned to this v)-.25 F .531(ariable \(a decimal)-.25 F -.15
|
||||
(ve)108 136.8 S .107(rsion number lik).15 F 2.607(e4)-.1 G .107
|
||||
(.2, or an inte)-2.607 F .107(ger corresponding to the)-.15 F F1(compat)
|
||||
2.608 E/F4 10/Times-Italic@0 SF(NN)A F0 .108(option, lik)2.608 F 2.608
|
||||
(e4)-.1 G .108(2\) determines the com-)-2.608 F(patibility le)108 148.8
|
||||
Q -.15(ve)-.25 G(l.).15 E .388(Starting with bash-4.4, Bash has be)108
|
||||
.531(alue assigned to this v)-.25 F .532(ariable \(a decimal)-.25 F -.15
|
||||
(ve)108 136.8 S .108(rsion number lik).15 F 2.608(e4)-.1 G .108
|
||||
(.2, or an inte)-2.608 F .108(ger corresponding to the)-.15 F F1(compat)
|
||||
2.607 E/F4 10/Times-Italic@0 SF(NN)A F0 .107(option, lik)2.607 F 2.607
|
||||
(e4)-.1 G .107(2\) determines the com-)-2.607 F(patibility le)108 148.8
|
||||
Q -.15(ve)-.25 G(l.).15 E .387(Starting with bash-4.4, Bash has be)108
|
||||
165.6 R .388(gun deprecating older compatibility le)-.15 F -.15(ve)-.25
|
||||
G 2.887(ls. Ev).15 F(entually)-.15 E 2.887(,t)-.65 G .387
|
||||
(he options will)-2.887 F(be remo)108 177.6 Q -.15(ve)-.15 G 2.5(di).15
|
||||
G 2.888(ls. Ev).15 F(entually)-.15 E 2.888(,t)-.65 G .388
|
||||
(he options will)-2.888 F(be remo)108 177.6 Q -.15(ve)-.15 G 2.5(di).15
|
||||
G 2.5(nf)-2.5 G -.2(avo)-2.6 G 2.5(ro).2 G(f)-2.5 E F2 -.27(BA)2.5 G
|
||||
(SH_COMP).27 E -.855(AT)-.666 G F3(.).855 E F0 1.163
|
||||
(Bash-5.0 is the \214nal v)108 194.4 R 1.163
|
||||
(ersion for which there will be an indi)-.15 F 1.164
|
||||
(vidual shopt option for the pre)-.25 F 1.164(vious v)-.25 F(ersion.)
|
||||
(SH_COMP).27 E -.855(AT)-.666 G F3(.).855 E F0 1.164
|
||||
(Bash-5.0 is the \214nal v)108 194.4 R 1.164
|
||||
(ersion for which there will be an indi)-.15 F 1.163
|
||||
(vidual shopt option for the pre)-.25 F 1.163(vious v)-.25 F(ersion.)
|
||||
-.15 E(Users should use)108 206.4 Q F2 -.27(BA)2.5 G(SH_COMP).27 E -.855
|
||||
(AT)-.666 G F0(on bash-5.0 and later v)3.105 E(ersions.)-.15 E 1.614
|
||||
(AT)-.666 G F0(on bash-5.0 and later v)3.105 E(ersions.)-.15 E 1.613
|
||||
(The follo)108 223.2 R 1.613(wing table describes the beha)-.25 F 1.613
|
||||
(vior changes controlled by each compatibility le)-.2 F -.15(ve)-.25 G
|
||||
4.113(ls).15 G 4.113(etting. The)-4.113 F F1(compat)108 235.2 Q F4(NN)A
|
||||
F0 1.186(tag is used as shorthand for setting the compatibility le)3.685
|
||||
4.113(ls).15 G 4.114(etting. The)-4.113 F F1(compat)108 235.2 Q F4(NN)A
|
||||
F0 1.186(tag is used as shorthand for setting the compatibility le)3.686
|
||||
F -.15(ve)-.25 G 3.686(lt).15 G(o)-3.686 E F4(NN)3.686 E F0 1.186
|
||||
(using one of the follo)3.686 F(wing)-.25 E 3.807(mechanisms. F)108
|
||||
247.2 R 1.307(or v)-.15 F 1.307
|
||||
(using one of the follo)3.686 F(wing)-.25 E 3.806(mechanisms. F)108
|
||||
247.2 R 1.306(or v)-.15 F 1.306
|
||||
(ersions prior to bash-5.0, the compatibility le)-.15 F -.15(ve)-.25 G
|
||||
3.806(lm).15 G 1.306(ay be set using the corresponding)-3.806 F F1
|
||||
3.807(lm).15 G 1.307(ay be set using the corresponding)-3.807 F F1
|
||||
(compat)108 259.2 Q F4(NN)A F0 .502(shopt option.)3.002 F -.15(Fo)5.502
|
||||
G 3.002(rb).15 G .502(ash-4.3 and later v)-3.002 F .502(ersions, the)
|
||||
-.15 F F2 -.27(BA)3.002 G(SH_COMP).27 E -.855(AT)-.666 G F0 -.25(va)
|
||||
@@ -3311,63 +3310,63 @@ G 3.002(rb).15 G .502(ash-4.3 and later v)-3.002 F .502(ersions, the)
|
||||
2.5(pm).15 G(atching operator \(=~\) has no special ef)-2.5 E(fect)-.25
|
||||
E F1(compat32)108 316.8 Q F0<83>144 328.8 Q .35
|
||||
(interrupting a command list such as "a ; b ; c" causes the e)180 328.8
|
||||
R -.15(xe)-.15 G .35(cution of the ne).15 F .35(xt command)-.15 F .017
|
||||
R -.15(xe)-.15 G .35(cution of the ne).15 F .35(xt command)-.15 F .018
|
||||
(in the list \(in bash-4.0 and later v)180 340.8 R .018
|
||||
(ersions, the shell acts as if it recei)-.15 F -.15(ve)-.25 G 2.518(dt)
|
||||
.15 G .018(he interrupt, so in-)-2.518 F
|
||||
(ersions, the shell acts as if it recei)-.15 F -.15(ve)-.25 G 2.517(dt)
|
||||
.15 G .017(he interrupt, so in-)-2.517 F
|
||||
(terrupting one command in a list aborts the e)180 352.8 Q -.15(xe)-.15
|
||||
G(cution of the entire list\)).15 E F1(compat40)108 369.6 Q F0<83>144
|
||||
381.6 Q(the)180 381.6 Q F1(<)2.674 E F0(and)2.674 E F1(>)2.673 E F0 .173
|
||||
381.6 Q(the)180 381.6 Q F1(<)2.673 E F0(and)2.673 E F1(>)2.673 E F0 .173
|
||||
(operators to the)2.673 F F1([[)2.673 E F0 .173
|
||||
(command do not consider the current locale when compar)2.673 F(-)-.2 E
|
||||
.067(ing strings; the)180 393.6 R 2.567(yu)-.15 G .067
|
||||
(se ASCII ordering.)-2.567 F .068(Bash v)5.068 F .068
|
||||
.068(ing strings; the)180 393.6 R 2.568(yu)-.15 G .068
|
||||
(se ASCII ordering.)-2.568 F .068(Bash v)5.068 F .067
|
||||
(ersions prior to bash-4.1 use ASCII collation)-.15 F(and)180 405.6 Q F4
|
||||
(str)4.743 E(cmp)-.37 E F0 1.903
|
||||
(\(3\); bash-4.1 and later use the current locale').19 F 4.402(sc)-.55 G
|
||||
1.902(ollation sequence and)-4.402 F F4(str)4.742 E(-)-.2 E(coll)180
|
||||
(str)4.742 E(cmp)-.37 E F0 1.902
|
||||
(\(3\); bash-4.1 and later use the current locale').19 F 4.403(sc)-.55 G
|
||||
1.903(ollation sequence and)-4.403 F F4(str)4.743 E(-)-.2 E(coll)180
|
||||
417.6 Q F0(\(3\).).51 E F1(compat41)108 434.4 Q F0<83>144 446.4 Q(in)180
|
||||
446.4 Q F4(posix)3.79 E F0(mode,)3.79 E F1(time)3.79 E F0 1.29
|
||||
(may be follo)3.79 F 1.29
|
||||
(wed by options and still be recognized as a reserv)-.25 F(ed)-.15 E -.1
|
||||
(wo)180 458.4 S(rd \(this is POSIX interpretation 267\)).1 E<83>144
|
||||
470.4 Q(in)180 470.4 Q F4(posix)2.709 E F0 .208
|
||||
(mode, the parser requires that an e)2.709 F -.15(ve)-.25 G 2.708(nn).15
|
||||
G .208(umber of single quotes occur in the)-2.708 F F4(wor)2.708 E(d)
|
||||
-.37 E F0 .281(portion of a double-quoted parameter e)180 482.4 R .282
|
||||
(xpansion and treats them specially)-.15 F 2.782(,s)-.65 G 2.782(ot)
|
||||
-2.782 G .282(hat charac-)-2.782 F(ters within the single quotes are co\
|
||||
470.4 Q(in)180 470.4 Q F4(posix)2.708 E F0 .208
|
||||
(mode, the parser requires that an e)2.708 F -.15(ve)-.25 G 2.708(nn).15
|
||||
G .208(umber of single quotes occur in the)-2.708 F F4(wor)2.709 E(d)
|
||||
-.37 E F0 .282(portion of a double-quoted parameter e)180 482.4 R .282
|
||||
(xpansion and treats them specially)-.15 F 2.781(,s)-.65 G 2.781(ot)
|
||||
-2.781 G .281(hat charac-)-2.781 F(ters within the single quotes are co\
|
||||
nsidered quoted \(this is POSIX interpretation 221\))180 494.4 Q F1
|
||||
(compat42)108 511.2 Q F0<83>144 523.2 Q 1.056(the replacement string in\
|
||||
double-quoted pattern substitution does not under)180 523.2 R 1.055
|
||||
(compat42)108 511.2 Q F0<83>144 523.2 Q 1.055(the replacement string in\
|
||||
double-quoted pattern substitution does not under)180 523.2 R 1.056
|
||||
(go quote re-)-.18 F(mo)180 535.2 Q -.25(va)-.15 G(l, as it does in v)
|
||||
.25 E(ersions after bash-4.2)-.15 E<83>144 547.2 Q .021
|
||||
(in posix mode, single quotes are considered special when e)180 547.2 R
|
||||
.021(xpanding the)-.15 F F4(wor)2.521 E(d)-.37 E F0 .021(portion of a)
|
||||
2.521 F .018(double-quoted parameter e)180 559.2 R .017
|
||||
.021(xpanding the)-.15 F F4(wor)2.52 E(d)-.37 E F0 .02(portion of a)2.52
|
||||
F .017(double-quoted parameter e)180 559.2 R .017
|
||||
(xpansion and can be used to quote a closing brace or other spe-)-.15 F
|
||||
.998(cial character \(this is part of POSIX interpretation 221\); in la\
|
||||
ter v)180 571.2 R .999(ersions, single quotes)-.15 F
|
||||
.999(cial character \(this is part of POSIX interpretation 221\); in la\
|
||||
ter v)180 571.2 R .998(ersions, single quotes)-.15 F
|
||||
(are not special within double-quoted w)180 583.2 Q(ord e)-.1 E
|
||||
(xpansions)-.15 E F1(compat43)108 600 Q F0<83>144 612 Q 1.071
|
||||
(the shell does not print a w)180 612 R 1.07
|
||||
(arning message if an attempt is made to use a quoted com-)-.1 F .248
|
||||
(pound assignment as an ar)180 624 R .249
|
||||
(gument to declare \(declare -a foo='\(1 2\)'\). Later v)-.18 F .249
|
||||
(xpansions)-.15 E F1(compat43)108 600 Q F0<83>144 612 Q 1.07
|
||||
(the shell does not print a w)180 612 R 1.071
|
||||
(arning message if an attempt is made to use a quoted com-)-.1 F .249
|
||||
(pound assignment as an ar)180 624 R .248
|
||||
(gument to declare \(declare -a foo='\(1 2\)'\). Later v)-.18 F .248
|
||||
(ersions w)-.15 F(arn)-.1 E(that this usage is deprecated)180 636 Q<83>
|
||||
144 648 Q -.1(wo)180 648 S .501(rd e).1 F .501
|
||||
144 648 Q -.1(wo)180 648 S .5(rd e).1 F .501
|
||||
(xpansion errors are considered non-f)-.15 F .501
|
||||
(atal errors that cause the current command to)-.1 F -.1(fa)180 660 S
|
||||
.605(il, e).1 F -.15(ve)-.25 G 3.105(ni).15 G 3.105(np)-3.105 G .605
|
||||
(osix mode \(the def)-3.105 F .605(ault beha)-.1 F .605(vior is to mak)
|
||||
-.2 F 3.105(et)-.1 G .605(hem f)-3.105 F .605
|
||||
(atal errors that cause the)-.1 F(shell to e)180 672 Q(xit\))-.15 E<83>
|
||||
144 684 Q .355(when e)180 684 R -.15(xe)-.15 G .354
|
||||
(cuting a shell function, the loop state \(while/until/etc.\)).15 F .354
|
||||
(is not reset, so)5.354 F F1(br)2.854 E(eak)-.18 E F0(or)2.854 E F1
|
||||
144 684 Q .354(when e)180 684 R -.15(xe)-.15 G .354
|
||||
(cuting a shell function, the loop state \(while/until/etc.\)).15 F .355
|
||||
(is not reset, so)5.354 F F1(br)2.855 E(eak)-.18 E F0(or)2.855 E F1
|
||||
(continue)180 696 Q F0 .052
|
||||
(in that function will break or continue loops in the calling conte)
|
||||
2.552 F .053(xt. Bash-4.4 and)-.15 F(later reset the loop state to pre)
|
||||
2.553 F .052(xt. Bash-4.4 and)-.15 F(later reset the loop state to pre)
|
||||
180 708 Q -.15(ve)-.25 G(nt this).15 E(GNU Bash 5.2)72 768 Q(2021 No)
|
||||
136.385 E -.15(ve)-.15 G(mber 22).15 E(26)185.545 E 0 Cg EP
|
||||
%%Page: 27 27
|
||||
@@ -3379,42 +3378,42 @@ BP
|
||||
E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10/Times-Bold@0 SF(compat44)108 84 Q F0
|
||||
<83>144 96 Q .719(the shell sets up the v)180 96 R .719(alues used by)
|
||||
-.25 F/F2 9/Times-Bold@0 SF -.27(BA)3.219 G(SH_ARGV).27 E F0(and)2.969 E
|
||||
F2 -.27(BA)3.219 G(SH_ARGC).27 E F0 .719(so the)2.969 F 3.218(yc)-.15 G
|
||||
.718(an e)-3.218 F(xpand)-.15 E(to the shell')180 108 Q 2.5(sp)-.55 G
|
||||
F2 -.27(BA)3.219 G(SH_ARGC).27 E F0 .719(so the)2.969 F 3.219(yc)-.15 G
|
||||
.719(an e)-3.219 F(xpand)-.15 E(to the shell')180 108 Q 2.5(sp)-.55 G
|
||||
(ositional parameters e)-2.5 E -.15(ve)-.25 G 2.5(ni).15 G 2.5(fe)-2.5 G
|
||||
(xtended deb)-2.65 E(ugging mode is not enabled)-.2 E<83>144 120 Q 2.634
|
||||
(as)180 120 S .134(ubshell inherits loops from its parent conte)-2.634 F
|
||||
(xtended deb)-2.65 E(ugging mode is not enabled)-.2 E<83>144 120 Q 2.635
|
||||
(as)180 120 S .135(ubshell inherits loops from its parent conte)-2.635 F
|
||||
.135(xt, so)-.15 F F1(br)2.635 E(eak)-.18 E F0(or)2.635 E F1(continue)
|
||||
2.635 E F0 .135(will cause the sub-)2.635 F(shell to e)180 132 Q 2.5
|
||||
2.634 E F0 .134(will cause the sub-)2.634 F(shell to e)180 132 Q 2.5
|
||||
(xit. Bash-5.0)-.15 F(and later reset the loop state to pre)2.5 E -.15
|
||||
(ve)-.25 G(nt the e).15 E(xit)-.15 E<83>144 144 Q -.25(va)180 144 S .619
|
||||
(ve)-.25 G(nt the e).15 E(xit)-.15 E<83>144 144 Q -.25(va)180 144 S .618
|
||||
(riable assignments preceding b).25 F .618(uiltins lik)-.2 F(e)-.1 E F1
|
||||
(export)3.118 E F0(and)3.118 E F1 -.18(re)3.118 G(adonly).18 E F0 .618
|
||||
(that set attrib)3.118 F .618(utes con-)-.2 F .119(tinue to af)180 156 R
|
||||
.119(fect v)-.25 F .119(ariables with the same name in the calling en)
|
||||
-.25 F .12(vironment e)-.4 F -.15(ve)-.25 G 2.62(ni).15 G 2.62(ft)-2.62
|
||||
G .12(he shell is)-2.62 F(not in posix mode)180 168 Q F1(compat50)108
|
||||
184.8 Q F0<83>144 196.8 Q 1.209(Bash-5.1 changed the w)180 196.8 R(ay)
|
||||
-.1 E F2($RANDOM)3.709 E F0 1.209
|
||||
(is generated to introduce slightly more random-)3.459 F 1.018
|
||||
(that set attrib)3.118 F .619(utes con-)-.2 F .12(tinue to af)180 156 R
|
||||
.12(fect v)-.25 F .119(ariables with the same name in the calling en)
|
||||
-.25 F .119(vironment e)-.4 F -.15(ve)-.25 G 2.619(ni).15 G 2.619(ft)
|
||||
-2.619 G .119(he shell is)-2.619 F(not in posix mode)180 168 Q F1
|
||||
(compat50)108 184.8 Q F0<83>144 196.8 Q 1.209(Bash-5.1 changed the w)180
|
||||
196.8 R(ay)-.1 E F2($RANDOM)3.709 E F0 1.209
|
||||
(is generated to introduce slightly more random-)3.459 F 1.019
|
||||
(ness. If the shell compatibility le)180 208.8 R -.15(ve)-.25 G 3.518
|
||||
(li).15 G 3.518(ss)-3.518 G 1.018(et to 50 or lo)-3.518 F(wer)-.25 E
|
||||
3.518(,i)-.4 G 3.518(tr)-3.518 G -2.15 -.25(ev e)-3.518 H 1.019
|
||||
(rts to the method from).25 F .733(bash-5.0 and pre)180 220.8 R .733
|
||||
(vious v)-.25 F .732
|
||||
3.518(,i)-.4 G 3.518(tr)-3.518 G -2.15 -.25(ev e)-3.518 H 1.018
|
||||
(rts to the method from).25 F .732(bash-5.0 and pre)180 220.8 R .732
|
||||
(vious v)-.25 F .733
|
||||
(ersions, so seeding the random number generator by assigning a)-.15 F
|
||||
-.25(va)180 232.8 S(lue to).25 E F2(RANDOM)2.5 E F0
|
||||
(will produce the same sequence as in bash-5.0)2.25 E<83>144 244.8 Q
|
||||
.695(If the command hash table is empty)180 244.8 R 3.196(,b)-.65 G .696
|
||||
(ash v)-3.196 F .696(ersions prior to bash-5.1 printed an informa-)-.15
|
||||
F 1.321(tional message to that ef)180 256.8 R 1.321(fect, e)-.25 F -.15
|
||||
.696(If the command hash table is empty)180 244.8 R 3.196(,b)-.65 G .696
|
||||
(ash v)-3.196 F .695(ersions prior to bash-5.1 printed an informa-)-.15
|
||||
F 1.32(tional message to that ef)180 256.8 R 1.321(fect, e)-.25 F -.15
|
||||
(ve)-.25 G 3.821(nw).15 G 1.321
|
||||
(hen producing output that can be reused as input.)-3.821 F
|
||||
(Bash-5.1 suppresses that message when the)180 268.8 Q F1<ad6c>2.5 E F0
|
||||
(option is supplied.)2.5 E F1(compat51)108 285.6 Q F0<83>144 297.6 Q
|
||||
(The)180 297.6 Q F1(unset)2.954 E F0 -.2(bu)2.954 G .454
|
||||
(iltin treats attempts to unset array subscripts).2 F F1(@)2.955 E F0
|
||||
(and)2.955 E F1(*)2.955 E F0(dif)2.955 E .455(ferently depending)-.25 F
|
||||
(The)180 297.6 Q F1(unset)2.955 E F0 -.2(bu)2.955 G .455
|
||||
(iltin treats attempts to unset array subscripts).2 F F1(@)2.954 E F0
|
||||
(and)2.954 E F1(*)2.954 E F0(dif)2.954 E .454(ferently depending)-.25 F
|
||||
(on whether the array is inde)180 309.6 Q -.15(xe)-.15 G 2.5(do).15 G
|
||||
2.5(ra)-2.5 G(ssociati)-2.5 E -.15(ve)-.25 G 2.5(,a).15 G(nd dif)-2.5 E
|
||||
(ferently than in pre)-.25 E(vious v)-.25 E(ersions.)-.15 E/F3 10.95
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
%!PS-Adobe-3.0
|
||||
%%Creator: groff version 1.22.4
|
||||
%%CreationDate: Fri Apr 8 15:46:03 2022
|
||||
%%CreationDate: Mon Jun 13 11:04:35 2022
|
||||
%%DocumentNeededResources: font Times-Roman
|
||||
%%+ font Times-Bold
|
||||
%%DocumentSuppliedResources: procset grops 1.22 4
|
||||
|
||||
+3
-3
@@ -2,10 +2,10 @@
|
||||
Copyright (C) 1988-2022 Free Software Foundation, Inc.
|
||||
@end ignore
|
||||
|
||||
@set LASTCHANGE Thu Feb 24 14:43:35 EST 2022
|
||||
@set LASTCHANGE Fri Jun 3 10:47:05 EDT 2022
|
||||
|
||||
@set EDITION 5.2
|
||||
@set VERSION 5.2
|
||||
|
||||
@set UPDATED 24 February 2022
|
||||
@set UPDATED-MONTH February 2022
|
||||
@set UPDATED 3 June 2022
|
||||
@set UPDATED-MONTH June 2022
|
||||
|
||||
@@ -249,7 +249,7 @@ pushd.c: ${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 $@ $<
|
||||
$(SHOBJ_CC) -Wno-format-security -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)
|
||||
@@ -262,7 +262,7 @@ mostlyclean: clean
|
||||
-( cd perl && ${MAKE} ${MFLAGS} $@ )
|
||||
|
||||
distclean maintainer-clean: clean
|
||||
$(RM) Makefile Makefile.inc pushd.c
|
||||
$(RM) Makefile Makefile.inc Makefile.sample pushd.c
|
||||
-( cd perl && ${MAKE} ${MFLAGS} $@ )
|
||||
|
||||
installdirs:
|
||||
@@ -270,6 +270,7 @@ installdirs:
|
||||
|
||||
install-dev: installdirs
|
||||
@$(INSTALL_DATA) Makefile.inc $(DESTDIR)$(loadablesdir)/Makefile.inc
|
||||
@$(INSTALL_DATA) Makefile.sample $(DESTDIR)$(loadablesdir)/Makefile.sample
|
||||
@$(INSTALL_DATA) $(srcdir)/loadables.h $(DESTDIR)$(loadablesdir)/loadables.h
|
||||
@( cd $(BUILD_DIR) && ${MAKE} ${MFLAGS} DESTDIR="$(DESTDIR)" install-headers)
|
||||
|
||||
@@ -281,7 +282,8 @@ install-supported: all installdirs install-dev
|
||||
done
|
||||
|
||||
uninstall-dev:
|
||||
-$(RM) $(DESTDIR)$(loadablesdir)/Makefile.inc $(DESTDIR)$(loadablesdir)/loadables.h
|
||||
-$(RM) $(DESTDIR)$(loadablesdir)/Makefile.inc $(DESTDIR)$(loadablesdir)/Makefile.sample
|
||||
-$(RM) $(DESTDIR)$(loadablesdir)/loadables.h
|
||||
-( cd $(BUILD_DIR) && ${MAKE} ${MFLAGS} DESTDIR="$(DESTDIR)" uninstall-headers)
|
||||
|
||||
uninstall-supported: uninstall-dev
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# Sample makefile for bash loadable builtin development
|
||||
#
|
||||
# Copyright (C) 2015 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2015-2022 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
|
||||
@@ -99,10 +99,3 @@ INC = -I$(headersdir) -I$(headersdir)/include -I$(headersdir)/builtins
|
||||
|
||||
.c.o:
|
||||
$(SHOBJ_CC) $(SHOBJ_CFLAGS) $(CCFLAGS) $(INC) -c -o $@ $<
|
||||
|
||||
all: example
|
||||
|
||||
example: example.o
|
||||
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ example.o $(SHOBJ_LIBS)
|
||||
|
||||
example.o: example.c
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
#
|
||||
# Sample makefile for bash loadable builtin development
|
||||
#
|
||||
# Copyright (C) 2022 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 3 of the License, 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, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# these should match the ones in Makefile.in (for the make install target)
|
||||
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
libdir = @libdir@
|
||||
|
||||
# ${loadablesdir} is where the example loadable builtins and data files
|
||||
# are installed (make install target in Makefile.in)
|
||||
|
||||
loadablesdir = @loadablesdir@
|
||||
DESTDIR =
|
||||
|
||||
# include Makefile.inc for all boilerplate definitions
|
||||
|
||||
include $(DESTDIR)$(loadablesdir)/Makefile.inc
|
||||
|
||||
# here, `example' is the name of the shared object
|
||||
# replace `example' with the appropriate filename
|
||||
|
||||
all: example
|
||||
|
||||
example: example.o
|
||||
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ example.o $(SHOBJ_LIBS)
|
||||
|
||||
example.o: example.c
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
Copyright (C) 1999-2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999-2009,2022 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash.
|
||||
Bash is free software: you can redistribute it and/or modify
|
||||
@@ -40,7 +40,7 @@ fcopy(fd, fn)
|
||||
int fd;
|
||||
char *fn;
|
||||
{
|
||||
char buf[1024], *s;
|
||||
char buf[4096], *s;
|
||||
int n, w, e;
|
||||
|
||||
while (n = read(fd, buf, sizeof (buf))) {
|
||||
|
||||
@@ -181,7 +181,8 @@ printargs (list, ofp)
|
||||
for (sawc = 0, l = list; l; l = l->next)
|
||||
{
|
||||
ostr = ansicstr (l->word->word, strlen (l->word->word), 0, &sawc, (int *)0);
|
||||
fprintf (ofp, "%s", ostr);
|
||||
if (ostr)
|
||||
fprintf (ofp, "%s", ostr);
|
||||
free (ostr);
|
||||
if (sawc)
|
||||
return (0);
|
||||
|
||||
@@ -35,6 +35,18 @@
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
#if defined (PRI_MACROS_BROKEN)
|
||||
# undef PRIdMAX
|
||||
#endif
|
||||
|
||||
#if !defined (PRIdMAX)
|
||||
# if HAVE_LONG_LONG
|
||||
# define PRIdMAX "lld"
|
||||
# else
|
||||
# define PRIdMAX "ld"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined (HAVE_LONG_DOUBLE) && HAVE_DECL_STRTOLD && !defined(STRTOLD_BROKEN)
|
||||
typedef long double floatmax_t;
|
||||
# define FLOATMAX_CONV "L"
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
#! /bin/bash
|
||||
#
|
||||
# bcalc - a coproc example that uses bc to evaluate floating point expressions
|
||||
#
|
||||
# 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 3 of the License, 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, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# If supplied command-line arguments, it uses them as the expression to have
|
||||
# bc evaluate, and exits after reading the result. Otherwise, it enters an
|
||||
# interactive mode, reading expressions and passing them to bc for evaluation,
|
||||
# with line editing and history.
|
||||
#
|
||||
# You could even use this to write bc programs, but you'd have to rework the
|
||||
# single-line REPL a little bit to do that (and get over the annoying timeout
|
||||
# on the read)
|
||||
#
|
||||
# Chet Ramey
|
||||
# chet.ramey@case.edu
|
||||
|
||||
# we force stderr to avoid synchronization issues on calculation errors, even
|
||||
# with the read timeout
|
||||
init()
|
||||
{
|
||||
coproc BC { bc -q 2>&1; }
|
||||
# set scale
|
||||
printf "scale = 10\n" >&${BC[1]}
|
||||
# bash automatically sets BC_PID to the coproc pid; we store it so we
|
||||
# can be sure to use it even after bash reaps the coproc and unsets
|
||||
# the variables
|
||||
coproc_pid=$BC_PID
|
||||
}
|
||||
|
||||
# not strictly necessary; the pipes will be closed when the program exits
|
||||
# but we can use it in reset() below
|
||||
fini()
|
||||
{
|
||||
eval exec "${BC[1]}>&- ${BC[0]}<&-"
|
||||
}
|
||||
|
||||
reset()
|
||||
{
|
||||
fini # close the old pipes
|
||||
|
||||
sleep 1
|
||||
kill -1 $coproc_pid >/dev/null 2>&1 # make sure the coproc is dead
|
||||
unset coproc_pid
|
||||
|
||||
init
|
||||
}
|
||||
|
||||
# set a read timeout of a half second to avoid synchronization problems
|
||||
calc()
|
||||
{
|
||||
printf "%s\n" "$1" >&${BC[1]}
|
||||
read -t 0.5 ANSWER <&${BC[0]}
|
||||
}
|
||||
|
||||
init
|
||||
|
||||
# if we have command line options, process them as a single expression and
|
||||
# print the result. we could just run `bc <<<"scale = 10 ; $*"' and be done
|
||||
# with it, but we init the coproc before this and run the calculation through
|
||||
# the pipes in case we want to do something else with the answer
|
||||
|
||||
if [ $# -gt 0 ] ; then
|
||||
calc "$*"
|
||||
printf "%s\n" "$ANSWER"
|
||||
fini
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# we don't want to save the history anywhere
|
||||
unset HISTFILE
|
||||
|
||||
while read -e -p 'equation: ' EQN
|
||||
do
|
||||
case "$EQN" in
|
||||
'') continue ;;
|
||||
exit|quit) break ;;
|
||||
reset) reset ; continue ;;
|
||||
esac
|
||||
|
||||
# save to the history list
|
||||
history -s "$EQN"
|
||||
|
||||
# run it through bc
|
||||
calc "$EQN"
|
||||
if [ -n "$ANSWER" ] ; then
|
||||
printf "%s\n" "$ANSWER"
|
||||
fi
|
||||
done
|
||||
fini
|
||||
|
||||
exit 0
|
||||
+5
-1
@@ -2655,7 +2655,11 @@ execute_pipeline (command, asynchronous, pipe_in, pipe_out, fds_to_close)
|
||||
lstdin = wait_for (lastpid, 0);
|
||||
}
|
||||
else
|
||||
lstdin = wait_for_single_pid (lastpid, 0); /* checks bgpids list */
|
||||
{
|
||||
lstdin = wait_for_single_pid (lastpid, 0); /* checks bgpids list */
|
||||
if (lstdin > 256) /* error sentinel */
|
||||
lstdin = 127;
|
||||
}
|
||||
#else
|
||||
lstdin = wait_for (lastpid, 0);
|
||||
#endif
|
||||
|
||||
@@ -2606,7 +2606,7 @@ wait_for_single_pid (pid, flags)
|
||||
{
|
||||
if (flags & JWAIT_PERROR)
|
||||
internal_error (_("wait: pid %ld is not a child of this shell"), (long)pid);
|
||||
return (127);
|
||||
return (257);
|
||||
}
|
||||
|
||||
alive = 0;
|
||||
@@ -2690,7 +2690,7 @@ wait_for_background_pids (ps)
|
||||
if (ps)
|
||||
{
|
||||
ps->pid = pid;
|
||||
ps->status = (r < 0) ? 127 : r;
|
||||
ps->status = (r < 0 || r > 256) ? 127 : r;
|
||||
}
|
||||
if (r == -1 && errno == ECHILD)
|
||||
{
|
||||
@@ -3695,7 +3695,7 @@ kill_pid (pid, sig, group)
|
||||
result = killpg (pid, sig);
|
||||
/* If we're killing using job control notification, for example,
|
||||
without job control active, we have to do things ourselves. */
|
||||
else if (jobs[job]->pgrp == shell_pgrp)
|
||||
else if (jobs[job]->pgrp == shell_pgrp) /* XXX - IS_JOBCONTROL(job) == 0? */
|
||||
{
|
||||
p = jobs[job]->pipe;
|
||||
do
|
||||
|
||||
+1
-1
@@ -121,7 +121,7 @@ void wcdequote_pathname PARAMS((wchar_t *));
|
||||
static void wdequote_pathname PARAMS((char *));
|
||||
static void dequote_pathname PARAMS((char *));
|
||||
#else
|
||||
# define dequote_pathname udequote_pathname
|
||||
# define dequote_pathname(p) udequote_pathname(p)
|
||||
#endif
|
||||
static int glob_testdir PARAMS((char *, int));
|
||||
static char **glob_dir_to_array PARAMS((char *, char **, int));
|
||||
|
||||
@@ -32,6 +32,11 @@
|
||||
|
||||
#define MALLOC_WRAPFUNCS
|
||||
|
||||
/* If defined, as it is by default, use the lesscore() function to attempt
|
||||
to reduce the top of the heap when freeing memory blocks larger than a
|
||||
defined threshold. */
|
||||
#define USE_LESSCORE
|
||||
|
||||
/* Generic pointer type. */
|
||||
#ifndef PTR_T
|
||||
# if defined (__STDC__)
|
||||
|
||||
+5
-4
@@ -597,6 +597,7 @@ _malloc_unblock_signals (setp, osetp)
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined (USE_LESSCORE)
|
||||
/* Return some memory to the system by reducing the break. This is only
|
||||
called with NU > pagebucket, so we're always assured of giving back
|
||||
more than one page of memory. */
|
||||
@@ -617,6 +618,7 @@ lesscore (nu) /* give system back some memory */
|
||||
_mstats.nlesscore[nu]++;
|
||||
#endif
|
||||
}
|
||||
#endif /* USE_LESSCORE */
|
||||
|
||||
/* Ask system for more memory; add to NEXTF[NU]. BUSY[NU] must be set to 1. */
|
||||
static void
|
||||
@@ -1024,11 +1026,9 @@ internal_free (mem, file, line, flags)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if GLIBC21
|
||||
if (nunits >= LESSCORE_MIN && ((char *)p + binsize(nunits) == sbrk (0)))
|
||||
#else
|
||||
#if defined (USE_LESSCORE)
|
||||
/* We take care of the mmap case and munmap above */
|
||||
if (nunits >= LESSCORE_MIN && ((char *)p + binsize(nunits) == memtop))
|
||||
#endif
|
||||
{
|
||||
/* If above LESSCORE_FRC, give back unconditionally. This should be set
|
||||
high enough to be infrequently encountered. If between LESSCORE_MIN
|
||||
@@ -1041,6 +1041,7 @@ internal_free (mem, file, line, flags)
|
||||
goto free_return;
|
||||
}
|
||||
}
|
||||
#endif /* USE_LESSCORE */
|
||||
|
||||
#ifdef MEMSCRAMBLE
|
||||
if (p->mh_nbytes)
|
||||
|
||||
@@ -279,8 +279,11 @@ rl_callback_read_char (void)
|
||||
}
|
||||
|
||||
/* Make sure application hooks can see whether we saw EOF. */
|
||||
if (rl_eof_found = eof)
|
||||
RL_SETSTATE(RL_STATE_EOF);
|
||||
if (eof > 0)
|
||||
{
|
||||
rl_eof_found = eof;
|
||||
RL_SETSTATE(RL_STATE_EOF);
|
||||
}
|
||||
|
||||
if (rl_done)
|
||||
{
|
||||
|
||||
@@ -2368,6 +2368,7 @@ history list.
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <locale.h>
|
||||
|
||||
#if defined (HAVE_STRING_H)
|
||||
# include <string.h>
|
||||
@@ -2448,6 +2449,8 @@ main (argc, argv)
|
||||
@{
|
||||
char *line, *s;
|
||||
|
||||
setlocale (LC_ALL, "");
|
||||
|
||||
progname = argv[0];
|
||||
|
||||
initialize_readline (); /* Bind our completer. */
|
||||
|
||||
@@ -50,6 +50,8 @@ Copyright (C) 1999 Jeff Solomon
|
||||
#include <stdio.h>
|
||||
#include <termios.h> /* xxx - should make this more general */
|
||||
|
||||
#include <locale.h>
|
||||
|
||||
#ifdef READLINE_LIBRARY
|
||||
# include "readline.h"
|
||||
#else
|
||||
@@ -104,6 +106,8 @@ main()
|
||||
{
|
||||
fd_set fds;
|
||||
|
||||
setlocale (LC_ALL, "");
|
||||
|
||||
/* Adjust the terminal slightly before the handler is installed. Disable
|
||||
* canonical mode processing and set the input character time flag to be
|
||||
* non-blocking.
|
||||
|
||||
@@ -27,8 +27,11 @@
|
||||
# include <readline/history.h>
|
||||
#endif
|
||||
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
int
|
||||
main (argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
|
||||
@@ -7,9 +7,13 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/select.h>
|
||||
|
||||
#include <signal.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <locale.h>
|
||||
|
||||
/* Standard readline include files. */
|
||||
#if defined (READLINE_LIBRARY)
|
||||
# include "readline.h"
|
||||
@@ -22,10 +26,19 @@
|
||||
extern int errno;
|
||||
|
||||
static void cb_linehandler (char *);
|
||||
static void signandler (int);
|
||||
|
||||
int running;
|
||||
int running, sigwinch_received;
|
||||
const char *prompt = "rltest$ ";
|
||||
|
||||
/* Handle SIGWINCH and window size changes when readline is not active and
|
||||
reading a character. */
|
||||
static void
|
||||
sighandler (int sig)
|
||||
{
|
||||
sigwinch_received = 1;
|
||||
}
|
||||
|
||||
/* Callback function called for each line when accept-line executed, EOF
|
||||
seen, or EOF character read. This sets a flag and returns; it could
|
||||
also call exit(3). */
|
||||
@@ -60,6 +73,11 @@ main (int c, char **v)
|
||||
fd_set fds;
|
||||
int r;
|
||||
|
||||
setlocale (LC_ALL, "");
|
||||
|
||||
/* Handle SIGWINCH */
|
||||
signal (SIGWINCH, sighandler);
|
||||
|
||||
/* Install the line handler. */
|
||||
rl_callback_handler_install (prompt, cb_linehandler);
|
||||
|
||||
@@ -80,6 +98,13 @@ main (int c, char **v)
|
||||
rl_callback_handler_remove ();
|
||||
break;
|
||||
}
|
||||
if (sigwinch_received)
|
||||
{
|
||||
rl_resize_terminal ();
|
||||
sigwinch_received = 0;
|
||||
}
|
||||
if (r < 0)
|
||||
continue;
|
||||
|
||||
if (FD_ISSET (fileno (rl_instream), &fds))
|
||||
rl_callback_read_char ();
|
||||
|
||||
@@ -38,6 +38,10 @@
|
||||
extern void exit();
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LOCALE_H
|
||||
# include <locale.h>
|
||||
#endif
|
||||
|
||||
#if defined (READLINE_LIBRARY)
|
||||
# include "posixstat.h"
|
||||
# include "readline.h"
|
||||
@@ -93,6 +97,10 @@ main (argc, argv)
|
||||
else
|
||||
progname++;
|
||||
|
||||
#ifdef HAVE_SETLOCALE
|
||||
setlocale (LC_ALL, "");
|
||||
#endif
|
||||
|
||||
/* defaults */
|
||||
prompt = "readline$ ";
|
||||
fd = nch = 0;
|
||||
|
||||
@@ -45,6 +45,10 @@
|
||||
extern void exit();
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LOCALE_H
|
||||
# include <locale.h>
|
||||
#endif
|
||||
|
||||
#ifndef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
@@ -79,6 +83,10 @@ main (argc, argv)
|
||||
char *temp;
|
||||
int opt, Vflag, Nflag;
|
||||
|
||||
#ifdef HAVE_SETLOCALE
|
||||
setlocale (LC_ALL, ""):
|
||||
#endif
|
||||
|
||||
progname = strrchr(argv[0], '/');
|
||||
if (progname == 0)
|
||||
progname = argv[0];
|
||||
|
||||
@@ -36,6 +36,10 @@
|
||||
extern void exit();
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LOCALE_H
|
||||
# include <locale.h>
|
||||
#endif
|
||||
|
||||
#ifdef READLINE_LIBRARY
|
||||
# include "readline.h"
|
||||
# include "history.h"
|
||||
@@ -52,6 +56,10 @@ main ()
|
||||
char *temp, *prompt;
|
||||
int done;
|
||||
|
||||
#ifdef HAVE_SETLOCALE
|
||||
setlocale (LC_ALL, "");
|
||||
#endif
|
||||
|
||||
temp = (char *)NULL;
|
||||
prompt = "readline$ ";
|
||||
done = 0;
|
||||
|
||||
@@ -79,7 +79,7 @@ extern int errno;
|
||||
# define O_NDELAY O_NONBLOCK /* Posix style */
|
||||
#endif
|
||||
|
||||
#if defined (HAVE_PSELECT)
|
||||
#if defined (HAVE_PSELECT) || defined (HAVE_SELECT)
|
||||
extern sigset_t _rl_orig_sigset;
|
||||
#endif
|
||||
|
||||
|
||||
+7
-7
@@ -167,8 +167,8 @@ getdtablesize ()
|
||||
# endif
|
||||
void
|
||||
bcopy (s,d,n)
|
||||
char *d, *s;
|
||||
int n;
|
||||
void *d, *s;
|
||||
size_t n;
|
||||
{
|
||||
FASTCOPY (s, d, n);
|
||||
}
|
||||
@@ -180,8 +180,8 @@ bcopy (s,d,n)
|
||||
# endif
|
||||
void
|
||||
bzero (s, n)
|
||||
char *s;
|
||||
int n;
|
||||
void *s;
|
||||
size_t n;
|
||||
{
|
||||
register int i;
|
||||
register char *r;
|
||||
@@ -197,7 +197,7 @@ bzero (s, n)
|
||||
int
|
||||
gethostname (name, namelen)
|
||||
char *name;
|
||||
int namelen;
|
||||
size_t namelen;
|
||||
{
|
||||
int i;
|
||||
struct utsname ut;
|
||||
@@ -214,7 +214,7 @@ gethostname (name, namelen)
|
||||
int
|
||||
gethostname (name, namelen)
|
||||
char *name;
|
||||
int namelen;
|
||||
size_t namelen;
|
||||
{
|
||||
strncpy (name, "unknown", namelen);
|
||||
name[namelen] = '\0';
|
||||
@@ -237,7 +237,7 @@ killpg (pgrp, sig)
|
||||
int
|
||||
mkfifo (path, mode)
|
||||
char *path;
|
||||
int mode;
|
||||
mode_t mode;
|
||||
{
|
||||
#if defined (S_IFIFO)
|
||||
return (mknod (path, (mode | S_IFIFO), 0));
|
||||
|
||||
+13
-4
@@ -2,7 +2,7 @@
|
||||
* shmatch.c -- shell interface to posix regular expression matching.
|
||||
*/
|
||||
|
||||
/* Copyright (C) 2003-2015 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2003-2022 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -41,6 +41,10 @@
|
||||
|
||||
extern int glob_ignore_case, match_ignore_case;
|
||||
|
||||
#if defined (ARRAY_VARS)
|
||||
extern SHELL_VAR *builtin_find_indexed_array (char *, int);
|
||||
#endif
|
||||
|
||||
int
|
||||
sh_regmatch (string, pattern, flags)
|
||||
const char *string;
|
||||
@@ -92,11 +96,16 @@ sh_regmatch (string, pattern, flags)
|
||||
/* Store the parenthesized subexpressions in the array BASH_REMATCH.
|
||||
Element 0 is the portion that matched the entire regexp. Element 1
|
||||
is the part that matched the first subexpression, and so on. */
|
||||
unbind_variable_noref ("BASH_REMATCH");
|
||||
#if 1
|
||||
unbind_global_variable_noref ("BASH_REMATCH");
|
||||
rematch = make_new_array_variable ("BASH_REMATCH");
|
||||
amatch = array_cell (rematch);
|
||||
#else
|
||||
/* TAG:bash-5.3 */
|
||||
rematch = builtin_find_indexed_array ("BASH_REMATCH", 1);
|
||||
#endif
|
||||
amatch = rematch ? array_cell (rematch) : (ARRAY *)0;
|
||||
|
||||
if (matches && (flags & SHMAT_SUBEXP) && result == EXECUTION_SUCCESS && subexp_str)
|
||||
if (matches && amatch && (flags & SHMAT_SUBEXP) && result == EXECUTION_SUCCESS && subexp_str)
|
||||
{
|
||||
for (subexp_ind = 0; subexp_ind <= regex.re_nsub; subexp_ind++)
|
||||
{
|
||||
|
||||
@@ -69,7 +69,11 @@ sh_charvis (s, sindp, slen, ret, rindp)
|
||||
ri = *rindp;
|
||||
c = s[*sindp];
|
||||
|
||||
#if defined (HANDLE_MULTIBYTE)
|
||||
send = (locale_mb_cur_max > 1) ? s + slen : 0;
|
||||
#else
|
||||
send = 0;
|
||||
#endif
|
||||
|
||||
if (SAFECHAR (c))
|
||||
{
|
||||
@@ -88,10 +92,12 @@ sh_charvis (s, sindp, slen, ret, rindp)
|
||||
ret[ri++] = UNCTRL (c);
|
||||
si++;
|
||||
}
|
||||
#if defined (HANDLE_MULTIBYTE)
|
||||
else if (locale_utf8locale && (c & 0x80))
|
||||
COPY_CHAR_I (ret, ri, s, send, si);
|
||||
else if (locale_mb_cur_max > 1 && is_basic (c) == 0)
|
||||
COPY_CHAR_I (ret, ri, s, send, si);
|
||||
#endif
|
||||
else if (META_CHAR (c))
|
||||
{
|
||||
ret[ri++] = 'M';
|
||||
|
||||
+2
-1
@@ -68,7 +68,8 @@ zgetline (fd, lineptr, n, delim, unbuffered_read)
|
||||
int delim;
|
||||
int unbuffered_read;
|
||||
{
|
||||
int nr, retval;
|
||||
int retval;
|
||||
size_t nr;
|
||||
char *line, c;
|
||||
|
||||
if (lineptr == 0 || n == 0 || (*lineptr == 0 && *n != 0))
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@ zmapfd (fd, ostr, fn)
|
||||
int rval;
|
||||
char lbuf[ZBUFSIZ];
|
||||
char *result;
|
||||
int rsize, rind;
|
||||
size_t rsize, rind;
|
||||
|
||||
rval = 0;
|
||||
result = (char *)xmalloc (rsize = ZBUFSIZ);
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
dnl Copyright (C) 2022 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl Make sure we replace strtoimax if we don't have a declaration
|
||||
dnl We can use this as a template for future function checks
|
||||
|
||||
AC_DEFUN([BASH_FUNC_STRTOIMAX], [
|
||||
AC_MSG_CHECKING([for usable strtoimax])
|
||||
AC_CACHE_VAL(bash_cv_func_strtoimax,
|
||||
[
|
||||
HAVE_STRTOIMAX=0 HAVE_DECL_STRTOIMAX=0
|
||||
|
||||
AC_CHECK_FUNCS([strtoimax])
|
||||
AC_CHECK_DECLS([strtoimax])
|
||||
|
||||
if test "$ac_cv_func_strtoimax" = "yes" ; then
|
||||
HAVE_STRTOIMAX=1
|
||||
fi
|
||||
if test "$ac_cv_have_decl_strtoimax" = "yes" ; then
|
||||
HAVE_DECL_STRTOIMAX=1
|
||||
fi
|
||||
|
||||
if test "$HAVE_STRTOIMAX" = 0 || test "$HAVE_DECL_STRTOIMAX" = 0 ; then
|
||||
bash_cv_func_strtoimax=no REPLACE_STRTOIMAX=1
|
||||
else
|
||||
bash_cv_func_strtoimax=yes
|
||||
fi
|
||||
])
|
||||
AC_MSG_RESULT($bash_cv_func_strtoimax)
|
||||
if test $bash_cv_func_strtoimax = yes; then
|
||||
AC_LIBOBJ(strtoimax)
|
||||
fi
|
||||
])
|
||||
@@ -664,7 +664,7 @@ wait_for_single_pid (pid, flags)
|
||||
if (pstatus == PROC_BAD)
|
||||
{
|
||||
internal_error (_("wait: pid %ld is not a child of this shell"), (long)pid);
|
||||
return (127);
|
||||
return (257);
|
||||
}
|
||||
|
||||
if (pstatus != PROC_STILL_ALIVE)
|
||||
|
||||
@@ -2832,7 +2832,7 @@ push_token (x)
|
||||
static char *token = (char *)NULL;
|
||||
|
||||
/* Current size of the token buffer. */
|
||||
static int token_buffer_size;
|
||||
static size_t token_buffer_size;
|
||||
|
||||
/* Command to read_token () explaining what we want it to do. */
|
||||
#define READ 0
|
||||
@@ -4063,7 +4063,12 @@ parse_comsub (qc, open, close, lenp, flags)
|
||||
pushed_string_list = (STRING_SAVER *)NULL;
|
||||
|
||||
/* State flags we don't want to persist into command substitutions. */
|
||||
parser_state &= ~(PST_REGEXP|PST_EXTPAT|PST_CONDCMD|PST_CONDEXPR);
|
||||
parser_state &= ~(PST_REGEXP|PST_EXTPAT|PST_CONDCMD|PST_CONDEXPR|PST_COMPASSIGN);
|
||||
/* Could do PST_CASESTMT too, but that also affects history. Setting
|
||||
expecting_in_token below should take care of the parsing requirements.
|
||||
Unsetting PST_REDIRLIST isn't strictly necessary because of how we set
|
||||
token_to_read below, but we do it anyway. */
|
||||
parser_state &= ~(PST_CASEPAT|PST_ALEXPNEXT|PST_SUBSHELL|PST_REDIRLIST);
|
||||
/* State flags we want to set for this run through the parser. */
|
||||
parser_state |= PST_CMDSUBST|PST_EOFTOKEN|PST_NOEXPAND;
|
||||
|
||||
@@ -4102,7 +4107,14 @@ parse_comsub (qc, open, close, lenp, flags)
|
||||
else if (r != 0)
|
||||
{
|
||||
/* parser_error (start_lineno, _("could not parse command substitution")); */
|
||||
jump_to_top_level (DISCARD);
|
||||
/* Non-interactive shells exit on parse error in a command substitution. */
|
||||
if (last_command_exit_value == 0)
|
||||
last_command_exit_value = EXECUTION_FAILURE;
|
||||
set_exit_status (last_command_exit_value);
|
||||
if (interactive_shell == 0)
|
||||
jump_to_top_level (FORCE_EOF); /* This is like reader_loop() */
|
||||
else
|
||||
jump_to_top_level (DISCARD);
|
||||
}
|
||||
|
||||
if (current_token != shell_eof_token)
|
||||
@@ -4218,7 +4230,8 @@ xparse_dolparen (base, string, indp, flags)
|
||||
clear_shell_input_line (); /* XXX */
|
||||
if (bash_input.type != st_string) /* paranoia */
|
||||
parser_state &= ~(PST_CMDSUBST|PST_EOFTOKEN);
|
||||
jump_to_top_level (-nc); /* XXX */
|
||||
if ((flags & SX_NOLONGJMP) == 0)
|
||||
jump_to_top_level (-nc); /* XXX */
|
||||
}
|
||||
|
||||
/* Need to find how many characters parse_string() consumed, update
|
||||
@@ -6284,31 +6297,26 @@ parse_string_to_word_list (s, flags, whom)
|
||||
const char *whom;
|
||||
{
|
||||
WORD_LIST *wl;
|
||||
int tok, orig_current_token, orig_line_number, orig_input_terminator;
|
||||
int orig_line_count, orig_parser_state;
|
||||
int old_echo_input, old_expand_aliases, ea;
|
||||
#if defined (HISTORY)
|
||||
int old_remember_on_history, old_history_expansion_inhibited;
|
||||
#endif
|
||||
int tok, orig_current_token, orig_line_number;
|
||||
int orig_parser_state;
|
||||
sh_parser_state_t ps;
|
||||
int ea;
|
||||
|
||||
#if defined (HISTORY)
|
||||
old_remember_on_history = remember_on_history;
|
||||
# if defined (BANG_HISTORY)
|
||||
old_history_expansion_inhibited = history_expansion_inhibited;
|
||||
# endif
|
||||
bash_history_disable ();
|
||||
#endif
|
||||
|
||||
orig_line_number = line_number;
|
||||
orig_line_count = current_command_line_count;
|
||||
orig_input_terminator = shell_input_line_terminator;
|
||||
old_echo_input = echo_input_at_read;
|
||||
old_expand_aliases = expand_aliases;
|
||||
save_parser_state (&ps);
|
||||
|
||||
push_stream (1);
|
||||
if (ea = expanding_alias ())
|
||||
parser_save_alias ();
|
||||
last_read_token = WORD; /* WORD to allow reserved words here */
|
||||
|
||||
/* WORD to avoid parsing reserved words as themselves and just parse them as
|
||||
WORDs. */
|
||||
last_read_token = WORD;
|
||||
|
||||
current_command_line_count = 0;
|
||||
echo_input_at_read = expand_aliases = 0;
|
||||
|
||||
@@ -6317,9 +6325,11 @@ parse_string_to_word_list (s, flags, whom)
|
||||
|
||||
if (flags & 1)
|
||||
{
|
||||
orig_parser_state = parser_state;
|
||||
parser_state |= PST_COMPASSIGN|PST_REPARSE;
|
||||
orig_parser_state = parser_state; /* XXX - not needed? */
|
||||
/* State flags we don't want to persist into compound assignments. */
|
||||
parser_state &= ~PST_NOEXPAND; /* parse_comsub sentinel */
|
||||
/* State flags we want to set for this run through the tokenizer. */
|
||||
parser_state |= PST_COMPASSIGN|PST_REPARSE;
|
||||
}
|
||||
|
||||
while ((tok = read_token (READ)) != yacc_EOF)
|
||||
@@ -6349,21 +6359,10 @@ parse_string_to_word_list (s, flags, whom)
|
||||
if (ea)
|
||||
parser_restore_alias ();
|
||||
|
||||
#if defined (HISTORY)
|
||||
remember_on_history = old_remember_on_history;
|
||||
# if defined (BANG_HISTORY)
|
||||
history_expansion_inhibited = old_history_expansion_inhibited;
|
||||
# endif /* BANG_HISTORY */
|
||||
#endif /* HISTORY */
|
||||
|
||||
echo_input_at_read = old_echo_input;
|
||||
expand_aliases = old_expand_aliases;
|
||||
|
||||
current_command_line_count = orig_line_count;
|
||||
shell_input_line_terminator = orig_input_terminator;
|
||||
restore_parser_state (&ps);
|
||||
|
||||
if (flags & 1)
|
||||
parser_state = orig_parser_state;
|
||||
parser_state = orig_parser_state; /* XXX - not needed? */
|
||||
|
||||
if (wl == &parse_string_error)
|
||||
{
|
||||
@@ -6382,28 +6381,31 @@ parse_compound_assignment (retlenp)
|
||||
int *retlenp;
|
||||
{
|
||||
WORD_LIST *wl, *rl;
|
||||
int tok, orig_line_number, orig_token_size, orig_last_token, assignok;
|
||||
int orig_parser_state;
|
||||
char *saved_token, *ret;
|
||||
int tok, orig_line_number, assignok;
|
||||
sh_parser_state_t ps;
|
||||
char *ret;
|
||||
|
||||
saved_token = token;
|
||||
orig_token_size = token_buffer_size;
|
||||
orig_line_number = line_number;
|
||||
orig_last_token = last_read_token;
|
||||
orig_parser_state = parser_state;
|
||||
save_parser_state (&ps);
|
||||
|
||||
last_read_token = WORD; /* WORD to allow reserved words here */
|
||||
/* WORD to avoid parsing reserved words as themselves and just parse them as
|
||||
WORDs. Plus it means we won't be in a command position and so alias
|
||||
expansion won't happen. */
|
||||
last_read_token = WORD;
|
||||
|
||||
token = (char *)NULL;
|
||||
token_buffer_size = 0;
|
||||
wl = (WORD_LIST *)NULL; /* ( */
|
||||
|
||||
assignok = parser_state&PST_ASSIGNOK; /* XXX */
|
||||
|
||||
wl = (WORD_LIST *)NULL; /* ( */
|
||||
orig_parser_state = parser_state;
|
||||
parser_state &= ~PST_NOEXPAND;
|
||||
/* State flags we don't want to persist into compound assignments. */
|
||||
parser_state &= ~(PST_NOEXPAND|PST_CONDCMD|PST_CONDEXPR|PST_REGEXP|PST_EXTPAT);
|
||||
/* State flags we want to set for this run through the tokenizer. */
|
||||
parser_state |= PST_COMPASSIGN;
|
||||
|
||||
esacs_needed_count = expecting_in_token = 0;
|
||||
|
||||
while ((tok = read_token (READ)) != ')')
|
||||
{
|
||||
if (tok == '\n') /* Allow newlines in compound assignments */
|
||||
@@ -6427,11 +6429,7 @@ parse_compound_assignment (retlenp)
|
||||
wl = make_word_list (yylval.word, wl);
|
||||
}
|
||||
|
||||
FREE (token);
|
||||
token = saved_token;
|
||||
token_buffer_size = orig_token_size;
|
||||
|
||||
parser_state = orig_parser_state;
|
||||
restore_parser_state (&ps);
|
||||
|
||||
if (wl == &parse_string_error)
|
||||
{
|
||||
@@ -6443,8 +6441,6 @@ parse_compound_assignment (retlenp)
|
||||
jump_to_top_level (DISCARD);
|
||||
}
|
||||
|
||||
last_read_token = orig_last_token; /* XXX - was WORD? */
|
||||
|
||||
if (wl)
|
||||
{
|
||||
rl = REVERSE_LIST (wl, WORD_LIST *);
|
||||
|
||||
@@ -42,12 +42,7 @@ static int glob_name_is_acceptable PARAMS((const char *));
|
||||
static void ignore_globbed_names PARAMS((char **, sh_ignore_func_t *));
|
||||
static char *split_ignorespec PARAMS((char *, int *));
|
||||
|
||||
#if defined (USE_POSIX_GLOB_LIBRARY)
|
||||
# include <glob.h>
|
||||
typedef int posix_glob_errfunc_t PARAMS((const char *, int));
|
||||
#else
|
||||
# include <glob/glob.h>
|
||||
#endif
|
||||
#include <glob/glob.h>
|
||||
|
||||
/* Control whether * matches .files in globbing. */
|
||||
int glob_dot_filenames;
|
||||
@@ -413,54 +408,6 @@ shell_glob_filename (pathname, qflags)
|
||||
const char *pathname;
|
||||
int qflags;
|
||||
{
|
||||
#if defined (USE_POSIX_GLOB_LIBRARY)
|
||||
register int i;
|
||||
char *temp, **results;
|
||||
glob_t filenames;
|
||||
int glob_flags;
|
||||
|
||||
temp = quote_string_for_globbing (pathname, QGLOB_FILENAME|qflags);
|
||||
|
||||
filenames.gl_offs = 0;
|
||||
|
||||
# if defined (GLOB_PERIOD)
|
||||
glob_flags = glob_dot_filenames ? GLOB_PERIOD : 0;
|
||||
# else
|
||||
glob_flags = 0;
|
||||
# endif /* !GLOB_PERIOD */
|
||||
|
||||
glob_flags |= (GLOB_ERR | GLOB_DOOFFS);
|
||||
|
||||
i = glob (temp, glob_flags, (posix_glob_errfunc_t *)NULL, &filenames);
|
||||
|
||||
free (temp);
|
||||
|
||||
if (i == GLOB_NOSPACE || i == GLOB_ABORTED)
|
||||
return ((char **)NULL);
|
||||
else if (i == GLOB_NOMATCH)
|
||||
filenames.gl_pathv = (char **)NULL;
|
||||
else if (i != 0) /* other error codes not in POSIX.2 */
|
||||
filenames.gl_pathv = (char **)NULL;
|
||||
|
||||
results = filenames.gl_pathv;
|
||||
|
||||
if (results && ((GLOB_FAILED (results)) == 0))
|
||||
{
|
||||
if (should_ignore_glob_matches ())
|
||||
ignore_glob_matches (results);
|
||||
if (results && results[0])
|
||||
strvec_sort (results, 1); /* posix sort */
|
||||
else
|
||||
{
|
||||
FREE (results);
|
||||
results = (char **)NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return (results);
|
||||
|
||||
#else /* !USE_POSIX_GLOB_LIBRARY */
|
||||
|
||||
char *temp, **results;
|
||||
int gflags, quoted_pattern;
|
||||
|
||||
@@ -485,7 +432,6 @@ shell_glob_filename (pathname, qflags)
|
||||
}
|
||||
|
||||
return (results);
|
||||
#endif /* !USE_POSIX_GLOB_LIBRARY */
|
||||
}
|
||||
|
||||
/* Stuff for GLOBIGNORE. */
|
||||
|
||||
@@ -21,13 +21,10 @@
|
||||
#if !defined (_PATHEXP_H_)
|
||||
#define _PATHEXP_H_
|
||||
|
||||
#if defined (USE_POSIX_GLOB_LIBRARY)
|
||||
# define GLOB_FAILED(glist) !(glist)
|
||||
#else /* !USE_POSIX_GLOB_LIBRARY */
|
||||
# define GLOB_FAILED(glist) (glist) == (char **)&glob_error_return
|
||||
#define GLOB_FAILED(glist) (glist) == (char **)&glob_error_return
|
||||
|
||||
extern int noglob_dot_filenames;
|
||||
extern char *glob_error_return;
|
||||
#endif /* !USE_POSIX_GLOB_LIBRARY */
|
||||
|
||||
/* Flag values for quote_string_for_globbing */
|
||||
#define QGLOB_CVTNULL 0x01 /* convert QUOTED_NULL strings to '\0' */
|
||||
|
||||
+5
-2
@@ -414,6 +414,7 @@ init_itemlist_from_varlist (itp, svfunc)
|
||||
sl->list[i] = savestring (vlist[i]->name);
|
||||
sl->list[sl->list_len = n] = (char *)NULL;
|
||||
itp->slist = sl;
|
||||
free (vlist);
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -884,16 +885,18 @@ gen_action_completions (cs, text)
|
||||
TEXT as a match prefix, or just go without? Currently, the code does not
|
||||
use TEXT, just globs CS->globpat and returns the results. If we do decide
|
||||
to use TEXT, we should call quote_string_for_globbing before the call to
|
||||
glob_filename. */
|
||||
glob_filename (in which case we could use shell_glob_filename). */
|
||||
static STRINGLIST *
|
||||
gen_globpat_matches (cs, text)
|
||||
COMPSPEC *cs;
|
||||
const char *text;
|
||||
{
|
||||
STRINGLIST *sl;
|
||||
int gflags;
|
||||
|
||||
sl = strlist_create (0);
|
||||
sl->list = glob_filename (cs->globpat, 0);
|
||||
gflags = glob_star ? GX_GLOBSTAR : 0;
|
||||
sl->list = glob_filename (cs->globpat, gflags);
|
||||
if (GLOB_FAILED (sl->list))
|
||||
sl->list = (char **)NULL;
|
||||
if (sl->list)
|
||||
|
||||
Binary file not shown.
+110
-271
@@ -11,16 +11,16 @@ msgstr ""
|
||||
"Project-Id-Version: bash 5.1\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-11-28 12:51-0500\n"
|
||||
"PO-Revision-Date: 2021-05-09 20:48+0800\n"
|
||||
"PO-Revision-Date: 2022-05-10 16:30+0800\n"
|
||||
"Last-Translator: Yi-Jyun Pan <pan93412@gmail.com>\n"
|
||||
"Language-Team: Chinese (traditional) <zh-l10n@lists.linux.org.tw>\n"
|
||||
"Language: zh_TW\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Bugs: Report translation errors to the Language-Team address.\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Generator: Poedit 2.4.3\n"
|
||||
"X-Bugs: Report translation errors to the Language-Team address.\n"
|
||||
"X-Generator: Poedit 3.0.1\n"
|
||||
|
||||
#: arrayfunc.c:66
|
||||
msgid "bad array subscript"
|
||||
@@ -353,7 +353,7 @@ msgstr "警告:-C 選項可能無法按預期工作"
|
||||
|
||||
#: builtins/complete.def:838
|
||||
msgid "not currently executing completion function"
|
||||
msgstr "目前未執行補完功能"
|
||||
msgstr "目前未執行自動完成功能"
|
||||
|
||||
#: builtins/declare.def:134
|
||||
msgid "can only be used in a function"
|
||||
@@ -910,12 +910,12 @@ msgstr "%s 是一個函數\n"
|
||||
#: builtins/type.def:299
|
||||
#, c-format
|
||||
msgid "%s is a special shell builtin\n"
|
||||
msgstr "%s 是特別的 shell 內建物件\n"
|
||||
msgstr "%s 是特別的 shell 內建命令\n"
|
||||
|
||||
#: builtins/type.def:301
|
||||
#, c-format
|
||||
msgid "%s is a shell builtin\n"
|
||||
msgstr "%s 是 shell 內建物件\n"
|
||||
msgstr "%s 是 shell 內建命令\n"
|
||||
|
||||
#: builtins/type.def:323 builtins/type.def:408
|
||||
#, c-format
|
||||
@@ -1596,7 +1596,7 @@ msgstr "尋找符合的「)」時遇到了未預期的檔案結束符"
|
||||
#: pcomplete.c:1132
|
||||
#, c-format
|
||||
msgid "completion: function `%s' not found"
|
||||
msgstr "補完: 未找到函數「%s」"
|
||||
msgstr "自動完成: 未找到函數「%s」"
|
||||
|
||||
#: pcomplete.c:1722
|
||||
#, c-format
|
||||
@@ -1606,7 +1606,7 @@ msgstr "programmable_completion:%s:可能重試迴圈"
|
||||
#: pcomplib.c:182
|
||||
#, c-format
|
||||
msgid "progcomp_insert: %s: NULL COMPSPEC"
|
||||
msgstr "progcomp_insert: %s: 空的補完規格"
|
||||
msgstr "progcomp_insert: %s: 空的自動完成規格"
|
||||
|
||||
#: print_cmd.c:302
|
||||
#, c-format
|
||||
@@ -2232,7 +2232,7 @@ msgstr "continue [n]"
|
||||
|
||||
#: builtins.c:60
|
||||
msgid "builtin [shell-builtin [arg ...]]"
|
||||
msgstr "builtin [shell 內建物件 [參數 …]]"
|
||||
msgstr "builtin [shell 內建命令 [參數 …]]"
|
||||
|
||||
#: builtins.c:63
|
||||
msgid "caller [expr]"
|
||||
@@ -2668,14 +2668,14 @@ msgid ""
|
||||
" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n"
|
||||
" not a shell builtin."
|
||||
msgstr ""
|
||||
"執行 shell 內建物件。\n"
|
||||
"執行 shell 內建命令。\n"
|
||||
" \n"
|
||||
" 帶 <參數> 執行 <shell 內建物件> 而不做指令查詢\n"
|
||||
" 在希望以 shell 函數的形式來重新實現 shell 內建物件,\n"
|
||||
" 但需要在函數之內執行該 shell 內建物件的情況下有用處。\n"
|
||||
" 帶 <參數> 執行 <shell 內建命令> 而不做指令查詢\n"
|
||||
" 在希望以 shell 函數的形式來重新實現 shell 內建命令,\n"
|
||||
" 但需要在函數之內執行該 shell 內建命令的情況下有用處。\n"
|
||||
" \n"
|
||||
" 結束狀態:\n"
|
||||
" 以 <shell 內建物件> 的結束狀態為準,或者如果 <shell 內建物件> 不是一個 shell 內建物件時\n"
|
||||
" 以 <shell 內建命令> 的結束狀態為準,或者如果 <shell 內建命令> 不是一個 shell 內建命令時\n"
|
||||
" 回傳 false。"
|
||||
|
||||
#: builtins.c:369
|
||||
@@ -2864,43 +2864,6 @@ msgstr ""
|
||||
" 回傳 COMMAND 指令的回傳狀態,或者當找不到 COMMAND 指令時失敗。"
|
||||
|
||||
#: builtins.c:490
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| "Set variable values and attributes.\n"
|
||||
#| " \n"
|
||||
#| " Declare variables and give them attributes. If no NAMEs are given,\n"
|
||||
#| " display the attributes and values of all variables.\n"
|
||||
#| " \n"
|
||||
#| " Options:\n"
|
||||
#| " -f\trestrict action or display to function names and definitions\n"
|
||||
#| " -F\trestrict display to function names only (plus line number and\n"
|
||||
#| " \t\tsource file when debugging)\n"
|
||||
#| " -g\tcreate global variables when used in a shell function; otherwise\n"
|
||||
#| " \t\tignored\n"
|
||||
#| " -p\tdisplay the attributes and value of each NAME\n"
|
||||
#| " \n"
|
||||
#| " Options which set attributes:\n"
|
||||
#| " -a\tto make NAMEs indexed arrays (if supported)\n"
|
||||
#| " -A\tto make NAMEs associative arrays (if supported)\n"
|
||||
#| " -i\tto make NAMEs have the `integer' attribute\n"
|
||||
#| " -l\tto convert the value of each NAME to lower case on assignment\n"
|
||||
#| " -n\tmake NAME a reference to the variable named by its value\n"
|
||||
#| " -r\tto make NAMEs readonly\n"
|
||||
#| " -t\tto make NAMEs have the `trace' attribute\n"
|
||||
#| " -u\tto convert the value of each NAME to upper case on assignment\n"
|
||||
#| " -x\tto make NAMEs export\n"
|
||||
#| " \n"
|
||||
#| " Using `+' instead of `-' turns off the given attribute.\n"
|
||||
#| " \n"
|
||||
#| " Variables with the integer attribute have arithmetic evaluation (see\n"
|
||||
#| " the `let' command) performed when the variable is assigned a value.\n"
|
||||
#| " \n"
|
||||
#| " When used in a function, `declare' makes NAMEs local, as with the `local'\n"
|
||||
#| " command. The `-g' option suppresses this behavior.\n"
|
||||
#| " \n"
|
||||
#| " Exit Status:\n"
|
||||
#| " Returns success unless an invalid option is supplied or a variable\n"
|
||||
#| " assignment error occurs."
|
||||
msgid ""
|
||||
"Set variable values and attributes.\n"
|
||||
" \n"
|
||||
@@ -2942,19 +2905,21 @@ msgid ""
|
||||
msgstr ""
|
||||
"設定變數值和屬性。\n"
|
||||
" \n"
|
||||
" 規範變數並且賦予它們屬性。如果沒用指定名稱,\n"
|
||||
" 則顯示所有變數的屬性和值。\n"
|
||||
" 宣告變數並賦予其屬性。若未指定 <名稱>,\n"
|
||||
" 則顯示所有變數的屬性和數值。\n"
|
||||
" \n"
|
||||
" 選項:\n"
|
||||
" -f\t限制動作或顯示為只有函數名稱和定義\n"
|
||||
" -F\t限制僅顯示函數名稱 (以及列號和原始檔名於偵錯時)\n"
|
||||
" -g\t當用於 shell 函數內時建立全域變數 ; 否則忽略\n"
|
||||
" -F\t限制僅顯示函數名稱(偵錯時另包含列號和原始檔名)\n"
|
||||
" -g\t用於 shell 函數時建立全域變數 ; 否則忽略\n"
|
||||
" -I\t如果建立的是本地變數,則繼承上個作用域中,\n"
|
||||
" \t\t同名變數的屬性及數值。\n"
|
||||
" -p\t顯示每個 <名稱> 變數的屬性和值\n"
|
||||
" \n"
|
||||
" 設定屬性的選項:\n"
|
||||
" -a\t使 <名稱> 成為索引陣列 (如果支援)\n"
|
||||
" -A\t使 <名稱> 成為關聯陣列 (如果支援)\n"
|
||||
" -i\t使 <名稱> 帶有「integer」(整數)屬性\n"
|
||||
" -i\t使 <名稱> 帶有「integer」(整數)屬性\n"
|
||||
" -l\t將每個 <名稱> 的值在指派時轉為小寫\n"
|
||||
" -n\t使 <名稱> 成為指向一個以其值為名稱的變數引用\n"
|
||||
" -r\t將 <名稱> 變為唯讀\n"
|
||||
@@ -2962,16 +2927,15 @@ msgstr ""
|
||||
" -u\t將每個 <名稱> 的值在指派時轉為大寫\n"
|
||||
" -x\t將 <名稱> 匯出\n"
|
||||
" \n"
|
||||
" 用「+」代替「-」會關閉指定選項。\n"
|
||||
" 用「+」代替「-」會關閉指定屬性。\n"
|
||||
" \n"
|
||||
" 帶有整數屬性的變數在指派時將使用算術求值(見\n"
|
||||
" 「let」指令)\n"
|
||||
" 帶有整數屬性的變數,會在指派時執行算術求值(見「let」指令)\n"
|
||||
" \n"
|
||||
" 在函數中使用時,「declare」使 <名稱> 成為本機變數,和「local」\n"
|
||||
" 指令一致。「-g」選項壓制這個行為\n"
|
||||
" 指令一致。「-g」選項會壓制本行為\n"
|
||||
" \n"
|
||||
" 結束狀態:\n"
|
||||
" 回傳成功除非使用了無效選項或者發生錯誤。"
|
||||
" 回傳成功,除非使用了無效選項,或者發生錯誤。"
|
||||
|
||||
#: builtins.c:532
|
||||
msgid ""
|
||||
@@ -3122,7 +3086,7 @@ msgid ""
|
||||
" Exit Status:\n"
|
||||
" Returns success unless NAME is not a shell builtin or an error occurs."
|
||||
msgstr ""
|
||||
"啟用和停用 shell 內建物件。\n"
|
||||
"啟用和停用 shell 內建命令。\n"
|
||||
" \n"
|
||||
" 啟用和停用 shell 的內建指令。停用使您能夠執行一個和內建\n"
|
||||
" 指令同名磁碟上的指令,而無須使用完整的路徑名。\n"
|
||||
@@ -3140,11 +3104,11 @@ msgstr ""
|
||||
" \n"
|
||||
" 不帶選項時,每一個 <名稱> 內建都被啟用。\n"
|
||||
" \n"
|
||||
" 如果要使用 $PATH 中找到的「test」而不是 shell 內建物件的版本,\n"
|
||||
" 如果要使用 $PATH 中找到的「test」而不是 shell 內建命令的版本,\n"
|
||||
" 輸入「enable -n test」。\n"
|
||||
" \n"
|
||||
" 結束狀態:\n"
|
||||
" 回傳成功,除非 <名稱> 不是一個 shell 內建物件或者有錯誤發生。"
|
||||
" 回傳成功,除非 <名稱> 不是一個 shell 內建命令或者有錯誤發生。"
|
||||
|
||||
#: builtins.c:640
|
||||
msgid ""
|
||||
@@ -3165,45 +3129,6 @@ msgstr ""
|
||||
" 以指令的狀態結束,或者在指令為空的情況下回傳成功。"
|
||||
|
||||
#: builtins.c:652
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| "Parse option arguments.\n"
|
||||
#| " \n"
|
||||
#| " Getopts is used by shell procedures to parse positional parameters\n"
|
||||
#| " as options.\n"
|
||||
#| " \n"
|
||||
#| " OPTSTRING contains the option letters to be recognized; if a letter\n"
|
||||
#| " is followed by a colon, the option is expected to have an argument,\n"
|
||||
#| " which should be separated from it by white space.\n"
|
||||
#| " \n"
|
||||
#| " Each time it is invoked, getopts will place the next option in the\n"
|
||||
#| " shell variable $name, initializing name if it does not exist, and\n"
|
||||
#| " the index of the next argument to be processed into the shell\n"
|
||||
#| " variable OPTIND. OPTIND is initialized to 1 each time the shell or\n"
|
||||
#| " a shell script is invoked. When an option requires an argument,\n"
|
||||
#| " getopts places that argument into the shell variable OPTARG.\n"
|
||||
#| " \n"
|
||||
#| " getopts reports errors in one of two ways. If the first character\n"
|
||||
#| " of OPTSTRING is a colon, getopts uses silent error reporting. In\n"
|
||||
#| " this mode, no error messages are printed. If an invalid option is\n"
|
||||
#| " seen, getopts places the option character found into OPTARG. If a\n"
|
||||
#| " required argument is not found, getopts places a ':' into NAME and\n"
|
||||
#| " sets OPTARG to the option character found. If getopts is not in\n"
|
||||
#| " silent mode, and an invalid option is seen, getopts places '?' into\n"
|
||||
#| " NAME and unsets OPTARG. If a required argument is not found, a '?'\n"
|
||||
#| " is placed in NAME, OPTARG is unset, and a diagnostic message is\n"
|
||||
#| " printed.\n"
|
||||
#| " \n"
|
||||
#| " If the shell variable OPTERR has the value 0, getopts disables the\n"
|
||||
#| " printing of error messages, even if the first character of\n"
|
||||
#| " OPTSTRING is not a colon. OPTERR has the value 1 by default.\n"
|
||||
#| " \n"
|
||||
#| " Getopts normally parses the positional parameters ($0 - $9), but if\n"
|
||||
#| " more arguments are given, they are parsed instead.\n"
|
||||
#| " \n"
|
||||
#| " Exit Status:\n"
|
||||
#| " Returns success if an option is found; fails if the end of options is\n"
|
||||
#| " encountered or an error occurs."
|
||||
msgid ""
|
||||
"Parse option arguments.\n"
|
||||
" \n"
|
||||
@@ -3245,14 +3170,12 @@ msgid ""
|
||||
msgstr ""
|
||||
"解析選項參數。\n"
|
||||
" \n"
|
||||
" Getopts 被 shell 過程用於解析可定位的參數做為選項。\n"
|
||||
" Getopts 被 shell 過程用來將可定位的參數解析為選項。\n"
|
||||
" \n"
|
||||
" <選項字串> 字串包含待識別的選項字母。如果一個字母後面跟\n"
|
||||
" 著分號,則該選項需要一個參數,這個參數應利用空格與選項分開。\n"
|
||||
" \n"
|
||||
" <選項字串> 字串包含待識別的選項字母;如果一個字母後面跟\n"
|
||||
" 著分號,則該選項需要一個參數,而該參數應用空格與選項分開。\n"
|
||||
" \n"
|
||||
" \n"
|
||||
" 每次啟動時,getopts 會將下一個選項放到 shell 變數 $name\n"
|
||||
" 每次呼叫時,getopts 會將下一個選項放到 shell 變數 $name\n"
|
||||
" 中,如果 name 變數不存在則先將其初始化,而下一個待處\n"
|
||||
" 理的參數序號放入 shell 變數 OPTIND 中。OPTIND 變數在每\n"
|
||||
" 次 shell 或者 shell 指令稿啟動時都被初始化為 1。當一個選項要\n"
|
||||
@@ -3260,26 +3183,24 @@ msgstr ""
|
||||
" 中。\n"
|
||||
" \n"
|
||||
" getopts 有兩種通報錯誤的方法。如果 <選項字串> 變數的第\n"
|
||||
" 一個字元是冒號,getopts 使用沉默錯誤通報。在這種模式\n"
|
||||
" 下,不會印發生錯誤誤訊息。如果看到了一個無效的選項,\n"
|
||||
" getopts 將找到的選項字元放至 OPTARG 變數中。如果一個必\n"
|
||||
" 須的選項沒有找到,getopts 放一個「:」到 <名稱> 變數中並且設\n"
|
||||
" 置 OPTARG 變數為找到的選項字元。如果 getopts 不在沉默模\n"
|
||||
" 式中,並且遇到了一個無效的選項,getopts 放置一個「?」到 <名稱> \n"
|
||||
" 變數中並且取消設定 OPTARG 變數。如果必須的選項沒有找到,\n"
|
||||
" 一個「?」會被放入 <名稱> 變數中,OPTARG 將被取消設定,並且會\n"
|
||||
" 印出一個診斷資訊。\n"
|
||||
" 一個字元是冒號,getopts 進入靜默錯誤回報模式。在這種模式\n"
|
||||
" 下,不會輸出錯誤訊息。若看到了無效選項,getopts 將找到的\n"
|
||||
" 選項字元放至 OPTARG 變數中。如果找不到必要引數,getopts\n"
|
||||
" 會放一個「:」到 <名稱> 變數,並將 OPTARG 設為找到的選項字元\n"
|
||||
" 。如果 getopts 不在靜默模式中,並且遇到了一個無效的選項,\n"
|
||||
" getopts 會放置一個「?」到 <名稱> 變數,並取消設定 OPTARG。\n"
|
||||
" 如果找不到必要引數,則會在 NAME 放置「?」、取消設定 OPTARG,\n"
|
||||
" 並且會輸出診斷資訊。\n"
|
||||
" \n"
|
||||
" 如果 shell 變數 OPTERR 的值為 0,getopts 停用\n"
|
||||
" 錯誤資訊的印出,即使 <選項字串> 變數的第一個字元不是一\n"
|
||||
" 個冒號。OPTERR 的預設值為 1。\n"
|
||||
" 如果 shell 變數 OPTERR 的值為 0,getopts 停止輸出錯誤訊息,\n"
|
||||
" 即使 <選項字串> 變數的第一個字元不是冒號。OPTERR 的預設值為 1。\n"
|
||||
" \n"
|
||||
" Getopts 通常解析可定位的參數($0 - $9),不過如果提供了\n"
|
||||
" 更多的參數,它們反而會被解析。\n"
|
||||
" Getopts 通常解析可定位的參數($0 - $9),不過如果提供了\n"
|
||||
" 更多的參數,會改解析這些引數。\n"
|
||||
" \n"
|
||||
" 結束狀態:\n"
|
||||
" 如果一個選項被找到則回傳成功;如果遇到了選項的結尾或者\n"
|
||||
" 有錯誤發生則回傳失敗。"
|
||||
" 找到選項則回傳成功;如果選項提早結束,或者有錯誤發生,\n"
|
||||
" 則回傳失敗。"
|
||||
|
||||
#: builtins.c:694
|
||||
msgid ""
|
||||
@@ -3678,7 +3599,7 @@ msgstr ""
|
||||
" -l\t列出訊號名稱;如果參數後跟「-l」則被假設為訊號編號,\n"
|
||||
" \t而相應的訊號名稱會被列出\n"
|
||||
" \n"
|
||||
" Kill 成為 shell 內建物件有兩個理由:它允許使用工作編號而不是行程識別碼,\n"
|
||||
" Kill 成為 shell 內建命令有兩個理由:它允許使用工作編號而不是行程識別碼,\n"
|
||||
" 並且在可以建立的行程數上限達到時允許行程被砍除。\n"
|
||||
" \n"
|
||||
" 結束狀態:\n"
|
||||
@@ -4474,7 +4395,7 @@ msgstr ""
|
||||
" \t不回傳「file」時,不回傳任何值。\n"
|
||||
" -t\t回傳下列詞中的任何一個「alias」、「keyword」、\n"
|
||||
" \t「function」、「builtin」、「file」或者「」,如果 <名稱> 是相應的\n"
|
||||
" \t一個別名、shell 保留字、shell 函數、shell 內建物件、\n"
|
||||
" \t一個別名、shell 保留字、shell 函數、shell 內建命令、\n"
|
||||
" \t磁碟檔案或沒有找到。\n"
|
||||
" \n"
|
||||
" 參數:\n"
|
||||
@@ -4484,52 +4405,6 @@ msgstr ""
|
||||
" 如果所有的 <名稱> 指令都找到則回傳成功;任何找不到則失敗。"
|
||||
|
||||
#: builtins.c:1431
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| "Modify shell resource limits.\n"
|
||||
#| " \n"
|
||||
#| " Provides control over the resources available to the shell and processes\n"
|
||||
#| " it creates, on systems that allow such control.\n"
|
||||
#| " \n"
|
||||
#| " Options:\n"
|
||||
#| " -S\tuse the `soft' resource limit\n"
|
||||
#| " -H\tuse the `hard' resource limit\n"
|
||||
#| " -a\tall current limits are reported\n"
|
||||
#| " -b\tthe socket buffer size\n"
|
||||
#| " -c\tthe maximum size of core files created\n"
|
||||
#| " -d\tthe maximum size of a process's data segment\n"
|
||||
#| " -e\tthe maximum scheduling priority (`nice')\n"
|
||||
#| " -f\tthe maximum size of files written by the shell and its children\n"
|
||||
#| " -i\tthe maximum number of pending signals\n"
|
||||
#| " -k\tthe maximum number of kqueues allocated for this process\n"
|
||||
#| " -l\tthe maximum size a process may lock into memory\n"
|
||||
#| " -m\tthe maximum resident set size\n"
|
||||
#| " -n\tthe maximum number of open file descriptors\n"
|
||||
#| " -p\tthe pipe buffer size\n"
|
||||
#| " -q\tthe maximum number of bytes in POSIX message queues\n"
|
||||
#| " -r\tthe maximum real-time scheduling priority\n"
|
||||
#| " -s\tthe maximum stack size\n"
|
||||
#| " -t\tthe maximum amount of cpu time in seconds\n"
|
||||
#| " -u\tthe maximum number of user processes\n"
|
||||
#| " -v\tthe size of virtual memory\n"
|
||||
#| " -x\tthe maximum number of file locks\n"
|
||||
#| " -P\tthe maximum number of pseudoterminals\n"
|
||||
#| " -T\tthe maximum number of threads\n"
|
||||
#| " \n"
|
||||
#| " Not all options are available on all platforms.\n"
|
||||
#| " \n"
|
||||
#| " If LIMIT is given, it is the new value of the specified resource; the\n"
|
||||
#| " special LIMIT values `soft', `hard', and `unlimited' stand for the\n"
|
||||
#| " current soft limit, the current hard limit, and no limit, respectively.\n"
|
||||
#| " Otherwise, the current value of the specified resource is printed. If\n"
|
||||
#| " no option is given, then -f is assumed.\n"
|
||||
#| " \n"
|
||||
#| " Values are in 1024-byte increments, except for -t, which is in seconds,\n"
|
||||
#| " -p, which is in increments of 512 bytes, and -u, which is an unscaled\n"
|
||||
#| " number of processes.\n"
|
||||
#| " \n"
|
||||
#| " Exit Status:\n"
|
||||
#| " Returns success unless an invalid option is supplied or an error occurs."
|
||||
msgid ""
|
||||
"Modify shell resource limits.\n"
|
||||
" \n"
|
||||
@@ -4579,42 +4454,43 @@ msgid ""
|
||||
msgstr ""
|
||||
"修改 shell 資源限制。\n"
|
||||
" \n"
|
||||
" 在允許此類控制的系統上,提供對於 shell 及其建立的行程所可用的\n"
|
||||
" 資源的控制。\n"
|
||||
" 在允許此類控制的系統上,提供對 shell 及其建立的行程,\n"
|
||||
" 可用資源的控制。\n"
|
||||
" \n"
|
||||
" 選項:\n"
|
||||
" -S\t使用軟 (「soft」) 資源限制\n"
|
||||
" -H\t使用硬 (「hard」) 資源限制\n"
|
||||
" -a\t所有目前限制都被通報\n"
|
||||
" -b\t通訊端快取尺寸\n"
|
||||
" -c\t建立核心檔案的最大尺寸\n"
|
||||
" -d\t一個行程的資料區最大尺寸\n"
|
||||
" -e\t最高的排程優先順序 (「nice」)\n"
|
||||
" -f\t有 shell 及其子行程可以寫入的最大檔案尺寸\n"
|
||||
" -i\t最多可以暫停的訊號數\n"
|
||||
" -k\t為這個進程所分配的最大 kqueues 數量\n"
|
||||
" -l\t一個行程可以鎖定的最大記憶體尺寸\n"
|
||||
" -m\t最大的記憶體進駐尺寸\n"
|
||||
" -n\t最多開啟的檔案描述符個數\n"
|
||||
" -p\t管道緩衝區尺寸\n"
|
||||
" -q\tPOSIX 資訊佇列的最大位元組數\n"
|
||||
" -S\t使用彈性(「soft」)資源限制\n"
|
||||
" -H\t使用固定(「hard」)資源限制\n"
|
||||
" -a\t回報目前的所有限制\n"
|
||||
" -b\t通訊端快取大小\n"
|
||||
" -c\t建立之核心檔案的最大大小\n"
|
||||
" -d\t一個行程資料區的最大大小\n"
|
||||
" -e\t最高的排程優先順序(「nice」)\n"
|
||||
" -f\tshell 及其子行程可寫入的最大檔案大小\n"
|
||||
" -i\t最多可以暫停的信號數\n"
|
||||
" -k\t為本行程分配之最大 kqueues 數量\n"
|
||||
" -l\t一個行程可能鎖定的最大記憶體尺寸\n"
|
||||
" -m\t最大的常駐記憶體大小\n"
|
||||
" -n\t最多可開啟之檔案描述元個數\n"
|
||||
" -p\t管道緩衝區大小\n"
|
||||
" -q\tPOSIX 訊息佇列的最大位元組數\n"
|
||||
" -r\t即時排程的最大優先順序\n"
|
||||
" -s\t最大堆疊尺寸\n"
|
||||
" -P\t偽終端的最大數量\n"
|
||||
" -t\t最大的 CPU 時間,以秒為單位\n"
|
||||
" -t\t最多可用的 CPU 時間,以秒為單位\n"
|
||||
" -u\t最大使用者行程數\n"
|
||||
" -v\t虛擬記憶體尺寸\n"
|
||||
" -x\t最大的檔案鎖數量\n"
|
||||
" -P\t最大可開啟的偽終端數量\n"
|
||||
" -R\t一個即時執行緒在堵塞前可執行的最長時間\n"
|
||||
" -T\t最大執行緒數量\n"
|
||||
" \n"
|
||||
" 並非所有選項在所有系統上可用。\n"
|
||||
" \n"
|
||||
" 如果提供了 LIMIT 變數,則它為指定資源的新值;特別的 LIMIT 值為\n"
|
||||
" 「soft」、「hard」和「unlimited」,分別表示目前的軟限制,硬限制和無限制。\n"
|
||||
" 否則印出指定資源的目前限制值,不帶選項則假定為 -f\n"
|
||||
" 如果有指定 LIMIT,則這個變數是指定資源的新數值;特殊 LIMIT 數值\n"
|
||||
" 「soft」、「hard」和「unlimited」,分別表示目前的彈性限制、固定限制和\n"
|
||||
" 無限制。若未指定,則輸出指定資源的目前限制值,不傳入選項則假定為 -f\n"
|
||||
" \n"
|
||||
" 取值都是 1024 位元組為單位,除了 -t 以秒為單位,-p 以 512 位元組遞增,\n"
|
||||
" -u 為無尺度的行程數量。\n"
|
||||
" 取值都是 1024 位元組為單位,除了 -t 以秒為單位、-p 以 512 位元組遞增、\n"
|
||||
" -u 為無單位的行程數量。\n"
|
||||
" \n"
|
||||
" 結束狀態:\n"
|
||||
" 回傳成功,除非使用了無效的選項或者錯誤發生。"
|
||||
@@ -4652,25 +4528,6 @@ msgstr ""
|
||||
" 回傳成功,除非使用了無效的 MODE 模式或者選項。"
|
||||
|
||||
#: builtins.c:1502
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| "Wait for job completion and return exit status.\n"
|
||||
#| " \n"
|
||||
#| " Waits for each process identified by an ID, which may be a process ID or a\n"
|
||||
#| " job specification, and reports its termination status. If ID is not\n"
|
||||
#| " given, waits for all currently active child processes, and the return\n"
|
||||
#| " status is zero. If ID is a job specification, waits for all processes\n"
|
||||
#| " in that job's pipeline.\n"
|
||||
#| " \n"
|
||||
#| " If the -n option is supplied, waits for the next job to terminate and\n"
|
||||
#| " returns its exit status.\n"
|
||||
#| " \n"
|
||||
#| " If the -f option is supplied, and job control is enabled, waits for the\n"
|
||||
#| " specified ID to terminate, instead of waiting for it to change status.\n"
|
||||
#| " \n"
|
||||
#| " Exit Status:\n"
|
||||
#| " Returns the status of the last ID; fails if ID is invalid or an invalid\n"
|
||||
#| " option is given."
|
||||
msgid ""
|
||||
"Wait for job completion and return exit status.\n"
|
||||
" \n"
|
||||
@@ -4699,18 +4556,25 @@ msgid ""
|
||||
msgstr ""
|
||||
"等待工作完成並回傳結束狀態。\n"
|
||||
" \n"
|
||||
" 等待以 ID 編號識別的行程,其中 ID 可以是行程編號或者工作規格,\n"
|
||||
" 並通報它的終止狀態。如果 ID 沒有給出,則等待所有的目前活躍子\n"
|
||||
" 行程,並且回傳狀態為零。如果 ID 是工作規格,等待工作管道中的\n"
|
||||
" 等待以 ID 編號識別的行程-其中 ID 可以是行程編號或者工作規格—\n"
|
||||
" 並回報其終止狀態。若未指定 ID,則等待所有的目前活躍子行程,\n"
|
||||
" 並設定回傳狀態為 0。如果 ID 是工作規格,則等待工作管線中的\n"
|
||||
" 所有行程。\n"
|
||||
" \n"
|
||||
" 若指定了 -n 選項,等待下一個工作完成並回傳其狀態。\n"
|
||||
" 若指定了 -n 選項,則等待 ID 清單中的單一個工作;若未指定,則\n"
|
||||
" 等待下一個工作完成,並回傳其結束狀態。\n"
|
||||
" \n"
|
||||
" 如果指定了 -f 選項且啟用工作管理,則等待指定 ID 終止,而非\n"
|
||||
" 等到其變更狀態。\n"
|
||||
" 如果指定了 -p 選項,則會將選項引數中命名的 VAR 變數,指定\n"
|
||||
" 為回傳結束狀態之工作的行程或工作識別子。這個變數在指定前,\n"
|
||||
" 會先進行 unset。這個僅在指定 -n 選項時有幫助。\n"
|
||||
"\n"
|
||||
" 如果指定了 -f 選項且有啟用工作管理,則等待指定 ID 終止,\n"
|
||||
" 而非等待其變更狀態。\n"
|
||||
" \n"
|
||||
" 結束狀態:\n"
|
||||
" 回傳最後一個 ID 行程的狀態;如果使用了無效的 ID 或者選項則失敗。"
|
||||
" 回傳最後一個 ID 行程的狀態;如果 ID 或指定之選項無效;\n"
|
||||
" 或有指定 -n,shell 卻沒有要不等待 (unwaited) 的子行程,\n"
|
||||
" 則回傳失敗。"
|
||||
|
||||
#: builtins.c:1533
|
||||
msgid ""
|
||||
@@ -5398,31 +5262,6 @@ msgstr ""
|
||||
" 回傳成功,除非使用了無效的選項或者發生寫入或指派錯誤。"
|
||||
|
||||
#: builtins.c:1971
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| "Specify how arguments are to be completed by Readline.\n"
|
||||
#| " \n"
|
||||
#| " For each NAME, specify how arguments are to be completed. If no options\n"
|
||||
#| " are supplied, existing completion specifications are printed in a way that\n"
|
||||
#| " allows them to be reused as input.\n"
|
||||
#| " \n"
|
||||
#| " Options:\n"
|
||||
#| " -p\tprint existing completion specifications in a reusable format\n"
|
||||
#| " -r\tremove a completion specification for each NAME, or, if no\n"
|
||||
#| " \t\tNAMEs are supplied, all completion specifications\n"
|
||||
#| " -D\tapply the completions and actions as the default for commands\n"
|
||||
#| " \t\twithout any specific completion defined\n"
|
||||
#| " -E\tapply the completions and actions to \"empty\" commands --\n"
|
||||
#| " \t\tcompletion attempted on a blank line\n"
|
||||
#| " -I\tapply the completions and actions to the initial (usually the\n"
|
||||
#| " \t\tcommand) word\n"
|
||||
#| " \n"
|
||||
#| " When completion is attempted, the actions are applied in the order the\n"
|
||||
#| " uppercase-letter options are listed above. If multiple options are supplied,\n"
|
||||
#| " the -D option takes precedence over -E, and both take precedence over -I.\n"
|
||||
#| " \n"
|
||||
#| " Exit Status:\n"
|
||||
#| " Returns success unless an invalid option is supplied or an error occurs."
|
||||
msgid ""
|
||||
"Specify how arguments are to be completed by Readline.\n"
|
||||
" \n"
|
||||
@@ -5448,20 +5287,20 @@ msgid ""
|
||||
" Exit Status:\n"
|
||||
" Returns success unless an invalid option is supplied or an error occurs."
|
||||
msgstr ""
|
||||
"規範 readline 如何完成讀取參數。\n"
|
||||
"指定 readline 如何完成讀取引數。\n"
|
||||
" \n"
|
||||
" 規格對於每一個<名稱>如何完成讀取參數。如果不帶選項,\n"
|
||||
" 現有的補完規格會以可以重用為輸入的格式印出。\n"
|
||||
" 指定每一個 <名稱> 如何完成讀取參數。如果不指定選項,\n"
|
||||
" 現有的自動完成規格會以可以重新作為輸入使用的格式輸出。\n"
|
||||
" \n"
|
||||
" 選項:\n"
|
||||
" -p\t以可重用的格式印出現有的補完規格。\n"
|
||||
" -r\t對於每個<名稱>刪除補完規格,或者如果沒有提供<名稱>\n"
|
||||
" \t名稱,刪除所有的補完規格。\n"
|
||||
" -D\t對於沒有補完規格定義的指令,設定預設的補完動作\n"
|
||||
" -E\t對於「empty」指令設定補完動作,—— 對於空列的補完。\n"
|
||||
" -I\t套用補完和動作到首個 (通常是指令) 單詞\n"
|
||||
" -p\t以可重用的格式輸出現有的自動完成規格。\n"
|
||||
" -r\t移除每個 <名稱> 的自動完成規格。若未指定 <名稱>\n"
|
||||
" \t則移除所有自動完成規格。\n"
|
||||
" -D\t對於沒有自動完成規格定義的命令,設定預設的自動完成動作\n"
|
||||
" -E\t對於「empty」指令——嘗試對空白列進行自動完成——套用自動完成和動作。\n"
|
||||
" -I\t套用自動完成和動作到首個(通常是命令)單字\n"
|
||||
" \n"
|
||||
" 嘗試補完時,按照上述大寫字母選項的順序進行動作。 如果傳入了多個選項,\n"
|
||||
" 發起自動完成嘗試時,將依上述大寫字母選項的順序進行動作。若傳入了多個選項,\n"
|
||||
" -D 選項優先於 -E 選項,而兩者優先於 -I 選項。\n"
|
||||
" \n"
|
||||
" 結束狀態:\n"
|
||||
@@ -5478,9 +5317,9 @@ msgid ""
|
||||
" Exit Status:\n"
|
||||
" Returns success unless an invalid option is supplied or an error occurs."
|
||||
msgstr ""
|
||||
"依據選項顯示可能的補完。\n"
|
||||
"依據選項顯示可能的自動完成建議。\n"
|
||||
" \n"
|
||||
" 意圖在能產生可能的補完 shell 函數內部使用。\n"
|
||||
" 意圖在能產生可能的自動完成 shell 函數內部使用。\n"
|
||||
" 如果提供了可選的 WORD 參數,則產生按照 WORD\n"
|
||||
" 進行的符合。\n"
|
||||
" \n"
|
||||
@@ -5515,27 +5354,27 @@ msgid ""
|
||||
" Returns success unless an invalid option is supplied or NAME does not\n"
|
||||
" have a completion specification defined."
|
||||
msgstr ""
|
||||
"修改或顯示補完選項。\n"
|
||||
"修改或顯示自動完成選項。\n"
|
||||
" \n"
|
||||
" 修改每個 <名稱> 的補完選項,或如果沒有提供 <名稱>,執行目前的補完。\n"
|
||||
" 如果不帶選項,印出每個 <名稱> 的補完選項或目前的補完規格。\n"
|
||||
" 修改每個 <名稱> 的自動完成選項,或如果沒有提供 <名稱>,執行目前的自動完成。\n"
|
||||
" 如果不帶選項,印出每個 <名稱> 的自動完成選項或目前的自動完成規格。\n"
|
||||
" \n"
|
||||
" 選項:\n"
|
||||
" \t-o option\t為每個 <名稱> 設定補完選項 option\n"
|
||||
" \t-D\t\t為「default」指令補完變更選項\n"
|
||||
" \t-E\t\t為「empty」指令補完變更選項\n"
|
||||
" \t-I\t\t為首單詞上的補完變更選項\n"
|
||||
" \t-o option\t為每個 <名稱> 設定自動完成選項 option\n"
|
||||
" \t-D\t\t為「default」指令自動完成變更選項\n"
|
||||
" \t-E\t\t為「empty」指令自動完成變更選項\n"
|
||||
" \t-I\t\t為首單詞上的自動完成變更選項\n"
|
||||
" \n"
|
||||
" 使用「+o」而不是「-o」可以關閉指定的選項。\n"
|
||||
" \n"
|
||||
" 參數:\n"
|
||||
" \n"
|
||||
" 每個 <名稱> 都對應一個之前以藉由「complete」內建定義了補完規格的\n"
|
||||
" 指令。如果不提供 <名稱>,目前產生補完的函數必須呼叫 compopt,\n"
|
||||
" 並且目前執行的補完產生器選項會被修改。\n"
|
||||
" 每個 <名稱> 都對應一個之前以藉由「complete」內建定義了自動完成規格的\n"
|
||||
" 指令。如果不提供 <名稱>,目前產生自動完成的函數必須呼叫 compopt,\n"
|
||||
" 並且目前執行的自動完成產生器選項會被修改。\n"
|
||||
" \n"
|
||||
" 結束狀態:\n"
|
||||
" 回傳成功,除非使用了無效的選項或者 <名稱> 沒有定義補完規格。"
|
||||
" 回傳成功,除非使用了無效的選項或者 <名稱> 沒有定義自動完成規格。"
|
||||
|
||||
#: builtins.c:2047
|
||||
msgid ""
|
||||
|
||||
+9
-1
@@ -1,6 +1,6 @@
|
||||
/* print_command -- A way to make readable commands from a command tree. */
|
||||
|
||||
/* Copyright (C) 1989-2021 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1989-2022 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -1055,6 +1055,9 @@ print_redirection_list (redirects)
|
||||
else
|
||||
hdtail = heredocs = newredir;
|
||||
}
|
||||
#if 0
|
||||
/* Remove this heuristic now that the command printing code doesn't
|
||||
unconditionally put in the redirector file descriptor. */
|
||||
else if (redirects->instruction == r_duplicating_output_word && (redirects->flags & REDIR_VARASSIGN) == 0 && redirects->redirector.dest == 1)
|
||||
{
|
||||
/* Temporarily translate it as the execution code does. */
|
||||
@@ -1064,6 +1067,7 @@ print_redirection_list (redirects)
|
||||
print_redirection (redirects);
|
||||
redirects->instruction = r_duplicating_output_word;
|
||||
}
|
||||
#endif
|
||||
else
|
||||
print_redirection (redirects);
|
||||
|
||||
@@ -1222,6 +1226,8 @@ print_redirection (redirect)
|
||||
case r_duplicating_input_word:
|
||||
if (redirect->rflags & REDIR_VARASSIGN)
|
||||
cprintf ("{%s}<&%s", redir_word->word, redirectee->word);
|
||||
else if (redirector == 0)
|
||||
cprintf ("<&%s", redirectee->word);
|
||||
else
|
||||
cprintf ("%d<&%s", redirector, redirectee->word);
|
||||
break;
|
||||
@@ -1229,6 +1235,8 @@ print_redirection (redirect)
|
||||
case r_duplicating_output_word:
|
||||
if (redirect->rflags & REDIR_VARASSIGN)
|
||||
cprintf ("{%s}>&%s", redir_word->word, redirectee->word);
|
||||
else if (redirector == 1)
|
||||
cprintf (">&%s", redirectee->word);
|
||||
else
|
||||
cprintf ("%d>&%s", redirector, redirectee->word);
|
||||
break;
|
||||
|
||||
@@ -460,7 +460,10 @@ here_document_to_fd (redirectee, ri)
|
||||
return fd;
|
||||
}
|
||||
|
||||
#if defined (HEREDOC_PIPESIZE)
|
||||
if (shell_compatibility_level <= 50)
|
||||
goto use_tempfile;
|
||||
|
||||
#if HEREDOC_PIPESIZE
|
||||
/* Try to use a pipe internal to this process if the document is shorter
|
||||
than the system's pipe capacity (computed at build time). We want to
|
||||
write the entire document without write blocking. */
|
||||
|
||||
@@ -173,7 +173,7 @@ typedef struct _sh_parser_state_t
|
||||
int *token_state;
|
||||
|
||||
char *token;
|
||||
int token_buffer_size;
|
||||
size_t token_buffer_size;
|
||||
int eof_token;
|
||||
|
||||
/* input line state -- line number saved elsewhere */
|
||||
|
||||
+3
-2
@@ -146,7 +146,8 @@ strsub (string, pat, rep, global)
|
||||
char *string, *pat, *rep;
|
||||
int global;
|
||||
{
|
||||
int patlen, replen, templen, tempsize, repl, i;
|
||||
size_t patlen, replen, templen, tempsize, i;
|
||||
int repl;
|
||||
char *temp, *r;
|
||||
|
||||
patlen = strlen (pat);
|
||||
@@ -189,7 +190,7 @@ strcreplace (string, c, text, flags)
|
||||
int flags;
|
||||
{
|
||||
char *ret, *p, *r, *t;
|
||||
int len, rlen, ind, tlen;
|
||||
size_t len, rlen, ind, tlen;
|
||||
int do_glob, escape_backslash;
|
||||
|
||||
do_glob = flags & 1;
|
||||
|
||||
@@ -4095,7 +4095,9 @@ remove_backslashes (string)
|
||||
to the != or == operator, and should be treated as a pattern. In
|
||||
this case, we quote the string specially for the globbing code. If
|
||||
SPECIAL is 2, this is an rhs argument for the =~ operator, and should
|
||||
be quoted appropriately for regcomp/regexec. The caller is responsible
|
||||
be quoted appropriately for regcomp/regexec. If SPECIAL is 3, this is
|
||||
an array subscript and should be quoted after expansion so it's only
|
||||
expanded once (Q_ARITH). The caller is responsible
|
||||
for removing the backslashes if the unquoted word is needed later. In
|
||||
any case, since we don't perform word splitting, we need to do quoted
|
||||
null character removal. */
|
||||
|
||||
@@ -61,7 +61,6 @@ here-doc terminated with a parenthesis
|
||||
line terminated with a backslash
|
||||
./comsub-posix1.sub: line 1: syntax error near unexpected token `)'
|
||||
./comsub-posix1.sub: line 1: `echo $( if x; then echo foo )'
|
||||
after
|
||||
swap32_posix is a function
|
||||
swap32_posix ()
|
||||
{
|
||||
@@ -77,16 +76,23 @@ swap32_posix ()
|
||||
));
|
||||
done
|
||||
}
|
||||
./comsub-posix5.sub: line 37: syntax error near unexpected token `done'
|
||||
./comsub-posix5.sub: line 37: `: $(case x in x) ;; x) done esac)'
|
||||
./comsub-posix5.sub: line 38: syntax error near unexpected token `done'
|
||||
./comsub-posix5.sub: line 38: `: $(case x in x) ;; x) done ;; esac)'
|
||||
./comsub-posix5.sub: line 39: syntax error near unexpected token `esac'
|
||||
./comsub-posix5.sub: line 39: `: $(case x in x) (esac) esac)'
|
||||
bash: -c: line 1: syntax error near unexpected token `done'
|
||||
bash: -c: line 1: `: $(case x in x) ;; x) done esac)'
|
||||
bash: -c: line 1: syntax error near unexpected token `done'
|
||||
bash: -c: line 1: `: $(case x in x) ;; x) done ;; esac)'
|
||||
bash: -c: line 1: syntax error near unexpected token `esac'
|
||||
bash: -c: line 1: `: $(case x in x) (esac) esac)'
|
||||
bash: -c: line 1: syntax error near unexpected token `in'
|
||||
bash: -c: line 1: `: $(case x in esac|in) foo;; esac)'
|
||||
bash: -c: line 1: syntax error near unexpected token `done'
|
||||
bash: -c: line 1: `: $(case x in x) ;; x) done)'
|
||||
case: -c: line 3: syntax error near unexpected token `esac'
|
||||
case: -c: line 3: `$( esac ; bar=foo ; echo "$bar")) echo bad 2;;'
|
||||
ok 2
|
||||
inside outside
|
||||
ok 3
|
||||
syntax-error: -c: line 2: syntax error near unexpected token `done'
|
||||
syntax-error: -c: line 2: `: $(case x in x) ;; x) done ;; esac)'
|
||||
yes
|
||||
|
||||
|
||||
|
||||
@@ -234,13 +234,12 @@ echo $(
|
||||
)
|
||||
|
||||
${THIS_SH} ./comsub-posix1.sub
|
||||
|
||||
${THIS_SH} ./comsub-posix2.sub
|
||||
|
||||
${THIS_SH} ./comsub-posix3.sub
|
||||
|
||||
#${THIS_SH} ./comsub-posix4.sub
|
||||
${THIS_SH} ./comsub-posix5.sub
|
||||
${THIS_SH} ./comsub-posix6.sub
|
||||
|
||||
# produced a parse error through bash-4.0-beta2
|
||||
: $(echo foo)"
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
echo $( if x; then echo foo )
|
||||
|
||||
echo after
|
||||
echo should not see this
|
||||
|
||||
@@ -34,9 +34,9 @@
|
||||
: $(case x in x) (echo esac) esac)
|
||||
|
||||
# these errors should be caught sooner
|
||||
: $(case x in x) ;; x) done esac)
|
||||
: $(case x in x) ;; x) done ;; esac)
|
||||
: $(case x in x) (esac) esac)
|
||||
${THIS_SH} -c ': $(case x in x) ;; x) done esac)' bash
|
||||
${THIS_SH} -c ': $(case x in x) ;; x) done ;; esac)' bash
|
||||
${THIS_SH} -c ': $(case x in x) (esac) esac)' bash
|
||||
|
||||
# these are not errors
|
||||
: $(case x in x) ;; x) eval done ;; esac)
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
: ${THIS_SH:=./bash}
|
||||
|
||||
# comsub should not inherit PST_COMPASSIGN
|
||||
|
||||
C=($(echo "${A[@]}" | \
|
||||
(while read -d ' ' i; do
|
||||
C=(${C/ ${i%% *} / })
|
||||
done
|
||||
echo ${C[@]})))
|
||||
|
||||
# comsub should not inherit PST_CASEPAT
|
||||
|
||||
${THIS_SH} -c '
|
||||
case foo in
|
||||
$( esac ; bar=foo ; echo "$bar")) echo bad 2;;
|
||||
*) echo ok 2;;
|
||||
esac
|
||||
|
||||
echo we should not see this' case
|
||||
|
||||
# comsub should not inherit PST_SUBSHELL
|
||||
|
||||
${THIS_SH} -c '( case foo in
|
||||
( $(echo foo | cat )) echo ok 2;;
|
||||
*) echo bad 2;;
|
||||
esac
|
||||
|
||||
echo $( echo inside ) outside )' subshell
|
||||
|
||||
# comsub should not inherit PST_REDIRLIST
|
||||
|
||||
${THIS_SH} -c '
|
||||
{fd}</dev/null {fd2}<$(foo=/dev/null ; echo $foo) exec
|
||||
case $fd2 in
|
||||
[0-9]*) echo ok 3 ;;
|
||||
*) echo bad 3 ;;
|
||||
esac' redirlist
|
||||
|
||||
# comsub should exit on syntax error while parsing
|
||||
${THIS_SH} -c '
|
||||
: $(case x in x) ;; x) done ;; esac)
|
||||
|
||||
echo after syntax error' syntax-error
|
||||
+4
-4
@@ -54,10 +54,10 @@ umask: usage: umask [-p] [-S] [mode]
|
||||
./errors.tests: line 177: declare: VAR: readonly variable
|
||||
./errors.tests: line 179: declare: unset: not found
|
||||
./errors.tests: line 182: VAR: readonly variable
|
||||
./errors.tests: line 185: syntax error near unexpected token `)'
|
||||
./errors.tests: line 185: `: $( for z in 1 2 3; do )'
|
||||
./errors.tests: line 186: syntax error near unexpected token `done'
|
||||
./errors.tests: line 186: `: $( for z in 1 2 3; done )'
|
||||
comsub: -c: line 1: syntax error near unexpected token `)'
|
||||
comsub: -c: line 1: `: $( for z in 1 2 3; do )'
|
||||
comsub: -c: line 1: syntax error near unexpected token `done'
|
||||
comsub: -c: line 1: `: $( for z in 1 2 3; done )'
|
||||
./errors.tests: line 189: cd: HOME not set
|
||||
./errors.tests: line 190: cd: /tmp/xyz.bash: No such file or directory
|
||||
./errors.tests: line 192: cd: OLDPWD not set
|
||||
|
||||
+3
-3
@@ -181,9 +181,9 @@ declare -p unset
|
||||
# iteration variable in a for statement being readonly
|
||||
for VAR in 1 2 3 ; do echo $VAR; done
|
||||
|
||||
# parser errors
|
||||
: $( for z in 1 2 3; do )
|
||||
: $( for z in 1 2 3; done )
|
||||
# parser errors; caught early so we have to run them in subshells
|
||||
${THIS_SH} -c ': $( for z in 1 2 3; do )' comsub
|
||||
${THIS_SH} -c ': $( for z in 1 2 3; done )' comsub
|
||||
|
||||
# various `cd' errors
|
||||
( unset HOME ; cd )
|
||||
|
||||
+1
-1
@@ -62,7 +62,7 @@ ${THIS_SH} ./intl2.sub
|
||||
# test splitting on characters instead of bytes
|
||||
${THIS_SH} ./intl3.sub
|
||||
|
||||
${THIS_SH} ./unicode1.sub 2>/dev/null
|
||||
${THIS_SH} ./unicode1.sub # 2>/dev/null
|
||||
${THIS_SH} ./unicode2.sub
|
||||
|
||||
${THIS_SH} ./unicode3.sub 2>&1
|
||||
|
||||
+9
-4
@@ -110,14 +110,13 @@ fr_FR_ISO_8859_1=(
|
||||
)
|
||||
|
||||
# this locale causes problems all over the place
|
||||
if locale -a | grep -i '^fr_FR\.ISO8859.*1' >/dev/null ; then
|
||||
if locale -a | grep -i '^fr_FR\.ISO8859.*1$' >/dev/null ; then
|
||||
TestCodePage fr_FR.ISO8859-1 fr_FR_ISO_8859_1
|
||||
else
|
||||
echo "unicode1.sub: warning: you do not have the fr_FR.ISO8859-1 locale installed;" >&2
|
||||
echo "unicode1.sub: that will cause some of these tests to fail." >&2
|
||||
echo "unicode1.sub: that will cause some of these tests to be skipped." >&2
|
||||
fi
|
||||
|
||||
|
||||
zh_TW_BIG5=(
|
||||
[0x00f6]=$'\366' [0x00f7]=$'\367' [0x00f8]=$'\370' [0x00f9]=$'\371' [0x00fa]=$'\372'
|
||||
[0x00fb]=$'\373' [0x00fc]=$'\374' [0x00fd]=$'\375' [0x00fe]=$'\376'
|
||||
@@ -316,8 +315,14 @@ jp_JP_SHIFT_JIS=(
|
||||
[0xFF9E]=$'\xDE' # HALFWIDTH KATAKANA VOICED SOUND MARK
|
||||
[0xFF9F]=$'\xDF' # HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK
|
||||
)
|
||||
|
||||
#TestCodePage ja_JP.SHIFT_JIS jp_JP_SHIFT_JIS
|
||||
TestCodePage ja_JP.SJIS jp_JP_SHIFT_JIS
|
||||
if locale -a | grep -i '^ja_JP.SJIS' >/dev/null ; then
|
||||
TestCodePage ja_JP.SJIS jp_JP_SHIFT_JIS
|
||||
else
|
||||
echo "unicode1.sub: warning: you do not have the ja_JP.SJIS locale installed;" >&2
|
||||
echo "unicode1.sub: that will cause some of these tests to be skipped." >&2
|
||||
fi
|
||||
|
||||
#for ((x=1;x<1000;x++)); do printf ' [0x%04x]=%-11q' "$x" "$(printf "$(printf '\\U%08x' $x)")" ; [ $(($x%5)) = 0 ] && echo; done
|
||||
C_UTF_8=(
|
||||
|
||||
+29
-1
@@ -2370,7 +2370,7 @@ find_global_variable (name)
|
||||
|
||||
var = var_lookup (name, global_variables);
|
||||
if (var && nameref_p (var))
|
||||
var = find_variable_nameref (var);
|
||||
var = find_variable_nameref (var); /* XXX - find_global_variable_noref? */
|
||||
|
||||
if (var == 0)
|
||||
return ((SHELL_VAR *)NULL);
|
||||
@@ -3840,6 +3840,34 @@ unbind_variable_noref (name)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
unbind_global_variable (name)
|
||||
const char *name;
|
||||
{
|
||||
SHELL_VAR *v, *nv;
|
||||
int r;
|
||||
|
||||
v = var_lookup (name, global_variables);
|
||||
/* This starts at the current scope, just like find_global_variable; should we
|
||||
use find_global_variable_nameref here? */
|
||||
nv = (v && nameref_p (v)) ? find_variable_nameref (v) : (SHELL_VAR *)NULL;
|
||||
|
||||
r = nv ? makunbound (nv->name, shell_variables) : makunbound (name, global_variables);
|
||||
return r;
|
||||
}
|
||||
|
||||
int
|
||||
unbind_global_variable_noref (name)
|
||||
const char *name;
|
||||
{
|
||||
SHELL_VAR *v;
|
||||
|
||||
v = var_lookup (name, global_variables);
|
||||
if (v)
|
||||
return makunbound (name, global_variables);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
check_unbind_variable (name)
|
||||
const char *name;
|
||||
|
||||
@@ -328,6 +328,8 @@ extern int unbind_variable PARAMS((const char *));
|
||||
extern int check_unbind_variable PARAMS((const char *));
|
||||
extern int unbind_nameref PARAMS((const char *));
|
||||
extern int unbind_variable_noref PARAMS((const char *));
|
||||
extern int unbind_global_variable PARAMS((const char *));
|
||||
extern int unbind_global_variable_noref PARAMS((const char *));
|
||||
extern int unbind_func PARAMS((const char *));
|
||||
extern int unbind_function_def PARAMS((const char *));
|
||||
extern int delete_var PARAMS((const char *, VAR_CONTEXT *));
|
||||
|
||||
@@ -5143,7 +5143,7 @@ push_token (x)
|
||||
static char *token = (char *)NULL;
|
||||
|
||||
/* Current size of the token buffer. */
|
||||
static int token_buffer_size;
|
||||
static size_t token_buffer_size;
|
||||
|
||||
/* Command to read_token () explaining what we want it to do. */
|
||||
#define READ 0
|
||||
@@ -6374,7 +6374,12 @@ parse_comsub (qc, open, close, lenp, flags)
|
||||
pushed_string_list = (STRING_SAVER *)NULL;
|
||||
|
||||
/* State flags we don't want to persist into command substitutions. */
|
||||
parser_state &= ~(PST_REGEXP|PST_EXTPAT|PST_CONDCMD|PST_CONDEXPR);
|
||||
parser_state &= ~(PST_REGEXP|PST_EXTPAT|PST_CONDCMD|PST_CONDEXPR|PST_COMPASSIGN);
|
||||
/* Could do PST_CASESTMT too, but that also affects history. Setting
|
||||
expecting_in_token below should take care of the parsing requirements.
|
||||
Unsetting PST_REDIRLIST isn't strictly necessary because of how we set
|
||||
token_to_read below, but we do it anyway. */
|
||||
parser_state &= ~(PST_CASEPAT|PST_ALEXPNEXT|PST_SUBSHELL|PST_REDIRLIST);
|
||||
/* State flags we want to set for this run through the parser. */
|
||||
parser_state |= PST_CMDSUBST|PST_EOFTOKEN|PST_NOEXPAND;
|
||||
|
||||
@@ -6413,7 +6418,14 @@ parse_comsub (qc, open, close, lenp, flags)
|
||||
else if (r != 0)
|
||||
{
|
||||
/* parser_error (start_lineno, _("could not parse command substitution")); */
|
||||
jump_to_top_level (DISCARD);
|
||||
/* Non-interactive shells exit on parse error in a command substitution. */
|
||||
if (last_command_exit_value == 0)
|
||||
last_command_exit_value = EXECUTION_FAILURE;
|
||||
set_exit_status (last_command_exit_value);
|
||||
if (interactive_shell == 0)
|
||||
jump_to_top_level (FORCE_EOF); /* This is like reader_loop() */
|
||||
else
|
||||
jump_to_top_level (DISCARD);
|
||||
}
|
||||
|
||||
if (current_token != shell_eof_token)
|
||||
@@ -6529,7 +6541,8 @@ xparse_dolparen (base, string, indp, flags)
|
||||
clear_shell_input_line (); /* XXX */
|
||||
if (bash_input.type != st_string) /* paranoia */
|
||||
parser_state &= ~(PST_CMDSUBST|PST_EOFTOKEN);
|
||||
jump_to_top_level (-nc); /* XXX */
|
||||
if ((flags & SX_NOLONGJMP) == 0)
|
||||
jump_to_top_level (-nc); /* XXX */
|
||||
}
|
||||
|
||||
/* Need to find how many characters parse_string() consumed, update
|
||||
@@ -8595,31 +8608,26 @@ parse_string_to_word_list (s, flags, whom)
|
||||
const char *whom;
|
||||
{
|
||||
WORD_LIST *wl;
|
||||
int tok, orig_current_token, orig_line_number, orig_input_terminator;
|
||||
int orig_line_count, orig_parser_state;
|
||||
int old_echo_input, old_expand_aliases, ea;
|
||||
#if defined (HISTORY)
|
||||
int old_remember_on_history, old_history_expansion_inhibited;
|
||||
#endif
|
||||
int tok, orig_current_token, orig_line_number;
|
||||
int orig_parser_state;
|
||||
sh_parser_state_t ps;
|
||||
int ea;
|
||||
|
||||
#if defined (HISTORY)
|
||||
old_remember_on_history = remember_on_history;
|
||||
# if defined (BANG_HISTORY)
|
||||
old_history_expansion_inhibited = history_expansion_inhibited;
|
||||
# endif
|
||||
bash_history_disable ();
|
||||
#endif
|
||||
|
||||
orig_line_number = line_number;
|
||||
orig_line_count = current_command_line_count;
|
||||
orig_input_terminator = shell_input_line_terminator;
|
||||
old_echo_input = echo_input_at_read;
|
||||
old_expand_aliases = expand_aliases;
|
||||
save_parser_state (&ps);
|
||||
|
||||
push_stream (1);
|
||||
if (ea = expanding_alias ())
|
||||
parser_save_alias ();
|
||||
last_read_token = WORD; /* WORD to allow reserved words here */
|
||||
|
||||
/* WORD to avoid parsing reserved words as themselves and just parse them as
|
||||
WORDs. */
|
||||
last_read_token = WORD;
|
||||
|
||||
current_command_line_count = 0;
|
||||
echo_input_at_read = expand_aliases = 0;
|
||||
|
||||
@@ -8628,9 +8636,11 @@ parse_string_to_word_list (s, flags, whom)
|
||||
|
||||
if (flags & 1)
|
||||
{
|
||||
orig_parser_state = parser_state;
|
||||
parser_state |= PST_COMPASSIGN|PST_REPARSE;
|
||||
orig_parser_state = parser_state; /* XXX - not needed? */
|
||||
/* State flags we don't want to persist into compound assignments. */
|
||||
parser_state &= ~PST_NOEXPAND; /* parse_comsub sentinel */
|
||||
/* State flags we want to set for this run through the tokenizer. */
|
||||
parser_state |= PST_COMPASSIGN|PST_REPARSE;
|
||||
}
|
||||
|
||||
while ((tok = read_token (READ)) != yacc_EOF)
|
||||
@@ -8660,21 +8670,10 @@ parse_string_to_word_list (s, flags, whom)
|
||||
if (ea)
|
||||
parser_restore_alias ();
|
||||
|
||||
#if defined (HISTORY)
|
||||
remember_on_history = old_remember_on_history;
|
||||
# if defined (BANG_HISTORY)
|
||||
history_expansion_inhibited = old_history_expansion_inhibited;
|
||||
# endif /* BANG_HISTORY */
|
||||
#endif /* HISTORY */
|
||||
|
||||
echo_input_at_read = old_echo_input;
|
||||
expand_aliases = old_expand_aliases;
|
||||
|
||||
current_command_line_count = orig_line_count;
|
||||
shell_input_line_terminator = orig_input_terminator;
|
||||
restore_parser_state (&ps);
|
||||
|
||||
if (flags & 1)
|
||||
parser_state = orig_parser_state;
|
||||
parser_state = orig_parser_state; /* XXX - not needed? */
|
||||
|
||||
if (wl == &parse_string_error)
|
||||
{
|
||||
@@ -8693,28 +8692,31 @@ parse_compound_assignment (retlenp)
|
||||
int *retlenp;
|
||||
{
|
||||
WORD_LIST *wl, *rl;
|
||||
int tok, orig_line_number, orig_token_size, orig_last_token, assignok;
|
||||
int orig_parser_state;
|
||||
char *saved_token, *ret;
|
||||
int tok, orig_line_number, assignok;
|
||||
sh_parser_state_t ps;
|
||||
char *ret;
|
||||
|
||||
saved_token = token;
|
||||
orig_token_size = token_buffer_size;
|
||||
orig_line_number = line_number;
|
||||
orig_last_token = last_read_token;
|
||||
orig_parser_state = parser_state;
|
||||
save_parser_state (&ps);
|
||||
|
||||
last_read_token = WORD; /* WORD to allow reserved words here */
|
||||
/* WORD to avoid parsing reserved words as themselves and just parse them as
|
||||
WORDs. Plus it means we won't be in a command position and so alias
|
||||
expansion won't happen. */
|
||||
last_read_token = WORD;
|
||||
|
||||
token = (char *)NULL;
|
||||
token_buffer_size = 0;
|
||||
wl = (WORD_LIST *)NULL; /* ( */
|
||||
|
||||
assignok = parser_state&PST_ASSIGNOK; /* XXX */
|
||||
|
||||
wl = (WORD_LIST *)NULL; /* ( */
|
||||
orig_parser_state = parser_state;
|
||||
parser_state &= ~PST_NOEXPAND;
|
||||
/* State flags we don't want to persist into compound assignments. */
|
||||
parser_state &= ~(PST_NOEXPAND|PST_CONDCMD|PST_CONDEXPR|PST_REGEXP|PST_EXTPAT);
|
||||
/* State flags we want to set for this run through the tokenizer. */
|
||||
parser_state |= PST_COMPASSIGN;
|
||||
|
||||
esacs_needed_count = expecting_in_token = 0;
|
||||
|
||||
while ((tok = read_token (READ)) != ')')
|
||||
{
|
||||
if (tok == '\n') /* Allow newlines in compound assignments */
|
||||
@@ -8738,11 +8740,7 @@ parse_compound_assignment (retlenp)
|
||||
wl = make_word_list (yylval.word, wl);
|
||||
}
|
||||
|
||||
FREE (token);
|
||||
token = saved_token;
|
||||
token_buffer_size = orig_token_size;
|
||||
|
||||
parser_state = orig_parser_state;
|
||||
restore_parser_state (&ps);
|
||||
|
||||
if (wl == &parse_string_error)
|
||||
{
|
||||
@@ -8754,8 +8752,6 @@ parse_compound_assignment (retlenp)
|
||||
jump_to_top_level (DISCARD);
|
||||
}
|
||||
|
||||
last_read_token = orig_last_token; /* XXX - was WORD? */
|
||||
|
||||
if (wl)
|
||||
{
|
||||
rl = REVERSE_LIST (wl, WORD_LIST *);
|
||||
|
||||
Reference in New Issue
Block a user