mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-06-23 22:07:58 +02:00
builtins now return success if supplied --help; use groff to build HTML man pages; reset mbstate if $'...' strings read an invalid multibyte sequence; read -t 0 now looks at other options (-n/-N/-d) and sets the terminal state appropriately
This commit is contained in:
@@ -11795,3 +11795,41 @@ execute_cmd.c
|
||||
- execute_function: save and restore the_printed_command_except_trap
|
||||
(reflected in $BASH_COMMAND) around shell function calls
|
||||
From a report by Mike Jonkmans <bashbug@jonkmans.nl>
|
||||
|
||||
9/19
|
||||
----
|
||||
builtins/common.h
|
||||
- CHECK_HELPOPT, CASE_HELPOPT: return EXECUTION_SUCCESS if --help is
|
||||
supplied
|
||||
From a report by pourko@tutamail.com
|
||||
|
||||
shell.h,builtins/common.c
|
||||
- no_options: return EX_HELPOPT if --help is supplied to allow callers
|
||||
to return success
|
||||
|
||||
builtins/getopts.def,builtins/times.def,builtins/builtin.def,builtins/eval.def
|
||||
- return EXECUTION_SUCCESS if no_options returns EX_HELPOPT
|
||||
From a report by pourko@tutamail.com
|
||||
|
||||
Makefile.in
|
||||
- man2html: remove from dependencies, since we're currently using
|
||||
groff to build HTML man pages
|
||||
|
||||
9/22
|
||||
----
|
||||
lib/sh/strtrans.c
|
||||
- ansicstr: break out of the loop if mbrtowc returns 0 (NULL wchar_t)
|
||||
Report and patch from Grisha Levit <grishalevit@gmail.com>
|
||||
- ansic_quote: go to the end of the quoting loop on a null wide
|
||||
character; use a goto since we're in a switch statement
|
||||
Report and patch from Grisha Levit <grishalevit@gmail.com>
|
||||
|
||||
9/23
|
||||
----
|
||||
builtins/read.def
|
||||
- check_read_input: new function, call input_avail but optionally
|
||||
change the terminal settings to what they would be if supplied the
|
||||
-n/-N/-d options
|
||||
- read_builtin: call check_read_input instead of input_avail if we
|
||||
have a zero timeout
|
||||
From a report by pourko@tutamail.com
|
||||
|
||||
@@ -735,7 +735,7 @@ support/signames.c f
|
||||
support/siglen.c f
|
||||
#support/bashbug.sh f
|
||||
support/bashbug.sh.in f
|
||||
support/man2html.c f
|
||||
#support/man2html.c f
|
||||
support/recho.c f
|
||||
support/zecho.c f
|
||||
support/xcase.c f
|
||||
@@ -863,9 +863,10 @@ examples/functions/login f
|
||||
#examples/functions/mhfold f
|
||||
#examples/functions/newdirstack.bsh f
|
||||
examples/functions/notify.bash f
|
||||
examples/functions/repeat f
|
||||
examples/functions/repeat2 f
|
||||
#examples/functions/pathfuncs f
|
||||
#examples/functions/recurse f
|
||||
#examples/functions/repeat2 f
|
||||
#examples/functions/repeat3 f
|
||||
examples/functions/seq f
|
||||
examples/functions/seq2 f
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
# Makefile for bash-5.3, version 5.10
|
||||
# Makefile for bash-5.3, version 5.11
|
||||
#
|
||||
# Copyright (C) 1996-2025 Free Software Foundation, Inc.
|
||||
|
||||
@@ -627,7 +627,7 @@ LOADABLES_DIR = ${top_builddir}/examples/loadables
|
||||
# Keep GNU Make from exporting the entire environment for small machines.
|
||||
.NOEXPORT:
|
||||
|
||||
.made: $(Program) bashbug $(SUPPORT_DIR)/man2html$(EXEEXT)
|
||||
.made: $(Program) bashbug
|
||||
@echo "$(Program) last made for a $(Machine) running $(OS)" >.made
|
||||
|
||||
$(Program): $(OBJECTS) $(BUILTINS_DEP) $(LIBDEP) .build
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
This file is builtin.def, from which is created builtin.c.
|
||||
It implements the builtin "builtin" in Bash.
|
||||
|
||||
Copyright (C) 1987-2017,2022 Free Software Foundation, Inc.
|
||||
Copyright (C) 1987-2017,2022-2025 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -54,9 +54,10 @@ builtin_builtin (WORD_LIST *list)
|
||||
{
|
||||
sh_builtin_func_t *function;
|
||||
register char *command;
|
||||
int r;
|
||||
|
||||
if (no_options (list))
|
||||
return (EX_USAGE);
|
||||
if (r = no_options (list))
|
||||
return (r == EX_HELPOPT ? EXECUTION_SUCCESS : EX_USAGE);
|
||||
list = loptend; /* skip over possible `--' */
|
||||
|
||||
if (list == 0)
|
||||
|
||||
+1
-1
@@ -164,7 +164,7 @@ no_options (WORD_LIST *list)
|
||||
if (opt == GETOPT_HELP)
|
||||
{
|
||||
builtin_help ();
|
||||
return (2);
|
||||
return (EX_HELPOPT);
|
||||
}
|
||||
builtin_usage ();
|
||||
return (1);
|
||||
|
||||
+2
-2
@@ -31,14 +31,14 @@ do { \
|
||||
if ((l) && (l)->word && ISHELP((l)->word->word)) \
|
||||
{ \
|
||||
builtin_help (); \
|
||||
return (EX_USAGE); \
|
||||
return (EXECUTION_SUCCESS); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define CASE_HELPOPT \
|
||||
case GETOPT_HELP: \
|
||||
builtin_help (); \
|
||||
return (EX_USAGE)
|
||||
return (EXECUTION_SUCCESS)
|
||||
|
||||
/* Flag values for parse_and_execute () and parse_string () */
|
||||
#define SEVAL_NONINT 0x001
|
||||
|
||||
+5
-3
@@ -1,7 +1,7 @@
|
||||
This file is eval.def, from which is created eval.c.
|
||||
It implements the builtin "eval" in Bash.
|
||||
|
||||
Copyright (C) 1987-2016,2022 Free Software Foundation, Inc.
|
||||
Copyright (C) 1987-2016,2022-2025 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -48,8 +48,10 @@ $END
|
||||
int
|
||||
eval_builtin (WORD_LIST *list)
|
||||
{
|
||||
if (no_options (list))
|
||||
return (EX_USAGE);
|
||||
int r;
|
||||
|
||||
if (r = no_options (list))
|
||||
return (r == EX_HELPOPT ? EXECUTION_SUCCESS : EX_USAGE);
|
||||
list = loptend; /* skip over possible `--' */
|
||||
|
||||
return (list ? evalstring (string_list (list), "eval", SEVAL_NOHIST|SEVAL_NOOPTIMIZE) : EXECUTION_SUCCESS);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
This file is getopts.def, from which is created getopts.c.
|
||||
It implements the builtin "getopts" in Bash.
|
||||
|
||||
Copyright (C) 1987-2024 Free Software Foundation, Inc.
|
||||
Copyright (C) 1987-2025 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -315,8 +315,8 @@ getopts_builtin (WORD_LIST *list)
|
||||
char **av;
|
||||
int ac, ret;
|
||||
|
||||
if (no_options (list))
|
||||
return (EX_USAGE);
|
||||
if (ret = no_options (list))
|
||||
return (ret == EX_HELPOPT ? EXECUTION_SUCCESS : EX_USAGE);
|
||||
list = loptend; /* skip over possible `--' */
|
||||
|
||||
if (list == 0)
|
||||
|
||||
+31
-2
@@ -216,6 +216,28 @@ uw_reset_rl_instream (void *fp)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Check whether there is input on FD after setting the terminal settings to
|
||||
what they would be if the read was actually performed. */
|
||||
static int
|
||||
check_read_input (int fd, int change_term)
|
||||
{
|
||||
TTYSTRUCT ttattrs, ttset;
|
||||
int r;
|
||||
|
||||
if (change_term)
|
||||
{
|
||||
ttgetattr (fd, &ttattrs);
|
||||
ttset = ttattrs;
|
||||
r = ttfd_onechar (fd, &ttset);
|
||||
if (r < 0)
|
||||
sh_ttyerror (1);
|
||||
}
|
||||
r = input_avail (fd);
|
||||
if (change_term)
|
||||
ttsetattr (fd, &ttattrs);
|
||||
return r;
|
||||
}
|
||||
|
||||
/* Read the value of the shell variables whose names follow.
|
||||
The reading is done from the current input stream, whatever
|
||||
that may be. Successive words of the input line are assigned
|
||||
@@ -300,7 +322,8 @@ read_builtin (WORD_LIST *list)
|
||||
|
||||
mb_cur_max = MB_CUR_MAX;
|
||||
tmsec = tmusec = 0; /* no timeout */
|
||||
nr = nchars = input_is_tty = input_is_pipe = unbuffered_read = have_timeout = 0;
|
||||
nr = nchars = input_is_pipe = unbuffered_read = have_timeout = 0;
|
||||
input_is_tty = -1; /* not checked yet */
|
||||
delim = '\n'; /* read until newline */
|
||||
ignore_delim = nflag = 0;
|
||||
|
||||
@@ -395,7 +418,12 @@ read_builtin (WORD_LIST *list)
|
||||
/* `read -t 0 var' tests whether input is available with select/FIONREAD,
|
||||
and fails if those are unavailable */
|
||||
if (have_timeout && tmsec == 0 && tmusec == 0)
|
||||
return (input_avail (fd) ? EXECUTION_SUCCESS : EXECUTION_FAILURE);
|
||||
{
|
||||
int ct; /* change terminal settings */
|
||||
|
||||
ct = (nflag || delim) && isatty (fd);
|
||||
return (check_read_input (fd, ct) ? EXECUTION_SUCCESS : EXECUTION_FAILURE);
|
||||
}
|
||||
|
||||
/* Convenience: check early whether or not the first of possibly several
|
||||
variable names is a valid identifier, and bail early if so. */
|
||||
@@ -477,6 +505,7 @@ read_builtin (WORD_LIST *list)
|
||||
#else
|
||||
input_is_tty = 1;
|
||||
#endif
|
||||
|
||||
if (input_is_tty == 0)
|
||||
#ifndef __CYGWIN__
|
||||
input_is_pipe = fd_ispipe (fd);
|
||||
|
||||
+4
-1
@@ -30,6 +30,9 @@ the evaluation of EXPR. Expressions may be unary or binary. Unary
|
||||
expressions are often used to examine the status of a file. There
|
||||
are string operators and numeric comparison operators as well.
|
||||
|
||||
Unless specified otherwise, primaries that operate on files operate
|
||||
on the target of a symbolic link rather than the link itself.
|
||||
|
||||
The behavior of test depends on the number of arguments. Read the
|
||||
bash manual page for the complete specification.
|
||||
|
||||
@@ -62,7 +65,7 @@ File operators:
|
||||
|
||||
FILE1 -ot FILE2 True if file1 is older than file2.
|
||||
|
||||
FILE1 -ef FILE2 True if file1 is a hard link to file2.
|
||||
FILE1 -ef FILE2 True if file1 and file2 refer to the same file.
|
||||
|
||||
String operators:
|
||||
|
||||
|
||||
+8
-7
@@ -1,7 +1,7 @@
|
||||
This file is times.def, from which is created times.c.
|
||||
It implements the builtin "times" in Bash.
|
||||
|
||||
Copyright (C) 1987-2009,2022 Free Software Foundation, Inc.
|
||||
Copyright (C) 1987-2009,2022-2025 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -64,13 +64,14 @@ $END
|
||||
int
|
||||
times_builtin (WORD_LIST *list)
|
||||
{
|
||||
int r;
|
||||
#if defined (HAVE_GETRUSAGE) && defined (HAVE_TIMEVAL) && defined (RUSAGE_SELF)
|
||||
struct rusage self, kids;
|
||||
|
||||
USE_VAR(list);
|
||||
|
||||
if (no_options (list))
|
||||
return (EX_USAGE);
|
||||
if (r = no_options (list))
|
||||
return (r == EX_HELPOPT ? EXECUTION_SUCCESS : EX_USAGE);
|
||||
|
||||
getrusage (RUSAGE_SELF, &self);
|
||||
getrusage (RUSAGE_CHILDREN, &kids); /* terminated child processes */
|
||||
@@ -92,8 +93,8 @@ times_builtin (WORD_LIST *list)
|
||||
|
||||
USE_VAR(list);
|
||||
|
||||
if (no_options (list))
|
||||
return (EX_USAGE);
|
||||
if (r = no_options (list))
|
||||
return (r == EX_HELPOPT ? EXECUTION_SUCCESS : EX_USAGE);
|
||||
|
||||
times (&t);
|
||||
|
||||
@@ -110,8 +111,8 @@ times_builtin (WORD_LIST *list)
|
||||
|
||||
USE_VAR(list);
|
||||
|
||||
if (no_options (list))
|
||||
return (EX_USAGE);
|
||||
if (r = no_options (list))
|
||||
return (r == EX_HELPOPT ? EXECUTION_SUCCESS : EX_USAGE);
|
||||
printf ("0.00 0.00\n0.00 0.00\n");
|
||||
|
||||
# endif /* HAVE_TIMES */
|
||||
|
||||
+1059
-1053
File diff suppressed because it is too large
Load Diff
+8
-2
@@ -5,7 +5,7 @@
|
||||
.\" Case Western Reserve University
|
||||
.\" chet.ramey@case.edu
|
||||
.\"
|
||||
.\" Last Change: Sat Sep 6 15:27:27 EDT 2025
|
||||
.\" Last Change: Fri Sep 19 12:19:06 EDT 2025
|
||||
.\"
|
||||
.\" For bash_builtins, strip all but "SHELL BUILTIN COMMANDS" section
|
||||
.\" For rbash, strip all but "RESTRICTED SHELL" section
|
||||
@@ -21,7 +21,7 @@
|
||||
.ds zY \" empty
|
||||
.if \n(zZ=1 .ig zZ
|
||||
.if \n(zY=1 .ig zY
|
||||
.TH BASH 1 "2025 September 6" "GNU Bash 5.3"
|
||||
.TH BASH 1 "2025 September 19" "GNU Bash 5.3"
|
||||
.\"
|
||||
.ie \n(.g \{\
|
||||
.ds ' \(aq
|
||||
@@ -9016,6 +9016,12 @@ Other builtins that accept arguments but are not specified as accepting
|
||||
options interpret arguments beginning with \fB\-\fP as invalid options and
|
||||
require \fB\-\-\fP to prevent this interpretation.
|
||||
.PP
|
||||
All builtins except
|
||||
\fB:\fP, \fBtrue\fP, \fBfalse\fP, \fBecho\fP, and \fBtest\fP/\fB[\fP
|
||||
accept \fB--help\fP as a special option.
|
||||
If \fB--help\fP is supplied, these builtins output
|
||||
a help message and exit with a status of 0.
|
||||
.PP
|
||||
.PD 0
|
||||
.TP
|
||||
\fB:\fP [\fIarguments\fP]
|
||||
|
||||
+10
-3
@@ -1,5 +1,5 @@
|
||||
<!-- Creator : groff version 1.23.0 -->
|
||||
<!-- CreationDate: Sat Sep 6 15:33:53 2025 -->
|
||||
<!-- CreationDate: Fri Sep 19 16:30:11 2025 -->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
@@ -10521,7 +10521,13 @@ arguments beginning with <b>−</b> without requiring
|
||||
but are not specified as accepting options interpret
|
||||
arguments beginning with <b>−</b> as invalid options
|
||||
and require <b>−−</b> to prevent this
|
||||
interpretation. <b><br>
|
||||
interpretation.</p>
|
||||
|
||||
<p style="margin-left:9%; margin-top: 1em">All builtins
|
||||
except <b>:</b>, <b>true</b>, <b>false</b>, <b>echo</b>, and
|
||||
<b>test</b>/<b>[</b> accept <b>--help</b> as a special
|
||||
option. If <b>--help</b> is supplied, these builtins output
|
||||
a help message and exit with a status of 0. <b><br>
|
||||
:</b> [<i>arguments</i>]</p>
|
||||
|
||||
<p style="margin-left:18%;">No effect; the command does
|
||||
@@ -15552,7 +15558,8 @@ useful only when used with the <b>−n</b> option.</p>
|
||||
<b>−f</b> option, when job control is enabled, forces
|
||||
<b>wait</b> to wait for each <i>id</i> to terminate before
|
||||
returning its status, instead of returning when it changes
|
||||
status.</p>
|
||||
status. If there are no <i>id</i> arguments, <b>wait</b>
|
||||
waits until all background processes have terminated.</p>
|
||||
|
||||
<p style="margin-left:18%; margin-top: 1em">If none of the
|
||||
<i>id</i>s specify one of the shell’s active child
|
||||
|
||||
+145
-139
@@ -1,9 +1,9 @@
|
||||
This is bash.info, produced by makeinfo version 7.2 from bashref.texi.
|
||||
|
||||
This text is a brief description of the features that are present in the
|
||||
Bash shell (version 5.3, 6 September 2025).
|
||||
Bash shell (version 5.3, 19 September 2025).
|
||||
|
||||
This is Edition 5.3, last updated 6 September 2025, of ‘The GNU Bash
|
||||
This is Edition 5.3, last updated 19 September 2025, of ‘The GNU Bash
|
||||
Reference Manual’, for ‘Bash’, Version 5.3.
|
||||
|
||||
Copyright © 1988-2025 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.3, 6 September 2025). The Bash home page is
|
||||
Bash shell (version 5.3, 19 September 2025). The Bash home page is
|
||||
<http://www.gnu.org/software/bash/>.
|
||||
|
||||
This is Edition 5.3, last updated 6 September 2025, of ‘The GNU Bash
|
||||
This is Edition 5.3, last updated 19 September 2025, of ‘The GNU Bash
|
||||
Reference Manual’, for ‘Bash’, Version 5.3.
|
||||
|
||||
Bash contains features that appear in other popular shells, and some
|
||||
@@ -3452,6 +3452,10 @@ that accept arguments but are not specified as accepting options
|
||||
interpret arguments beginning with ‘-’ as invalid options and require
|
||||
‘--’ to prevent this interpretation.
|
||||
|
||||
All builtins except ‘:’, ‘true’, ‘false’, ‘echo’, and ‘test’/‘[’
|
||||
accept ‘--help’ as a special option. If ‘--help’ is supplied, these
|
||||
builtins output a help message and exit with a status of 0.
|
||||
|
||||
|
||||
File: bash.info, Node: Bourne Shell Builtins, Next: Bash Builtins, Up: Shell Builtin Commands
|
||||
|
||||
@@ -8435,7 +8439,9 @@ File: bash.info, Node: Job Control Builtins, Next: Job Control Variables, Pre
|
||||
|
||||
Supplying the ‘-f’ option, when job control is enabled, forces
|
||||
‘wait’ to wait for each ID to terminate before returning its
|
||||
status, instead of returning when it changes status.
|
||||
status, instead of returning when it changes status. If there are
|
||||
no ID arguments, ‘wait’ waits until all background processes have
|
||||
terminated.
|
||||
|
||||
If none of the IDs specify one of the shell's an active child
|
||||
processes, the return status is 127. If ‘wait’ is interrupted by a
|
||||
@@ -12902,7 +12908,7 @@ D.1 Index of Shell Builtin Commands
|
||||
* dirs: Directory Stack Builtins.
|
||||
(line 7)
|
||||
* disown: Job Control Builtins.
|
||||
(line 120)
|
||||
(line 122)
|
||||
* echo: Bash Builtins. (line 284)
|
||||
* enable: Bash Builtins. (line 337)
|
||||
* eval: Bourne Shell Builtins.
|
||||
@@ -12953,7 +12959,7 @@ D.1 Index of Shell Builtin Commands
|
||||
* shopt: The Shopt Builtin. (line 9)
|
||||
* source: Bash Builtins. (line 678)
|
||||
* suspend: Job Control Builtins.
|
||||
(line 139)
|
||||
(line 141)
|
||||
* test: Bourne Shell Builtins.
|
||||
(line 340)
|
||||
* times: Bourne Shell Builtins.
|
||||
@@ -13651,138 +13657,138 @@ D.5 Concept Index
|
||||
|
||||
|
||||
Tag Table:
|
||||
Node: Top901
|
||||
Node: Introduction2842
|
||||
Node: What is Bash?3055
|
||||
Node: What is a shell?4188
|
||||
Node: Definitions6798
|
||||
Node: Basic Shell Features10125
|
||||
Node: Shell Syntax11349
|
||||
Node: Shell Operation12376
|
||||
Node: Quoting13667
|
||||
Node: Escape Character15005
|
||||
Node: Single Quotes15540
|
||||
Node: Double Quotes15889
|
||||
Node: ANSI-C Quoting17234
|
||||
Node: Locale Translation18628
|
||||
Node: Creating Internationalized Scripts20031
|
||||
Node: Comments24229
|
||||
Node: Shell Commands24996
|
||||
Node: Reserved Words25935
|
||||
Node: Simple Commands27078
|
||||
Node: Pipelines27740
|
||||
Node: Lists30996
|
||||
Node: Compound Commands32916
|
||||
Node: Looping Constructs33925
|
||||
Node: Conditional Constructs36474
|
||||
Node: Command Grouping51611
|
||||
Node: Coprocesses53103
|
||||
Node: GNU Parallel55789
|
||||
Node: Shell Functions56707
|
||||
Node: Shell Parameters65155
|
||||
Node: Positional Parameters70056
|
||||
Node: Special Parameters71146
|
||||
Node: Shell Expansions74607
|
||||
Node: Brace Expansion76796
|
||||
Node: Tilde Expansion80132
|
||||
Node: Shell Parameter Expansion83087
|
||||
Node: Command Substitution103730
|
||||
Node: Arithmetic Expansion107259
|
||||
Node: Process Substitution108435
|
||||
Node: Word Splitting109543
|
||||
Node: Filename Expansion111987
|
||||
Node: Pattern Matching115211
|
||||
Node: Quote Removal120934
|
||||
Node: Redirections121238
|
||||
Node: Executing Commands131494
|
||||
Node: Simple Command Expansion132161
|
||||
Node: Command Search and Execution134269
|
||||
Node: Command Execution Environment136713
|
||||
Node: Environment140161
|
||||
Node: Exit Status142064
|
||||
Node: Signals144123
|
||||
Node: Shell Scripts149053
|
||||
Node: Shell Builtin Commands152351
|
||||
Node: Bourne Shell Builtins154462
|
||||
Node: Bash Builtins181181
|
||||
Node: Modifying Shell Behavior218105
|
||||
Node: The Set Builtin218447
|
||||
Node: The Shopt Builtin230441
|
||||
Node: Special Builtins247494
|
||||
Node: Shell Variables248483
|
||||
Node: Bourne Shell Variables248917
|
||||
Node: Bash Variables251425
|
||||
Node: Bash Features290550
|
||||
Node: Invoking Bash291564
|
||||
Node: Bash Startup Files298148
|
||||
Node: Interactive Shells303390
|
||||
Node: What is an Interactive Shell?303798
|
||||
Node: Is this Shell Interactive?304460
|
||||
Node: Interactive Shell Behavior305284
|
||||
Node: Bash Conditional Expressions309045
|
||||
Node: Shell Arithmetic314462
|
||||
Node: Aliases317789
|
||||
Node: Arrays320923
|
||||
Node: The Directory Stack328511
|
||||
Node: Directory Stack Builtins329308
|
||||
Node: Controlling the Prompt333753
|
||||
Node: The Restricted Shell336638
|
||||
Node: Bash POSIX Mode339520
|
||||
Node: Shell Compatibility Mode358467
|
||||
Node: Job Control367474
|
||||
Node: Job Control Basics367931
|
||||
Node: Job Control Builtins374299
|
||||
Node: Job Control Variables380981
|
||||
Node: Command Line Editing382212
|
||||
Node: Introduction and Notation383915
|
||||
Node: Readline Interaction386267
|
||||
Node: Readline Bare Essentials387455
|
||||
Node: Readline Movement Commands389263
|
||||
Node: Readline Killing Commands390259
|
||||
Node: Readline Arguments392282
|
||||
Node: Searching393372
|
||||
Node: Readline Init File395615
|
||||
Node: Readline Init File Syntax396918
|
||||
Node: Conditional Init Constructs423869
|
||||
Node: Sample Init File428254
|
||||
Node: Bindable Readline Commands431374
|
||||
Node: Commands For Moving432912
|
||||
Node: Commands For History435376
|
||||
Node: Commands For Text440767
|
||||
Node: Commands For Killing444892
|
||||
Node: Numeric Arguments447680
|
||||
Node: Commands For Completion448832
|
||||
Node: Keyboard Macros454528
|
||||
Node: Miscellaneous Commands455229
|
||||
Node: Readline vi Mode461796
|
||||
Node: Programmable Completion462773
|
||||
Node: Programmable Completion Builtins472509
|
||||
Node: A Programmable Completion Example484246
|
||||
Node: Using History Interactively489591
|
||||
Node: Bash History Facilities490272
|
||||
Node: Bash History Builtins494007
|
||||
Node: History Interaction500478
|
||||
Node: Event Designators505428
|
||||
Node: Word Designators507006
|
||||
Node: Modifiers509398
|
||||
Node: Installing Bash511335
|
||||
Node: Basic Installation512451
|
||||
Node: Compilers and Options516327
|
||||
Node: Compiling For Multiple Architectures517077
|
||||
Node: Installation Names518830
|
||||
Node: Specifying the System Type521064
|
||||
Node: Sharing Defaults521810
|
||||
Node: Operation Controls522524
|
||||
Node: Optional Features523543
|
||||
Node: Reporting Bugs536266
|
||||
Node: Major Differences From The Bourne Shell537623
|
||||
Node: GNU Free Documentation License559050
|
||||
Node: Indexes584227
|
||||
Node: Builtin Index584678
|
||||
Node: Reserved Word Index591776
|
||||
Node: Variable Index594221
|
||||
Node: Function Index611634
|
||||
Node: Concept Index625629
|
||||
Node: Top903
|
||||
Node: Introduction2846
|
||||
Node: What is Bash?3059
|
||||
Node: What is a shell?4192
|
||||
Node: Definitions6802
|
||||
Node: Basic Shell Features10129
|
||||
Node: Shell Syntax11353
|
||||
Node: Shell Operation12380
|
||||
Node: Quoting13671
|
||||
Node: Escape Character15009
|
||||
Node: Single Quotes15544
|
||||
Node: Double Quotes15893
|
||||
Node: ANSI-C Quoting17238
|
||||
Node: Locale Translation18632
|
||||
Node: Creating Internationalized Scripts20035
|
||||
Node: Comments24233
|
||||
Node: Shell Commands25000
|
||||
Node: Reserved Words25939
|
||||
Node: Simple Commands27082
|
||||
Node: Pipelines27744
|
||||
Node: Lists31000
|
||||
Node: Compound Commands32920
|
||||
Node: Looping Constructs33929
|
||||
Node: Conditional Constructs36478
|
||||
Node: Command Grouping51615
|
||||
Node: Coprocesses53107
|
||||
Node: GNU Parallel55793
|
||||
Node: Shell Functions56711
|
||||
Node: Shell Parameters65159
|
||||
Node: Positional Parameters70060
|
||||
Node: Special Parameters71150
|
||||
Node: Shell Expansions74611
|
||||
Node: Brace Expansion76800
|
||||
Node: Tilde Expansion80136
|
||||
Node: Shell Parameter Expansion83091
|
||||
Node: Command Substitution103734
|
||||
Node: Arithmetic Expansion107263
|
||||
Node: Process Substitution108439
|
||||
Node: Word Splitting109547
|
||||
Node: Filename Expansion111991
|
||||
Node: Pattern Matching115215
|
||||
Node: Quote Removal120938
|
||||
Node: Redirections121242
|
||||
Node: Executing Commands131498
|
||||
Node: Simple Command Expansion132165
|
||||
Node: Command Search and Execution134273
|
||||
Node: Command Execution Environment136717
|
||||
Node: Environment140165
|
||||
Node: Exit Status142068
|
||||
Node: Signals144127
|
||||
Node: Shell Scripts149057
|
||||
Node: Shell Builtin Commands152355
|
||||
Node: Bourne Shell Builtins154696
|
||||
Node: Bash Builtins181415
|
||||
Node: Modifying Shell Behavior218339
|
||||
Node: The Set Builtin218681
|
||||
Node: The Shopt Builtin230675
|
||||
Node: Special Builtins247728
|
||||
Node: Shell Variables248717
|
||||
Node: Bourne Shell Variables249151
|
||||
Node: Bash Variables251659
|
||||
Node: Bash Features290784
|
||||
Node: Invoking Bash291798
|
||||
Node: Bash Startup Files298382
|
||||
Node: Interactive Shells303624
|
||||
Node: What is an Interactive Shell?304032
|
||||
Node: Is this Shell Interactive?304694
|
||||
Node: Interactive Shell Behavior305518
|
||||
Node: Bash Conditional Expressions309279
|
||||
Node: Shell Arithmetic314696
|
||||
Node: Aliases318023
|
||||
Node: Arrays321157
|
||||
Node: The Directory Stack328745
|
||||
Node: Directory Stack Builtins329542
|
||||
Node: Controlling the Prompt333987
|
||||
Node: The Restricted Shell336872
|
||||
Node: Bash POSIX Mode339754
|
||||
Node: Shell Compatibility Mode358701
|
||||
Node: Job Control367708
|
||||
Node: Job Control Basics368165
|
||||
Node: Job Control Builtins374533
|
||||
Node: Job Control Variables381321
|
||||
Node: Command Line Editing382552
|
||||
Node: Introduction and Notation384255
|
||||
Node: Readline Interaction386607
|
||||
Node: Readline Bare Essentials387795
|
||||
Node: Readline Movement Commands389603
|
||||
Node: Readline Killing Commands390599
|
||||
Node: Readline Arguments392622
|
||||
Node: Searching393712
|
||||
Node: Readline Init File395955
|
||||
Node: Readline Init File Syntax397258
|
||||
Node: Conditional Init Constructs424209
|
||||
Node: Sample Init File428594
|
||||
Node: Bindable Readline Commands431714
|
||||
Node: Commands For Moving433252
|
||||
Node: Commands For History435716
|
||||
Node: Commands For Text441107
|
||||
Node: Commands For Killing445232
|
||||
Node: Numeric Arguments448020
|
||||
Node: Commands For Completion449172
|
||||
Node: Keyboard Macros454868
|
||||
Node: Miscellaneous Commands455569
|
||||
Node: Readline vi Mode462136
|
||||
Node: Programmable Completion463113
|
||||
Node: Programmable Completion Builtins472849
|
||||
Node: A Programmable Completion Example484586
|
||||
Node: Using History Interactively489931
|
||||
Node: Bash History Facilities490612
|
||||
Node: Bash History Builtins494347
|
||||
Node: History Interaction500818
|
||||
Node: Event Designators505768
|
||||
Node: Word Designators507346
|
||||
Node: Modifiers509738
|
||||
Node: Installing Bash511675
|
||||
Node: Basic Installation512791
|
||||
Node: Compilers and Options516667
|
||||
Node: Compiling For Multiple Architectures517417
|
||||
Node: Installation Names519170
|
||||
Node: Specifying the System Type521404
|
||||
Node: Sharing Defaults522150
|
||||
Node: Operation Controls522864
|
||||
Node: Optional Features523883
|
||||
Node: Reporting Bugs536606
|
||||
Node: Major Differences From The Bourne Shell537963
|
||||
Node: GNU Free Documentation License559390
|
||||
Node: Indexes584567
|
||||
Node: Builtin Index585018
|
||||
Node: Reserved Word Index592116
|
||||
Node: Variable Index594561
|
||||
Node: Function Index611974
|
||||
Node: Concept Index625969
|
||||
|
||||
End Tag Table
|
||||
|
||||
|
||||
Binary file not shown.
+11
-11
@@ -43,27 +43,27 @@
|
||||
@xrdef{Shell Commands-snt}{Section@tie 3.2}
|
||||
@xrdef{Reserved Words-title}{Reserved Words}
|
||||
@xrdef{Reserved Words-snt}{Section@tie 3.2.1}
|
||||
@xrdef{Simple Commands-title}{Simple Commands}
|
||||
@xrdef{Simple Commands-snt}{Section@tie 3.2.2}
|
||||
@xrdef{Comments-pg}{9}
|
||||
@xrdef{Shell Commands-pg}{9}
|
||||
@xrdef{Reserved Words-pg}{9}
|
||||
@xrdef{Simple Commands-pg}{9}
|
||||
@xrdef{Simple Commands-title}{Simple Commands}
|
||||
@xrdef{Simple Commands-snt}{Section@tie 3.2.2}
|
||||
@xrdef{Pipelines-title}{Pipelines}
|
||||
@xrdef{Pipelines-snt}{Section@tie 3.2.3}
|
||||
@xrdef{Simple Commands-pg}{10}
|
||||
@xrdef{Pipelines-pg}{10}
|
||||
@xrdef{Lists-title}{Lists of Commands}
|
||||
@xrdef{Lists-snt}{Section@tie 3.2.4}
|
||||
@xrdef{Compound Commands-title}{Compound Commands}
|
||||
@xrdef{Compound Commands-snt}{Section@tie 3.2.5}
|
||||
@xrdef{Looping Constructs-title}{Looping Constructs}
|
||||
@xrdef{Looping Constructs-snt}{Section@tie 3.2.5.1}
|
||||
@xrdef{Lists-pg}{11}
|
||||
@xrdef{Compound Commands-pg}{11}
|
||||
@xrdef{Looping Constructs-title}{Looping Constructs}
|
||||
@xrdef{Looping Constructs-snt}{Section@tie 3.2.5.1}
|
||||
@xrdef{Conditional Constructs-title}{Conditional Constructs}
|
||||
@xrdef{Conditional Constructs-snt}{Section@tie 3.2.5.2}
|
||||
@xrdef{Looping Constructs-pg}{12}
|
||||
@xrdef{Conditional Constructs-pg}{12}
|
||||
@xrdef{Conditional Constructs-pg}{13}
|
||||
@xrdef{Command Grouping-title}{Grouping Commands}
|
||||
@xrdef{Command Grouping-snt}{Section@tie 3.2.5.3}
|
||||
@xrdef{Coprocesses-title}{Coprocesses}
|
||||
@@ -84,12 +84,12 @@
|
||||
@xrdef{Special Parameters-title}{Special Parameters}
|
||||
@xrdef{Special Parameters-snt}{Section@tie 3.4.2}
|
||||
@xrdef{Positional Parameters-pg}{23}
|
||||
@xrdef{Special Parameters-pg}{23}
|
||||
@xrdef{Shell Expansions-title}{Shell Expansions}
|
||||
@xrdef{Shell Expansions-snt}{Section@tie 3.5}
|
||||
@xrdef{Shell Expansions-pg}{24}
|
||||
@xrdef{Special Parameters-pg}{24}
|
||||
@xrdef{Brace Expansion-title}{Brace Expansion}
|
||||
@xrdef{Brace Expansion-snt}{Section@tie 3.5.1}
|
||||
@xrdef{Shell Expansions-pg}{25}
|
||||
@xrdef{Brace Expansion-pg}{25}
|
||||
@xrdef{Tilde Expansion-title}{Tilde Expansion}
|
||||
@xrdef{Tilde Expansion-snt}{Section@tie 3.5.2}
|
||||
@@ -105,12 +105,12 @@
|
||||
@xrdef{Process Substitution-title}{Process Substitution}
|
||||
@xrdef{Process Substitution-snt}{Section@tie 3.5.6}
|
||||
@xrdef{Arithmetic Expansion-pg}{37}
|
||||
@xrdef{Process Substitution-pg}{37}
|
||||
@xrdef{Word Splitting-title}{Word Splitting}
|
||||
@xrdef{Word Splitting-snt}{Section@tie 3.5.7}
|
||||
@xrdef{Process Substitution-pg}{38}
|
||||
@xrdef{Word Splitting-pg}{38}
|
||||
@xrdef{Filename Expansion-title}{Filename Expansion}
|
||||
@xrdef{Filename Expansion-snt}{Section@tie 3.5.8}
|
||||
@xrdef{Word Splitting-pg}{38}
|
||||
@xrdef{Pattern Matching-title}{Pattern Matching}
|
||||
@xrdef{Pattern Matching-snt}{Section@tie 3.5.8.1}
|
||||
@xrdef{Filename Expansion-pg}{39}
|
||||
@@ -135,9 +135,9 @@
|
||||
@xrdef{Command Execution Environment-pg}{46}
|
||||
@xrdef{Environment-title}{Environment}
|
||||
@xrdef{Environment-snt}{Section@tie 3.7.4}
|
||||
@xrdef{Environment-pg}{47}
|
||||
@xrdef{Exit Status-title}{Exit Status}
|
||||
@xrdef{Exit Status-snt}{Section@tie 3.7.5}
|
||||
@xrdef{Environment-pg}{48}
|
||||
@xrdef{Exit Status-pg}{48}
|
||||
@xrdef{Signals-title}{Signals}
|
||||
@xrdef{Signals-snt}{Section@tie 3.7.6}
|
||||
|
||||
+6
-6
@@ -31,14 +31,14 @@
|
||||
\entry{comments, shell}{9}{comments, shell}
|
||||
\entry{commands, shell}{9}{commands, shell}
|
||||
\entry{reserved words}{9}{reserved words}
|
||||
\entry{commands, simple}{9}{commands, simple}
|
||||
\entry{commands, simple}{10}{commands, simple}
|
||||
\entry{pipeline}{10}{pipeline}
|
||||
\entry{commands, pipelines}{10}{commands, pipelines}
|
||||
\entry{command timing}{10}{command timing}
|
||||
\entry{commands, lists}{11}{commands, lists}
|
||||
\entry{commands, compound}{11}{commands, compound}
|
||||
\entry{commands, looping}{12}{commands, looping}
|
||||
\entry{commands, conditional}{12}{commands, conditional}
|
||||
\entry{commands, conditional}{13}{commands, conditional}
|
||||
\entry{commands, grouping}{18}{commands, grouping}
|
||||
\entry{coprocess}{18}{coprocess}
|
||||
\entry{shell function}{19}{shell function}
|
||||
@@ -47,8 +47,8 @@
|
||||
\entry{variable, shell}{22}{variable, shell}
|
||||
\entry{shell variable}{22}{shell variable}
|
||||
\entry{parameters, positional}{23}{parameters, positional}
|
||||
\entry{parameters, special}{23}{parameters, special}
|
||||
\entry{expansion}{24}{expansion}
|
||||
\entry{parameters, special}{24}{parameters, special}
|
||||
\entry{expansion}{25}{expansion}
|
||||
\entry{brace expansion}{25}{brace expansion}
|
||||
\entry{expansion, brace}{25}{expansion, brace}
|
||||
\entry{tilde expansion}{26}{tilde expansion}
|
||||
@@ -58,7 +58,7 @@
|
||||
\entry{command substitution}{36}{command substitution}
|
||||
\entry{expansion, arithmetic}{37}{expansion, arithmetic}
|
||||
\entry{arithmetic expansion}{37}{arithmetic expansion}
|
||||
\entry{process substitution}{37}{process substitution}
|
||||
\entry{process substitution}{38}{process substitution}
|
||||
\entry{word splitting}{38}{word splitting}
|
||||
\entry{expansion, filename}{39}{expansion, filename}
|
||||
\entry{expansion, pathname}{39}{expansion, pathname}
|
||||
@@ -71,7 +71,7 @@
|
||||
\entry{command execution}{46}{command execution}
|
||||
\entry{command search}{46}{command search}
|
||||
\entry{execution environment}{46}{execution environment}
|
||||
\entry{environment}{47}{environment}
|
||||
\entry{environment}{48}{environment}
|
||||
\entry{exit status}{48}{exit status}
|
||||
\entry{signal handling}{49}{signal handling}
|
||||
\entry{shell script}{50}{shell script}
|
||||
|
||||
+6
-6
@@ -23,13 +23,13 @@
|
||||
\entry{command substitution}{36}
|
||||
\entry{command timing}{10}
|
||||
\entry{commands, compound}{11}
|
||||
\entry{commands, conditional}{12}
|
||||
\entry{commands, conditional}{13}
|
||||
\entry{commands, grouping}{18}
|
||||
\entry{commands, lists}{11}
|
||||
\entry{commands, looping}{12}
|
||||
\entry{commands, pipelines}{10}
|
||||
\entry{commands, shell}{9}
|
||||
\entry{commands, simple}{9}
|
||||
\entry{commands, simple}{10}
|
||||
\entry{comments, shell}{9}
|
||||
\entry{Compatibility Level}{121}
|
||||
\entry{Compatibility Mode}{121}
|
||||
@@ -43,12 +43,12 @@
|
||||
\entry{dollar-single quote quoting}{6}
|
||||
\initial {E}
|
||||
\entry{editing command lines}{131}
|
||||
\entry{environment}{47}
|
||||
\entry{environment}{48}
|
||||
\entry{evaluation, arithmetic}{107}
|
||||
\entry{event designators}{172}
|
||||
\entry{execution environment}{46}
|
||||
\entry{exit status}{3, 48}
|
||||
\entry{expansion}{24}
|
||||
\entry{expansion}{25}
|
||||
\entry{expansion, arithmetic}{37}
|
||||
\entry{expansion, brace}{25}
|
||||
\entry{expansion, filename}{39}
|
||||
@@ -99,7 +99,7 @@
|
||||
\entry{parameter expansion}{27}
|
||||
\entry{parameters}{22}
|
||||
\entry{parameters, positional}{23}
|
||||
\entry{parameters, special}{23}
|
||||
\entry{parameters, special}{24}
|
||||
\entry{pathname expansion}{39}
|
||||
\entry{pattern matching}{39}
|
||||
\entry{pipeline}{10}
|
||||
@@ -108,7 +108,7 @@
|
||||
\entry{POSIX Mode}{116}
|
||||
\entry{process group}{3}
|
||||
\entry{process group ID}{3}
|
||||
\entry{process substitution}{37}
|
||||
\entry{process substitution}{38}
|
||||
\entry{programmable completion}{158}
|
||||
\entry{prompting}{114}
|
||||
\initial {Q}
|
||||
|
||||
+12
-4
@@ -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.3, 6 September 2025).
|
||||
the Bash shell (version 5.3, 19 September 2025).
|
||||
|
||||
This is Edition 5.3, last updated 6 September 2025,
|
||||
This is Edition 5.3, last updated 19 September 2025,
|
||||
of The GNU Bash Reference Manual,
|
||||
for Bash, Version 5.3.
|
||||
|
||||
@@ -77,10 +77,10 @@ Next: <a href="#Introduction" accesskey="n" rel="next">Introduction</a>, Previou
|
||||
<h1 class="top" id="Bash-Features-1"><span>Bash Features<a class="copiable-link" href="#Bash-Features-1"> ¶</a></span></h1>
|
||||
|
||||
<p>This text is a brief description of the features that are present in
|
||||
the Bash shell (version 5.3, 6 September 2025).
|
||||
the Bash shell (version 5.3, 19 September 2025).
|
||||
The Bash home page is <a class="url" href="http://www.gnu.org/software/bash/">http://www.gnu.org/software/bash/</a>.
|
||||
</p>
|
||||
<p>This is Edition 5.3, last updated 6 September 2025,
|
||||
<p>This is Edition 5.3, last updated 19 September 2025,
|
||||
of <cite class="cite">The GNU Bash Reference Manual</cite>,
|
||||
for <code class="code">Bash</code>, Version 5.3.
|
||||
</p>
|
||||
@@ -4689,6 +4689,12 @@ Other builtins that accept arguments but are not specified as accepting
|
||||
options interpret arguments beginning with ‘<samp class="samp">-</samp>’ as invalid options and
|
||||
require ‘<samp class="samp">--</samp>’ to prevent this interpretation.
|
||||
</p>
|
||||
<p>All builtins except
|
||||
<code class="code">:</code>, <code class="code">true</code>, <code class="code">false</code>, <code class="code">echo</code>, and <code class="code">test</code>/<code class="code">[</code>
|
||||
accept ‘<samp class="samp">--help</samp>’ as a special option.
|
||||
If ‘<samp class="samp">--help</samp>’ is supplied, these builtins output
|
||||
a help message and exit with a status of 0.
|
||||
</p>
|
||||
<ul class="mini-toc">
|
||||
<li><a href="#Bourne-Shell-Builtins" accesskey="1">Bourne Shell Builtins</a></li>
|
||||
<li><a href="#Bash-Builtins" accesskey="2">Bash Builtin Commands</a></li>
|
||||
@@ -11131,6 +11137,8 @@ This is useful only when used with the <samp class="option">-n</samp> option.
|
||||
<p>Supplying the <samp class="option">-f</samp> option, when job control is enabled,
|
||||
forces <code class="code">wait</code> to wait for each <var class="var">id</var> to terminate before
|
||||
returning its status, instead of returning when it changes status.
|
||||
If there are no <var class="var">id</var> arguments,
|
||||
<code class="code">wait</code> waits until all background processes have terminated.
|
||||
</p>
|
||||
<p>If none of the <var class="var">id</var>s specify one of the shell’s an active child
|
||||
processes, the return status is 127.
|
||||
|
||||
+145
-139
@@ -2,9 +2,9 @@ This is bashref.info, produced by makeinfo version 7.2 from
|
||||
bashref.texi.
|
||||
|
||||
This text is a brief description of the features that are present in the
|
||||
Bash shell (version 5.3, 6 September 2025).
|
||||
Bash shell (version 5.3, 19 September 2025).
|
||||
|
||||
This is Edition 5.3, last updated 6 September 2025, of ‘The GNU Bash
|
||||
This is Edition 5.3, last updated 19 September 2025, of ‘The GNU Bash
|
||||
Reference Manual’, for ‘Bash’, Version 5.3.
|
||||
|
||||
Copyright © 1988-2025 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.3, 6 September 2025). The Bash home page is
|
||||
Bash shell (version 5.3, 19 September 2025). The Bash home page is
|
||||
<http://www.gnu.org/software/bash/>.
|
||||
|
||||
This is Edition 5.3, last updated 6 September 2025, of ‘The GNU Bash
|
||||
This is Edition 5.3, last updated 19 September 2025, of ‘The GNU Bash
|
||||
Reference Manual’, for ‘Bash’, Version 5.3.
|
||||
|
||||
Bash contains features that appear in other popular shells, and some
|
||||
@@ -3453,6 +3453,10 @@ that accept arguments but are not specified as accepting options
|
||||
interpret arguments beginning with ‘-’ as invalid options and require
|
||||
‘--’ to prevent this interpretation.
|
||||
|
||||
All builtins except ‘:’, ‘true’, ‘false’, ‘echo’, and ‘test’/‘[’
|
||||
accept ‘--help’ as a special option. If ‘--help’ is supplied, these
|
||||
builtins output a help message and exit with a status of 0.
|
||||
|
||||
|
||||
File: bashref.info, Node: Bourne Shell Builtins, Next: Bash Builtins, Up: Shell Builtin Commands
|
||||
|
||||
@@ -8436,7 +8440,9 @@ File: bashref.info, Node: Job Control Builtins, Next: Job Control Variables,
|
||||
|
||||
Supplying the ‘-f’ option, when job control is enabled, forces
|
||||
‘wait’ to wait for each ID to terminate before returning its
|
||||
status, instead of returning when it changes status.
|
||||
status, instead of returning when it changes status. If there are
|
||||
no ID arguments, ‘wait’ waits until all background processes have
|
||||
terminated.
|
||||
|
||||
If none of the IDs specify one of the shell's an active child
|
||||
processes, the return status is 127. If ‘wait’ is interrupted by a
|
||||
@@ -12903,7 +12909,7 @@ D.1 Index of Shell Builtin Commands
|
||||
* dirs: Directory Stack Builtins.
|
||||
(line 7)
|
||||
* disown: Job Control Builtins.
|
||||
(line 120)
|
||||
(line 122)
|
||||
* echo: Bash Builtins. (line 284)
|
||||
* enable: Bash Builtins. (line 337)
|
||||
* eval: Bourne Shell Builtins.
|
||||
@@ -12954,7 +12960,7 @@ D.1 Index of Shell Builtin Commands
|
||||
* shopt: The Shopt Builtin. (line 9)
|
||||
* source: Bash Builtins. (line 678)
|
||||
* suspend: Job Control Builtins.
|
||||
(line 139)
|
||||
(line 141)
|
||||
* test: Bourne Shell Builtins.
|
||||
(line 340)
|
||||
* times: Bourne Shell Builtins.
|
||||
@@ -13652,138 +13658,138 @@ D.5 Concept Index
|
||||
|
||||
|
||||
Tag Table:
|
||||
Node: Top904
|
||||
Node: Introduction2848
|
||||
Node: What is Bash?3064
|
||||
Node: What is a shell?4200
|
||||
Node: Definitions6813
|
||||
Node: Basic Shell Features10143
|
||||
Node: Shell Syntax11370
|
||||
Node: Shell Operation12400
|
||||
Node: Quoting13694
|
||||
Node: Escape Character15035
|
||||
Node: Single Quotes15573
|
||||
Node: Double Quotes15925
|
||||
Node: ANSI-C Quoting17273
|
||||
Node: Locale Translation18670
|
||||
Node: Creating Internationalized Scripts20076
|
||||
Node: Comments24277
|
||||
Node: Shell Commands25047
|
||||
Node: Reserved Words25989
|
||||
Node: Simple Commands27135
|
||||
Node: Pipelines27800
|
||||
Node: Lists31059
|
||||
Node: Compound Commands32982
|
||||
Node: Looping Constructs33994
|
||||
Node: Conditional Constructs36546
|
||||
Node: Command Grouping51686
|
||||
Node: Coprocesses53181
|
||||
Node: GNU Parallel55870
|
||||
Node: Shell Functions56791
|
||||
Node: Shell Parameters65242
|
||||
Node: Positional Parameters70146
|
||||
Node: Special Parameters71239
|
||||
Node: Shell Expansions74703
|
||||
Node: Brace Expansion76895
|
||||
Node: Tilde Expansion80234
|
||||
Node: Shell Parameter Expansion83192
|
||||
Node: Command Substitution103838
|
||||
Node: Arithmetic Expansion107370
|
||||
Node: Process Substitution108549
|
||||
Node: Word Splitting109660
|
||||
Node: Filename Expansion112107
|
||||
Node: Pattern Matching115334
|
||||
Node: Quote Removal121060
|
||||
Node: Redirections121367
|
||||
Node: Executing Commands131626
|
||||
Node: Simple Command Expansion132296
|
||||
Node: Command Search and Execution134407
|
||||
Node: Command Execution Environment136854
|
||||
Node: Environment140305
|
||||
Node: Exit Status142211
|
||||
Node: Signals144273
|
||||
Node: Shell Scripts149206
|
||||
Node: Shell Builtin Commands152507
|
||||
Node: Bourne Shell Builtins154621
|
||||
Node: Bash Builtins181343
|
||||
Node: Modifying Shell Behavior218270
|
||||
Node: The Set Builtin218615
|
||||
Node: The Shopt Builtin230612
|
||||
Node: Special Builtins247668
|
||||
Node: Shell Variables248660
|
||||
Node: Bourne Shell Variables249097
|
||||
Node: Bash Variables251608
|
||||
Node: Bash Features290736
|
||||
Node: Invoking Bash291753
|
||||
Node: Bash Startup Files298340
|
||||
Node: Interactive Shells303585
|
||||
Node: What is an Interactive Shell?303996
|
||||
Node: Is this Shell Interactive?304661
|
||||
Node: Interactive Shell Behavior305488
|
||||
Node: Bash Conditional Expressions309252
|
||||
Node: Shell Arithmetic314672
|
||||
Node: Aliases318002
|
||||
Node: Arrays321139
|
||||
Node: The Directory Stack328730
|
||||
Node: Directory Stack Builtins329530
|
||||
Node: Controlling the Prompt333978
|
||||
Node: The Restricted Shell336866
|
||||
Node: Bash POSIX Mode339751
|
||||
Node: Shell Compatibility Mode358701
|
||||
Node: Job Control367711
|
||||
Node: Job Control Basics368171
|
||||
Node: Job Control Builtins374542
|
||||
Node: Job Control Variables381227
|
||||
Node: Command Line Editing382461
|
||||
Node: Introduction and Notation384167
|
||||
Node: Readline Interaction386522
|
||||
Node: Readline Bare Essentials387713
|
||||
Node: Readline Movement Commands389524
|
||||
Node: Readline Killing Commands390523
|
||||
Node: Readline Arguments392549
|
||||
Node: Searching393642
|
||||
Node: Readline Init File395888
|
||||
Node: Readline Init File Syntax397194
|
||||
Node: Conditional Init Constructs424148
|
||||
Node: Sample Init File428536
|
||||
Node: Bindable Readline Commands431659
|
||||
Node: Commands For Moving433200
|
||||
Node: Commands For History435667
|
||||
Node: Commands For Text441061
|
||||
Node: Commands For Killing445189
|
||||
Node: Numeric Arguments447980
|
||||
Node: Commands For Completion449135
|
||||
Node: Keyboard Macros454834
|
||||
Node: Miscellaneous Commands455538
|
||||
Node: Readline vi Mode462108
|
||||
Node: Programmable Completion463088
|
||||
Node: Programmable Completion Builtins472827
|
||||
Node: A Programmable Completion Example484567
|
||||
Node: Using History Interactively489915
|
||||
Node: Bash History Facilities490599
|
||||
Node: Bash History Builtins494337
|
||||
Node: History Interaction500811
|
||||
Node: Event Designators505764
|
||||
Node: Word Designators507345
|
||||
Node: Modifiers509740
|
||||
Node: Installing Bash511680
|
||||
Node: Basic Installation512799
|
||||
Node: Compilers and Options516678
|
||||
Node: Compiling For Multiple Architectures517431
|
||||
Node: Installation Names519187
|
||||
Node: Specifying the System Type521424
|
||||
Node: Sharing Defaults522173
|
||||
Node: Operation Controls522890
|
||||
Node: Optional Features523912
|
||||
Node: Reporting Bugs536638
|
||||
Node: Major Differences From The Bourne Shell537998
|
||||
Node: GNU Free Documentation License559428
|
||||
Node: Indexes584608
|
||||
Node: Builtin Index585062
|
||||
Node: Reserved Word Index592163
|
||||
Node: Variable Index594611
|
||||
Node: Function Index612027
|
||||
Node: Concept Index626025
|
||||
Node: Top906
|
||||
Node: Introduction2852
|
||||
Node: What is Bash?3068
|
||||
Node: What is a shell?4204
|
||||
Node: Definitions6817
|
||||
Node: Basic Shell Features10147
|
||||
Node: Shell Syntax11374
|
||||
Node: Shell Operation12404
|
||||
Node: Quoting13698
|
||||
Node: Escape Character15039
|
||||
Node: Single Quotes15577
|
||||
Node: Double Quotes15929
|
||||
Node: ANSI-C Quoting17277
|
||||
Node: Locale Translation18674
|
||||
Node: Creating Internationalized Scripts20080
|
||||
Node: Comments24281
|
||||
Node: Shell Commands25051
|
||||
Node: Reserved Words25993
|
||||
Node: Simple Commands27139
|
||||
Node: Pipelines27804
|
||||
Node: Lists31063
|
||||
Node: Compound Commands32986
|
||||
Node: Looping Constructs33998
|
||||
Node: Conditional Constructs36550
|
||||
Node: Command Grouping51690
|
||||
Node: Coprocesses53185
|
||||
Node: GNU Parallel55874
|
||||
Node: Shell Functions56795
|
||||
Node: Shell Parameters65246
|
||||
Node: Positional Parameters70150
|
||||
Node: Special Parameters71243
|
||||
Node: Shell Expansions74707
|
||||
Node: Brace Expansion76899
|
||||
Node: Tilde Expansion80238
|
||||
Node: Shell Parameter Expansion83196
|
||||
Node: Command Substitution103842
|
||||
Node: Arithmetic Expansion107374
|
||||
Node: Process Substitution108553
|
||||
Node: Word Splitting109664
|
||||
Node: Filename Expansion112111
|
||||
Node: Pattern Matching115338
|
||||
Node: Quote Removal121064
|
||||
Node: Redirections121371
|
||||
Node: Executing Commands131630
|
||||
Node: Simple Command Expansion132300
|
||||
Node: Command Search and Execution134411
|
||||
Node: Command Execution Environment136858
|
||||
Node: Environment140309
|
||||
Node: Exit Status142215
|
||||
Node: Signals144277
|
||||
Node: Shell Scripts149210
|
||||
Node: Shell Builtin Commands152511
|
||||
Node: Bourne Shell Builtins154855
|
||||
Node: Bash Builtins181577
|
||||
Node: Modifying Shell Behavior218504
|
||||
Node: The Set Builtin218849
|
||||
Node: The Shopt Builtin230846
|
||||
Node: Special Builtins247902
|
||||
Node: Shell Variables248894
|
||||
Node: Bourne Shell Variables249331
|
||||
Node: Bash Variables251842
|
||||
Node: Bash Features290970
|
||||
Node: Invoking Bash291987
|
||||
Node: Bash Startup Files298574
|
||||
Node: Interactive Shells303819
|
||||
Node: What is an Interactive Shell?304230
|
||||
Node: Is this Shell Interactive?304895
|
||||
Node: Interactive Shell Behavior305722
|
||||
Node: Bash Conditional Expressions309486
|
||||
Node: Shell Arithmetic314906
|
||||
Node: Aliases318236
|
||||
Node: Arrays321373
|
||||
Node: The Directory Stack328964
|
||||
Node: Directory Stack Builtins329764
|
||||
Node: Controlling the Prompt334212
|
||||
Node: The Restricted Shell337100
|
||||
Node: Bash POSIX Mode339985
|
||||
Node: Shell Compatibility Mode358935
|
||||
Node: Job Control367945
|
||||
Node: Job Control Basics368405
|
||||
Node: Job Control Builtins374776
|
||||
Node: Job Control Variables381567
|
||||
Node: Command Line Editing382801
|
||||
Node: Introduction and Notation384507
|
||||
Node: Readline Interaction386862
|
||||
Node: Readline Bare Essentials388053
|
||||
Node: Readline Movement Commands389864
|
||||
Node: Readline Killing Commands390863
|
||||
Node: Readline Arguments392889
|
||||
Node: Searching393982
|
||||
Node: Readline Init File396228
|
||||
Node: Readline Init File Syntax397534
|
||||
Node: Conditional Init Constructs424488
|
||||
Node: Sample Init File428876
|
||||
Node: Bindable Readline Commands431999
|
||||
Node: Commands For Moving433540
|
||||
Node: Commands For History436007
|
||||
Node: Commands For Text441401
|
||||
Node: Commands For Killing445529
|
||||
Node: Numeric Arguments448320
|
||||
Node: Commands For Completion449475
|
||||
Node: Keyboard Macros455174
|
||||
Node: Miscellaneous Commands455878
|
||||
Node: Readline vi Mode462448
|
||||
Node: Programmable Completion463428
|
||||
Node: Programmable Completion Builtins473167
|
||||
Node: A Programmable Completion Example484907
|
||||
Node: Using History Interactively490255
|
||||
Node: Bash History Facilities490939
|
||||
Node: Bash History Builtins494677
|
||||
Node: History Interaction501151
|
||||
Node: Event Designators506104
|
||||
Node: Word Designators507685
|
||||
Node: Modifiers510080
|
||||
Node: Installing Bash512020
|
||||
Node: Basic Installation513139
|
||||
Node: Compilers and Options517018
|
||||
Node: Compiling For Multiple Architectures517771
|
||||
Node: Installation Names519527
|
||||
Node: Specifying the System Type521764
|
||||
Node: Sharing Defaults522513
|
||||
Node: Operation Controls523230
|
||||
Node: Optional Features524252
|
||||
Node: Reporting Bugs536978
|
||||
Node: Major Differences From The Bourne Shell538338
|
||||
Node: GNU Free Documentation License559768
|
||||
Node: Indexes584948
|
||||
Node: Builtin Index585402
|
||||
Node: Reserved Word Index592503
|
||||
Node: Variable Index594951
|
||||
Node: Function Index612367
|
||||
Node: Concept Index626365
|
||||
|
||||
End Tag Table
|
||||
|
||||
|
||||
+31
-30
@@ -1,11 +1,12 @@
|
||||
This is pdfTeX, Version 3.141592653-2.6-1.40.26 (TeX Live 2024/MacPorts 2024.70613_1) (preloaded format=pdfetex 2024.4.9) 25 AUG 2025 11:45
|
||||
This is pdfTeX, Version 3.141592653-2.6-1.40.27 (TeX Live 2025/MacPorts 2025.74524_1) (preloaded format=pdfetex 2025.9.16) 19 SEP 2025 16:37
|
||||
entering extended mode
|
||||
restricted \write18 enabled.
|
||||
file:line:error style messages enabled.
|
||||
%&-line parsing enabled.
|
||||
**\input /usr/local/src/bash/bash-20250822/doc/bashref.texi
|
||||
(/usr/local/src/bash/bash-20250822/doc/bashref.texi
|
||||
(/usr/local/src/bash/bash-20250822/doc/texinfo.tex
|
||||
**\input /usr/local/src/bash/bash-20250918/doc/bashref.texi \input /usr/local/s
|
||||
rc/bash/bash-20250918/doc/bashref.texi
|
||||
(/usr/local/src/bash/bash-20250918/doc/bashref.texi
|
||||
(/usr/local/src/bash/bash-20250918/doc/texinfo.tex
|
||||
Loading texinfo [version 2015-11-22.14]:
|
||||
\outerhsize=\dimen16
|
||||
\outervsize=\dimen17
|
||||
@@ -161,15 +162,15 @@ This is `epsf.tex' v2.7.4 <14 February 2011>
|
||||
texinfo.tex: doing @include of version.texi
|
||||
|
||||
|
||||
(/usr/local/src/bash/bash-20250822/doc/version.texi) [1{/opt/local/var/db/texmf
|
||||
(/usr/local/src/bash/bash-20250918/doc/version.texi) [1{/opt/local/var/db/texmf
|
||||
/fonts/map/pdftex/updmap/pdftex.map}] [2]
|
||||
(/usr/local/build/bash/bash-20250822/doc/bashref.toc [-1] [-2] [-3]) [-4]
|
||||
(/usr/local/build/bash/bash-20250822/doc/bashref.toc)
|
||||
(/usr/local/build/bash/bash-20250822/doc/bashref.toc) Chapter 1
|
||||
(/usr/local/build/bash/bash-20250918/doc/bashref.toc [-1] [-2] [-3]) [-4]
|
||||
(/usr/local/build/bash/bash-20250918/doc/bashref.toc)
|
||||
(/usr/local/build/bash/bash-20250918/doc/bashref.toc) Chapter 1
|
||||
\openout0 = `bashref.toc'.
|
||||
|
||||
|
||||
(/usr/local/build/bash/bash-20250822/doc/bashref.aux)
|
||||
(/usr/local/build/bash/bash-20250918/doc/bashref.aux)
|
||||
\openout1 = `bashref.aux'.
|
||||
|
||||
[1] Chapter 2 [2]
|
||||
@@ -182,7 +183,7 @@ texinfo.tex: doing @include of version.texi
|
||||
\openout3 = `bashref.vr'.
|
||||
|
||||
[8]
|
||||
Overfull \hbox (3.12749pt too wide) in paragraph at lines 743--744
|
||||
Overfull \hbox (3.12749pt too wide) in paragraph at lines 764--765
|
||||
@texttt coproc[]|
|
||||
|
||||
@hbox(9.34993+3.85005)x43.36464
|
||||
@@ -194,7 +195,7 @@ Overfull \hbox (3.12749pt too wide) in paragraph at lines 743--744
|
||||
.etc.
|
||||
|
||||
|
||||
Overfull \hbox (3.12749pt too wide) in paragraph at lines 744--744
|
||||
Overfull \hbox (3.12749pt too wide) in paragraph at lines 765--765
|
||||
@texttt select[]|
|
||||
|
||||
@hbox(9.34993+3.85005)x43.36464
|
||||
@@ -206,7 +207,7 @@ Overfull \hbox (3.12749pt too wide) in paragraph at lines 744--744
|
||||
.etc.
|
||||
|
||||
|
||||
Overfull \hbox (5.95723pt too wide) in paragraph at lines 744--745
|
||||
Overfull \hbox (5.95723pt too wide) in paragraph at lines 765--766
|
||||
@texttt function[]|
|
||||
|
||||
@hbox(9.34993+3.85005)x52.03227
|
||||
@@ -231,7 +232,7 @@ exlive/fonts/enc/dvips/cm-super/cm-super-t1.enc}] [21] [22] [23] [24]
|
||||
[52]
|
||||
[53] [54] [55] [56] [57] [58] [59] [60] [61] [62] [63] [64] [65] [66] [67]
|
||||
[68] [69] [70] [71] [72] [73]
|
||||
Overfull \hbox (38.26585pt too wide) in paragraph at lines 5899--5899
|
||||
Overfull \hbox (38.26585pt too wide) in paragraph at lines 5925--5925
|
||||
[]@texttt set [-abefhkmnptuvxBCEHPT] [-o @textttsl option-name@texttt ] [--] [
|
||||
-] [@textttsl ar-gu-ment []@texttt ][]
|
||||
|
||||
@@ -244,7 +245,7 @@ Overfull \hbox (38.26585pt too wide) in paragraph at lines 5899--5899
|
||||
.etc.
|
||||
|
||||
|
||||
Overfull \hbox (38.26585pt too wide) in paragraph at lines 5900--5900
|
||||
Overfull \hbox (38.26585pt too wide) in paragraph at lines 5926--5926
|
||||
[]@texttt set [+abefhkmnptuvxBCEHPT] [+o @textttsl option-name@texttt ] [--] [
|
||||
-] [@textttsl ar-gu-ment []@texttt ][]
|
||||
|
||||
@@ -264,9 +265,9 @@ Chapter 7 [124] [125] [126] [127] [128]
|
||||
texinfo.tex: doing @include of rluser.texi
|
||||
|
||||
|
||||
(/usr/local/src/bash/bash-20250822/lib/readline/doc/rluser.texi Chapter 8
|
||||
(/usr/local/src/bash/bash-20250918/lib/readline/doc/rluser.texi Chapter 8
|
||||
[129] [130] [131] [132] [133] [134] [135] [136] [137] [138] [139] [140]
|
||||
Underfull \hbox (badness 7540) in paragraph at lines 968--974
|
||||
Underfull \hbox (badness 7540) in paragraph at lines 969--975
|
||||
[]@textrm In the ex-am-ple above, @textttsl C-u[] @textrm is bound to the func
|
||||
-tion
|
||||
|
||||
@@ -279,7 +280,7 @@ Underfull \hbox (badness 7540) in paragraph at lines 968--974
|
||||
.etc.
|
||||
|
||||
|
||||
Underfull \hbox (badness 10000) in paragraph at lines 968--974
|
||||
Underfull \hbox (badness 10000) in paragraph at lines 969--975
|
||||
@texttt universal-argument[]@textrm , @textttsl M-DEL[] @textrm is bound to th
|
||||
e func-tion
|
||||
|
||||
@@ -292,7 +293,7 @@ e func-tion
|
||||
.etc.
|
||||
|
||||
[141] [142] [143] [144]
|
||||
Overfull \hbox (26.43913pt too wide) in paragraph at lines 1214--1214
|
||||
Overfull \hbox (26.43913pt too wide) in paragraph at lines 1215--1215
|
||||
[]@texttt Meta-Control-h: backward-kill-word Text after the function name is i
|
||||
gnored[]
|
||||
|
||||
@@ -313,10 +314,10 @@ gnored[]
|
||||
texinfo.tex: doing @include of hsuser.texi
|
||||
|
||||
|
||||
(/usr/local/src/bash/bash-20250822/lib/readline/doc/hsuser.texi Chapter 9
|
||||
(/usr/local/src/bash/bash-20250918/lib/readline/doc/hsuser.texi Chapter 9
|
||||
[167] [168] [169] [170] [171] [172] [173]) Chapter 10 [174] [175] [176]
|
||||
[177] [178]
|
||||
Underfull \hbox (badness 10000) in paragraph at lines 10703--10712
|
||||
Underfull \hbox (badness 10000) in paragraph at lines 10731--10740
|
||||
[]@textrm All of the fol-low-ing op-tions ex-cept for `@texttt alt-array-implem
|
||||
entation[]@textrm '[],
|
||||
|
||||
@@ -329,7 +330,7 @@ entation[]@textrm '[],
|
||||
.etc.
|
||||
|
||||
|
||||
Underfull \hbox (badness 10000) in paragraph at lines 10703--10712
|
||||
Underfull \hbox (badness 10000) in paragraph at lines 10731--10740
|
||||
@textrm `@texttt disabled-builtins[]@textrm '[], `@texttt direxpand-default[]@t
|
||||
extrm '[], `@texttt strict-posix-default[]@textrm '[], and
|
||||
|
||||
@@ -346,17 +347,17 @@ extrm '[], `@texttt strict-posix-default[]@textrm '[], and
|
||||
texinfo.tex: doing @include of fdl.texi
|
||||
|
||||
|
||||
(/usr/local/src/bash/bash-20250822/doc/fdl.texi [192] [193] [194] [195]
|
||||
(/usr/local/src/bash/bash-20250918/doc/fdl.texi [192] [193] [194] [195]
|
||||
[196] [197] [198]) Appendix D [199] [200] [201] [202] [203] [204] [205]
|
||||
[206] [207] [208] )
|
||||
Here is how much of TeX's memory you used:
|
||||
4116 strings out of 495840
|
||||
47662 string characters out of 6171739
|
||||
145158 words of memory out of 5000000
|
||||
5048 multiletter control sequences out of 15000+600000
|
||||
4116 strings out of 495820
|
||||
47662 string characters out of 6170887
|
||||
145142 words of memory out of 5000000
|
||||
5053 multiletter control sequences out of 15000+600000
|
||||
34315 words of font info for 116 fonts, out of 8000000 for 9000
|
||||
701 hyphenation exceptions out of 8191
|
||||
16i,6n,16p,331b,983s stack positions out of 10000i,1000n,20000p,200000b,200000s
|
||||
16i,6n,16p,389b,983s stack positions out of 10000i,1000n,20000p,200000b,200000s
|
||||
</opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/
|
||||
cm/cmbx12.pfb></opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cm
|
||||
csc10.pfb></opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmmi10
|
||||
@@ -373,10 +374,10 @@ fonts/type1/public/amsfonts/cm/cmti10.pfb></opt/local/share/texmf-texlive/fonts
|
||||
lic/amsfonts/cm/cmtt9.pfb></opt/local/share/texmf-texlive/fonts/type1/public/cm
|
||||
-super/sfrm1095.pfb></opt/local/share/texmf-texlive/fonts/type1/public/cm-super
|
||||
/sfrm1440.pfb>
|
||||
Output written on bashref.pdf (214 pages, 857538 bytes).
|
||||
Output written on bashref.pdf (214 pages, 810038 bytes).
|
||||
PDF statistics:
|
||||
2948 PDF objects out of 2984 (max. 8388607)
|
||||
2686 compressed objects within 27 object streams
|
||||
2947 PDF objects out of 2984 (max. 8388607)
|
||||
2685 compressed objects within 27 object streams
|
||||
342 named destinations out of 1000 (max. 500000)
|
||||
1157 words of extra memory for PDF output out of 10000 (max. 10000000)
|
||||
|
||||
|
||||
Binary file not shown.
+7
-7
@@ -5,17 +5,17 @@
|
||||
\entry{done}{12}{\code {done}}
|
||||
\entry{while}{12}{\code {while}}
|
||||
\entry{for}{12}{\code {for}}
|
||||
\entry{if}{12}{\code {if}}
|
||||
\entry{then}{12}{\code {then}}
|
||||
\entry{else}{12}{\code {else}}
|
||||
\entry{elif}{12}{\code {elif}}
|
||||
\entry{fi}{12}{\code {fi}}
|
||||
\entry{if}{13}{\code {if}}
|
||||
\entry{then}{13}{\code {then}}
|
||||
\entry{else}{13}{\code {else}}
|
||||
\entry{elif}{13}{\code {elif}}
|
||||
\entry{fi}{13}{\code {fi}}
|
||||
\entry{case}{13}{\code {case}}
|
||||
\entry{in}{13}{\code {in}}
|
||||
\entry{esac}{13}{\code {esac}}
|
||||
\entry{select}{14}{\code {select}}
|
||||
\entry{[[}{14}{\code {[[}}
|
||||
\entry{]]}{14}{\code {]]}}
|
||||
\entry{[[}{15}{\code {[[}}
|
||||
\entry{]]}{15}{\code {]]}}
|
||||
\entry{{\indexlbrace }}{18}{\code {{\tt \char 123}}}
|
||||
\entry{{\indexrbrace }}{18}{\code {{\tt \char 125}}}
|
||||
\entry{function}{19}{\code {function}}
|
||||
|
||||
+7
-7
@@ -1,9 +1,9 @@
|
||||
\initial {!}
|
||||
\entry{\code {!}}{10}
|
||||
\initial {[}
|
||||
\entry{\code {[[}}{14}
|
||||
\entry{\code {[[}}{15}
|
||||
\initial {]}
|
||||
\entry{\code {]]}}{14}
|
||||
\entry{\code {]]}}{15}
|
||||
\initial {{\indexlbrace }}
|
||||
\entry{\code {{\tt \char 123}}}{18}
|
||||
\initial {{\indexrbrace }}
|
||||
@@ -14,20 +14,20 @@
|
||||
\entry{\code {do}}{12}
|
||||
\entry{\code {done}}{12}
|
||||
\initial {E}
|
||||
\entry{\code {elif}}{12}
|
||||
\entry{\code {else}}{12}
|
||||
\entry{\code {elif}}{13}
|
||||
\entry{\code {else}}{13}
|
||||
\entry{\code {esac}}{13}
|
||||
\initial {F}
|
||||
\entry{\code {fi}}{12}
|
||||
\entry{\code {fi}}{13}
|
||||
\entry{\code {for}}{12}
|
||||
\entry{\code {function}}{19}
|
||||
\initial {I}
|
||||
\entry{\code {if}}{12}
|
||||
\entry{\code {if}}{13}
|
||||
\entry{\code {in}}{13}
|
||||
\initial {S}
|
||||
\entry{\code {select}}{14}
|
||||
\initial {T}
|
||||
\entry{\code {then}}{12}
|
||||
\entry{\code {then}}{13}
|
||||
\entry{\code {time}}{10}
|
||||
\initial {U}
|
||||
\entry{\code {until}}{12}
|
||||
|
||||
@@ -4187,6 +4187,12 @@ Other builtins that accept arguments but are not specified as accepting
|
||||
options interpret arguments beginning with @samp{-} as invalid options and
|
||||
require @samp{--} to prevent this interpretation.
|
||||
|
||||
All builtins except
|
||||
@code{:}, @code{true}, @code{false}, @code{echo}, and @code{test}/@code{[}
|
||||
accept @samp{--help} as a special option.
|
||||
If @samp{--help} is supplied, these builtins output
|
||||
a help message and exit with a status of 0.
|
||||
|
||||
@node Bourne Shell Builtins
|
||||
@section Bourne Shell Builtins
|
||||
|
||||
|
||||
+7
-7
@@ -14,32 +14,32 @@
|
||||
@numsubsecentry{Comments}{3.1.3}{Comments}{9}
|
||||
@numsecentry{Shell Commands}{3.2}{Shell Commands}{9}
|
||||
@numsubsecentry{Reserved Words}{3.2.1}{Reserved Words}{9}
|
||||
@numsubsecentry{Simple Commands}{3.2.2}{Simple Commands}{9}
|
||||
@numsubsecentry{Simple Commands}{3.2.2}{Simple Commands}{10}
|
||||
@numsubsecentry{Pipelines}{3.2.3}{Pipelines}{10}
|
||||
@numsubsecentry{Lists of Commands}{3.2.4}{Lists}{11}
|
||||
@numsubsecentry{Compound Commands}{3.2.5}{Compound Commands}{11}
|
||||
@numsubsubsecentry{Looping Constructs}{3.2.5.1}{Looping Constructs}{12}
|
||||
@numsubsubsecentry{Conditional Constructs}{3.2.5.2}{Conditional Constructs}{12}
|
||||
@numsubsubsecentry{Conditional Constructs}{3.2.5.2}{Conditional Constructs}{13}
|
||||
@numsubsubsecentry{Grouping Commands}{3.2.5.3}{Command Grouping}{18}
|
||||
@numsubsecentry{Coprocesses}{3.2.6}{Coprocesses}{18}
|
||||
@numsubsecentry{GNU Parallel}{3.2.7}{GNU Parallel}{19}
|
||||
@numsecentry{Shell Functions}{3.3}{Shell Functions}{19}
|
||||
@numsecentry{Shell Parameters}{3.4}{Shell Parameters}{22}
|
||||
@numsubsecentry{Positional Parameters}{3.4.1}{Positional Parameters}{23}
|
||||
@numsubsecentry{Special Parameters}{3.4.2}{Special Parameters}{23}
|
||||
@numsecentry{Shell Expansions}{3.5}{Shell Expansions}{24}
|
||||
@numsubsecentry{Special Parameters}{3.4.2}{Special Parameters}{24}
|
||||
@numsecentry{Shell Expansions}{3.5}{Shell Expansions}{25}
|
||||
@numsubsecentry{Brace Expansion}{3.5.1}{Brace Expansion}{25}
|
||||
@numsubsecentry{Tilde Expansion}{3.5.2}{Tilde Expansion}{26}
|
||||
@numsubsecentry{Shell Parameter Expansion}{3.5.3}{Shell Parameter Expansion}{27}
|
||||
@numsubsecentry{Command Substitution}{3.5.4}{Command Substitution}{36}
|
||||
@numsubsecentry{Arithmetic Expansion}{3.5.5}{Arithmetic Expansion}{37}
|
||||
@numsubsecentry{Process Substitution}{3.5.6}{Process Substitution}{37}
|
||||
@numsubsecentry{Process Substitution}{3.5.6}{Process Substitution}{38}
|
||||
@numsubsecentry{Word Splitting}{3.5.7}{Word Splitting}{38}
|
||||
@numsubsecentry{Filename Expansion}{3.5.8}{Filename Expansion}{39}
|
||||
@numsubsubsecentry{Pattern Matching}{3.5.8.1}{Pattern Matching}{39}
|
||||
@numsubsecentry{Quote Removal}{3.5.9}{Quote Removal}{41}
|
||||
@numsecentry{Redirections}{3.6}{Redirections}{41}
|
||||
@numsubsecentry{Redirecting Input}{3.6.1}{}{42}
|
||||
@numsubsecentry{Redirecting Input}{3.6.1}{}{43}
|
||||
@numsubsecentry{Redirecting Output}{3.6.2}{}{43}
|
||||
@numsubsecentry{Appending Redirected Output}{3.6.3}{}{43}
|
||||
@numsubsecentry{Redirecting Standard Output and Standard Error}{3.6.4}{}{43}
|
||||
@@ -53,7 +53,7 @@
|
||||
@numsubsecentry{Simple Command Expansion}{3.7.1}{Simple Command Expansion}{45}
|
||||
@numsubsecentry{Command Search and Execution}{3.7.2}{Command Search and Execution}{46}
|
||||
@numsubsecentry{Command Execution Environment}{3.7.3}{Command Execution Environment}{46}
|
||||
@numsubsecentry{Environment}{3.7.4}{Environment}{47}
|
||||
@numsubsecentry{Environment}{3.7.4}{Environment}{48}
|
||||
@numsubsecentry{Exit Status}{3.7.5}{Exit Status}{48}
|
||||
@numsubsecentry{Signals}{3.7.6}{Signals}{49}
|
||||
@numsecentry{Shell Scripts}{3.8}{Shell Scripts}{50}
|
||||
|
||||
+2
-2
@@ -2,10 +2,10 @@
|
||||
Copyright (C) 1988-2025 Free Software Foundation, Inc.
|
||||
@end ignore
|
||||
|
||||
@set LASTCHANGE Sat Sep 6 15:27:05 EDT 2025
|
||||
@set LASTCHANGE Fri Sep 19 12:19:29 EDT 2025
|
||||
|
||||
@set EDITION 5.3
|
||||
@set VERSION 5.3
|
||||
|
||||
@set UPDATED 6 September 2025
|
||||
@set UPDATED 19 September 2025
|
||||
@set UPDATED-MONTH September 2025
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
# 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/>.
|
||||
#
|
||||
|
||||
# repeat - repeat a command
|
||||
#
|
||||
# usage: repeat N command [arg...]
|
||||
#
|
||||
# Evaluate COMMAND ARGs N times
|
||||
|
||||
repeat()
|
||||
{
|
||||
local _i _count
|
||||
|
||||
(( $# < 2 )) && {
|
||||
echo 'repeat: usage: repeat N command [arg...]' >&2
|
||||
return 2
|
||||
}
|
||||
|
||||
_count=$1
|
||||
(( $_count < 1 )) && {
|
||||
echo "repeat: count must be >= 1" >&2
|
||||
return 2
|
||||
}
|
||||
shift
|
||||
|
||||
for ((_i = 1; _i <= $_count; _i++)); do
|
||||
eval "$@"
|
||||
done
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
# 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/>.
|
||||
#
|
||||
|
||||
# repeat - repeat a command
|
||||
#
|
||||
# usage: repeat [-e] N command [arg...]
|
||||
#
|
||||
# Evaluate COMMAND ARGs N times. If -e is supplied, use eval
|
||||
|
||||
repeat()
|
||||
{
|
||||
local _i _count _e
|
||||
|
||||
[[ $1 = -e ]] && {
|
||||
e=1
|
||||
shift
|
||||
}
|
||||
|
||||
(( $# < 2 )) && {
|
||||
echo 'repeat: usage: repeat [-e] N command [arg...]' >&2
|
||||
return 2
|
||||
}
|
||||
|
||||
_count=$1
|
||||
(( $_count < 1 )) && {
|
||||
echo "repeat: count must be >= 1" >&2
|
||||
return 2
|
||||
}
|
||||
shift
|
||||
|
||||
for ((_i = 1; _i <= $_count; _i++)); do
|
||||
if [ "$e" ]; then
|
||||
eval "$@"
|
||||
else
|
||||
"$@"
|
||||
fi
|
||||
done
|
||||
}
|
||||
@@ -1588,7 +1588,7 @@ readtok (void)
|
||||
lasttok = curtok;
|
||||
curtok = STR;
|
||||
}
|
||||
else if (DIGIT(c))
|
||||
else if (DIGIT (c) || (c == locale_decpoint () && DIGIT (*cp)))
|
||||
{
|
||||
/* Let strtod figure out where to end the floating-point value and let
|
||||
the parser figure out what's valid. */
|
||||
|
||||
@@ -33,31 +33,3 @@ add-alias ()
|
||||
eval alias $name=\'$value\'
|
||||
alias $name
|
||||
}
|
||||
|
||||
# "repeat" command. Like:
|
||||
#
|
||||
# repeat 10 echo foo
|
||||
repeat ()
|
||||
{
|
||||
local count="$1" i;
|
||||
shift;
|
||||
for i in $(seq 1 "$count");
|
||||
do
|
||||
eval "$@";
|
||||
done
|
||||
}
|
||||
|
||||
# Subfunction needed by `repeat'.
|
||||
seq ()
|
||||
{
|
||||
local lower upper output;
|
||||
lower=$1 upper=$2;
|
||||
|
||||
if [ $lower -ge $upper ]; then return; fi
|
||||
while [ $lower -le $upper ];
|
||||
do
|
||||
echo -n "$lower "
|
||||
lower=$(($lower + 1))
|
||||
done
|
||||
echo "$lower"
|
||||
}
|
||||
|
||||
+10
-7
@@ -83,6 +83,8 @@ ansicstr (const char *string, size_t len, int flags, int *sawc, size_t *rlen)
|
||||
(locale_utf8locale == 0 && mb_cur_max > 0 && is_basic (c) == 0))
|
||||
{
|
||||
clen = mbrtowc (&wc, s - 1, mb_cur_max, 0);
|
||||
if (MB_NULLWCH (clen))
|
||||
break; /* it apparently can happen */
|
||||
if (MB_INVALIDCH (clen))
|
||||
clen = 1;
|
||||
}
|
||||
@@ -263,8 +265,8 @@ ansic_quote (const char *str, int flags, int *rlen)
|
||||
if (is_basic (c) == 0)
|
||||
{
|
||||
clen = mbrtowc (&wc, s, MB_CUR_MAX, &state);
|
||||
if (clen == 0)
|
||||
break;
|
||||
if (MB_NULLWCH (clen))
|
||||
goto quote_end;
|
||||
if (MB_INVALIDCH (clen))
|
||||
INITIALIZE_MBSTATE;
|
||||
else if (iswprint (wc))
|
||||
@@ -283,17 +285,18 @@ ansic_quote (const char *str, int flags, int *rlen)
|
||||
continue;
|
||||
}
|
||||
|
||||
*r++ = '\\';
|
||||
*r++ = TOCHAR ((c >> 6) & 07);
|
||||
*r++ = TOCHAR ((c >> 3) & 07);
|
||||
*r++ = TOCHAR (c & 07);
|
||||
continue;
|
||||
*r++ = '\\';
|
||||
*r++ = TOCHAR ((c >> 6) & 07);
|
||||
*r++ = TOCHAR ((c >> 3) & 07);
|
||||
*r++ = TOCHAR (c & 07);
|
||||
continue;
|
||||
}
|
||||
|
||||
*r++ = '\\';
|
||||
*r++ = c;
|
||||
}
|
||||
|
||||
quote_end:
|
||||
*r++ = '\'';
|
||||
*r = '\0';
|
||||
if (rlen)
|
||||
|
||||
@@ -75,6 +75,8 @@ extern int EOF_Reached;
|
||||
#define EX_DISKFALLBACK 262 /* fall back to disk command from builtin */
|
||||
#define EX_UTILERROR 263 /* Posix special builtin utility error */
|
||||
|
||||
#define EX_HELPOPT 264
|
||||
|
||||
/* Flag values that control parameter pattern substitution. */
|
||||
#define MATCH_ANY 0x000
|
||||
#define MATCH_BEG 0x001
|
||||
|
||||
+1
-1
@@ -3636,7 +3636,7 @@ assign_in_env (const WORD_DESC *word, int flags)
|
||||
|
||||
if (flags)
|
||||
{
|
||||
if (STREQ (newname, "POSIXLY_CORRECT") || STREQ (newname, "POSIX_PEDANDTIC"))
|
||||
if (STREQ (newname, "POSIXLY_CORRECT") || STREQ (newname, "POSIX_PEDANTIC"))
|
||||
save_posix_options (); /* XXX one level of saving right now */
|
||||
stupidly_hack_special_variables (newname);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user