change.log
来自「BASH Shell 编程 经典教程 《高级SHELL脚本编程》中文版」· LOG 代码 · 共 1,823 行 · 第 1/5 页
LOG
1,823 行
18) In "Here Documents" chapter: Added comment block to "ex71.sh", explaining how to redirect stdout to a file. Added in-line example of setting a variable from the output of a here document. (Thanks, Jason Parker, for both of the above.)19) In "Arrays" chapter: Fixed errors in comments in in-line "Nested Array" example. Added clarification and comments to "array-assign.bash" example. (Thank you, William Park, for both of the above.) After "array-assig.bash" example, added note about speeding up execution using an "unnecessary" 'declare -a' in an array declaration.20) In "Gotchas" chapter: Added problem with "tail -f" piped to a "grep" while trying to write the stdout to a file. (Thanks, TKVoice Author, for bringing this to my attention.)21) In "Options" chapter: Minor revisions to "Bash options" table.22) In "Revision History" appendix: Changed format to a table.23) Restored truncated version of Revision History to front matter. It turns out that this is required Docbook metadata, per the LDP. Version 2.3'STRAWBERRY' release, 12/28/031) In "Parameter Substitution" section of "Variables Revisited" chapter: Fixed typo ("code code") at "${parameter=default}" entry. (Thank you, Ken Harrenstien.) Simplified usage example of "${var#Pattern}. Added more elaborate alternate. (Thank you, Manfred Schwarb.)2) In "Operations and Related Topics" chapter: Noted that as of version 2.05b, Bash supports 64-bit integers. (Thank you, Ken Harrenstien.)3) In "Options" chapter: Clarified "single-dash" versus "double-dash" invocation of options.4) In "Internal Commands" chapter: Applied fix to "eval.example" example. (Thanks, Paulo Marcel Coelho Aragao.)5) In "Text Processing Commands" of "External Commands and Filters" chapter: Modified "wf.sh" example to also filter out commas.6) In "Basic Commands" section of "External Commands" Chapter: At "ln" discussion, fixed error and added John MacDonald's lucid explanation of the difference between a hard and soft link.7) In "Complex Commands" section of "External Commands" Chapter: At "xargs" discussion, added "wf2.sh" example script.8) In "Special Characters" chapter: Modified "ex58.sh" example to include creation date in name of backup file. (Thanks, Joshua Tschida.) Added listing for "Ctl-Q." (Thanks, Jeremy Weatherford.) Fixed erroneous comment at ": >>" entry. (Thanks, Mitchlan Landers.)9) In "Time/Date Commands" section of "External Commands" chapter: At "date" discussion, added "ex58" cross-reference and using "date" to generate 6-digit random integers.10) Bash, version 2.05b, no longer supports large negative integer return values. This required changing some text and rewriting the example scripts "max2.sh" and "return-test.sh" in the "Functions" chapter. Also, the "days-between.sh" script in the "Contributed Scripts" appendix needed modification. It serves me right for using undocumented features.11) In "Functions" chapter: Added subsection on recursion in a function, without using local variables. Added Amit Singh's wonderfully recursive "Towers of Hanoi" (hanoi.bash) example script.12) In "Gotchas" chapter: Added discussion of hazards of using undocumented features in Bash.13) In "Internal Variables" section of "Variables Revisited" chapter: Revised discussion of "$TMOUT" variable to reflect changes in version 2.05b of Bash. Provided inline usage example.14) In "Here Documents" chapter: Minor stylistic change in introductory paragraph.15) In "Globbing" section of "Regular Expressions" chapter: Added discussion of changing globbing behavior using "set -f" and "nocaseglob" and "nullglob" options to 'shopt.'16) In "Arrays" chapter: Fixed error in comment in "array-ops.sh" example. (Paulo Marcel Coelho Aragao and Emilio Conti both pointed this out.) Fixed error in comment in "array-strops.sh" example. (Thanks, Paulo Marcel Coelho Aragao.) Fixed misleading comment in "ex67.sh" example, and added comment about use of "@" and "*" in array notation being analogous to $@ and $*. (Thanks, Paulo Marcel Coelho Aragao.) Removed unnecessary instances of "declare" from "empty-array.sh" example. (Thanks, Paulo Marcel Coelho Aragao.) Simplified in-line example demonstrating loading of the contents of a file into an array. (Thanks, Paulo Marcel Coelho Aragao.) Added comments suggesting a simplification in "bubble.sh" example. (Thanks, Paulo Marcel Coelho Aragao.)17) In "Contributed Scripts" appendix: Added Konstantin Riabitsev's "usb.sh" example. Fortunately, the script is GPL, which is compatible with the ABS Guide license.18) In "Analyzing Scripts" section of "Exercises" appendix: Minor stylistic changes in commentary.19) In "Copyright" chapter: Added links for Russian and Italian translations.20) Moved the Revision History to the back of the book, into an appendix of its own. (I have had numerous requests to do this.)Version 2.2 'CRANBERRY' release, 11/01/03Comments: Major release. Much new material added.1) In "Text Processing Commands" of "External Commands and Filters" chapter: Fixed up listing of "gettext." (Thanks, Bruno Haible.) Added "msgfmt." Renamed "du.sh" example to "Du.sh" to avoid confusion with system 'du" command. (Thank you, Bill Gradwohl.)2) In "Typing Variables" section of "Variables Revisited" chapter: At 'declare,' added example of arithmetic operations enabled with '-i' option. Fixed term heading to "-x var=$value." (Thank you, Bill Gradwohl.)3) Modified "Localization" appendix, per suggestions by Bruno Haible.4) In "Internal Variables" section of "Variables Revisited" chapter: Added '$PROMPT_COMMAND.' Fixed an error in "arglist.sh" example. Added Bj鰊 Eriksson's "readpipe.sh" example.5) In "Local Variables" section of "Functions" chapter: Modified note in example script in footnote 2. (Thanks, Zhao You Bing.)6) Fixed up references to my own "yawl" package, to reflect the latest update.7) In "Writing Scripts" section of "Exercises" appendix: In "Difficult" section, added "Testing Passwords" exercise .8) In "Subshells" chapter: In in-line script example that tests whether variable is set, noted that this also tests whether that variable is present in the environment (exported). (Thank you, Mr. Fred.)9) In "Comparison Operators" section of "Tests" chapter: Corrected typos in "str-test.sh" example. (Thank you, Bill Gradwohl.)10) In "Internal Commands" chapter: Fixed a typo in "ex46.sh" example. (Thank you, Bill Gradwohl.) Fixed a typo in "ex33.sh" example, and implemented changes to explain what OPTIND does. (Thank you, Bill Gradwohl.)11) In "Information and Statistics" subsection of "System and Administrative Commands" chapter: Substituted better example of 'sar' output. (Thank you, Sebastien Godard.)12) In "Local Variables " section of "Functions" chapter: Fixed up "ex62.sh" example. (Thank you, Bill Gradwohl.)13) In "Basic Commands" section of "External Commands" Chapter: Added to discussion of 'ln.' Fixed typo in in-line example listing at 'cat,tac.' (Thank you, Bill Gradwohl.)14) In "Miscellaneous Commands" section of "External Commands" Chapter: Corrected "ex33a.sh" example. Noted that 'getopt' permits long options. (Thank you, Eric Levy.)15) In "RANDOM" section of "Variables Revisited" chapter: Noted exception in "Jipe" method of generating random numbers within a given range. Added improved formula for generating randoms within a range. (Thank you, Bill Gradwohl.) Added "random-between.sh" example for generating randoms within a range. (Thank you, Bill Gradwohl.)16) In "Arrays" chapter: Changed in-line example of miscellaneous array operations to an external shell script and enhanced it, per suggestions by Michael Zick. Added "array-strops.sh" example of using string manipulation operations on arrays. Added "array-assign.bash" script. Added "array-append.bash" script. (Thank you, Michael Zick.)17) In "Special Characters" chapter: At "Control Characters," section, added Ctl-B, Ctl-I, Ctl-S, and Ctl-K listings. Fixed listing for Ctl-M (Thanks, Lee Maschmeyer.) Also added Lee Maschmeyer's in-line example.18) In "Gotchas" chapter: At "Piping echo output . . . " inserted missing space.19) In "Exit and Exit Status" chapter: Added material to discussion of "bare" exit.20) Added "Where to Go For Help" section to "Endnotes" chapter.21) In the "Sed and Awk Micro-primer" appendix: Added "nyal's" "letter-count.sh" script.22) In "Contributed Scripts" appendix: Added Michael Zick's "protect_literal.sh" script. Added Michael Zick's "unprotect_literal.sh" script. Added Michael Zick's "basics-reviewed.bash" script.23) In "Bibliography" section: Added 'Bash Navigator' listing. Added 'GNU Bash Reference Manual' listing (thanks, Brian Gough).24) Miscellaneous cleanups on example scripts.Version 2.1'HUCKLEBERRY' release, 09/14/031) In Appendix B, "Reference Cards: Fixups -- (thanks to errors brought to my attention by Heiner Steven).2) In Appendix B, "Reference Cards: Added "Miscellaneous Construct" table. Added variable prefix matching to "Parameter Substitution" table.3) In "Internal Variables" section of "Variables Revisited" chapter: Noted that "$*" must be quoted to differentiate it from "$@" variable, and added a case to "arglist.sh" example to demonstrate this. (Thanks, Heiner Steven.)4) In "Command Substitution" chapter: Added note about the invocation of a subshell. Likewise added note in "setting variable to a file" in-line example. (Thanks, Paul Heffner.) Removed erroneous comment from in-line example of setting a variable to contents of a file. (Thanks, Anthony Richardson.)5) In "Arrays" chapter: Added "script-array.sh" example. (Thanks, Chris Martin, for the inspiration.)6) In "System Resources" subsection of "System and Administrative Commands": Fixed minor error ("while 1") in 'ulimit' illustrative script. (Thanks Emmanuel Chantreau)7) In "Subshells" chapter: Added a paragraph of commentary concerning external commands and Bash builtins.8) In "Special Characters" chapter: Elaborated example of ';' usage.9) In "Gotchas" chapter: Added in-line example of problem caused by piping to a loop. (Thanks Anthony Richardson.)10) In "System and Administrative Commands" chapter: Added more info to "sar" listing.11) In "Writing Scripts" section of "Exercises" appendix: Added "Monitoring Processes" exercise.12) In "Recursion" section of "Miscellany" chapter: Added Anthony Richardson's "usrmnt.sh" example. (Thanks!)13) Slight modifications to certain example files for clarification.Version 2.0'GOOSEBERRY' release, 08/24/03Comments:In view of the cumulative changes in the last several updates, it'sbumped up to a major version. This is now officially a "mature" project.1) In "Manipulating Strings" section of "Variables Revisited" chapter: Added negative index substring extraction example (Thanks, Dan Jacobson).2) In "Sed appendix": Changed title of second table, to make it less ambiguous.3) Changed "Sunsite" address in two examples.4) Made capitalization of example scripts more consistent.5) In "Command Substitution" chapter: Fixed typo in backquotes discussion (Thanks, Jiri Beran).6) In "Process Substitution" chapter: Added clarifying comment to SuSE script fragment (Thanks Ulrich Gayer).7) In "Invoking the script" section of "Starting Off With a Sha-Bang" chapter: Corrected typo in discussion (" . . . not recommended is using sh <scriptname . . . ") (Thanks, Norman Megill.)8) In "Quoting" chapter: Corrected typo in final example ("foor" --> "foo"). (Thanks, Norman Megill.) Noted that 'echo "\" invokes secondary prompt.9) In "Here Document" chapter: Shuffled the order of a couple of examples. Added warning about closing 'limit string' starting in first character position on its line, with in-line example. (Also added a mention in "Gotchas" chapter. Added "script-generate.sh" example of generating program code by disabling parameter substitution within the body of a 'here document.' (Thanks, Albert Reiner, for the idea.)10) In "Miscell
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?