Wiley.com
Print this page Share

Shell Scripting: Expert Recipes for Linux, Bash, and more

ISBN: 978-1-118-02448-5
Paperback
600 pages
August 2011
List Price: US $49.99
Government Price: US $25.49
Enter Quantity:   Buy
Shell Scripting: Expert Recipes for Linux, Bash, and more (1118024486) cover image

Do you think you've discovered an error in this book? Please check the list of errata below to see if we've already addressed the error. If not, please submit the error via our Errata Form. We will attempt to verify your error; if you're right, we will post a correction below.

ChapterPageDetailsDatePrint Run
16 Author's update: The "Shellshock" bug in GNU's Bash shell
To read the article on the author's website, visit
http://steve-parker.org/articles/shellshock/
10/8/14
2 44 Text Correction
Currently Reads:
$ while read ip name alias
should read:
$ while read ip name aliases
10/02/14
73 Error in Text
2nd paragraph, last sentence:

CURRENTLY SAYS:
"This is expressed as +(a-z). You can also use [:alpha:] in place of (a-z) so this example uses both.

SHOULD SAY:
"This is expressed as +([a-z]). You can also use ([:alpha:]) in place of (a-z) so this example uses both.
10/09/2013
5 95 Text correction: Error in code under "File Comparison Tests"
The second to last line of code on the page, Files file1 and file4 differ
should be deleted.
2/7/14
7 157 Text correction: Error in code under "Indirection"
In the first line of code, "mything" should read "myvar"
2/7/14
8 194 Text correction: Error under "GETOPTS"
In the first paragraph, starting with the third sentence:
"getopts displays the error message "option requires an argument -- i" but continues executing. The usage message is displayed when the script later checks if $# is equal to 2, which in this case is not true"

should read:

"getopts displays the error message "option requires an argument -- i" but continues executing with argv set to "?" which causes the usage() function to be called. usage() displays a message and exits the script. The usage message would have been displayed anyway, when the script later checks if $# is equal to 2, which in this case is not true."
4/16/14
9 215 Text correction: Error under "Deleting from an Array"
The first paagraph on the page:
"Using unset activities[7] has largely the same effect. As discussed in Chapter 7, there is a difference between setting a variable to the empty string and unsetting it entirely, but it is obvious only when the ${variable+string} or ${variable?string} forms are used."

Should read:

"Using unset activities[7] has largely the same effect. As discussed in Chapter 7, there is a difference between setting a variable to the empty string and unsetting it entirely, but it is obvious only when the ${variable+string} or ${variable?string} forms are used. In the case of an array, it also has the effect of decrementing the size of ${#activities[@]}."

The first set of output on the page should not include the line "Activity 11: parachuting"
4/15/14
12 295 Text Correction: Error in Code
295-296, code under DF header, line 6
CURRENTLY READS
available=`df -k /var | awk '{ print $4 }' | tail -1`
SHOULD READ
available=`df -k ${preferred} | awk '{ print $4 }' | tail -1`
08/22/14
12 310 Text Correction: Error in Code
Lines 4-6
Currently Reads:
matches=0
comparisons=0
combinations=0
Should Read:
--blank--
08/27/14
12 311 Text Correction: Error in Code
Lines 97-98
Currently Reads:
logmsg 2 "`date`: Done. `basename $0` found $matches matches in $comparisons comparisons."
logmsg 2 "Compared `wc -l $MD5 | awk '{ print $1 }'` files; that makes for $combinations combinations."
Should Read
--blank--
08/27/14
39 Text Correction: Error in Code
Currently reads:
(The if statement would more commonly be written the other way around, if [ ?$#? -ne ?2? ] rather than if [?$#? -ne ?2? ], but this is hopefully more clear for this example.)
this should read:
(The if statement would more commonly be written the other way around, if [ ?$#? -ne ?2? ] rather than if [ ?$#? -eq ?2? ], but this is hopefully more clear for this example.)
04/02/15

Related Titles

Linux & UNIX

by William von Hagen
by Roger Whittaker, Justin Davies
by Ian Lawrence, Rodrigo Cesar Lopes Belem
by Justin Davies, Roger Whittaker, William von Hagen
by Margaret Levine Young, John R. Levine
Back to Top