چه کسانی این کتاب را می‌خوانند

دانشجوعلاقه‌مند یادگیری
کتابخوان حرفه‌ایلذت مطالعه
نویسندهالهام‌گیری

UNIX(R) Shells by Example (4th Edition) (By Example)

Quigley, Ellie

قیمت نهایی

۴۹٬۰۰۰ تومان

نسخه اصلی و اورجینال

بلافاصله پس از خرید، فایل کتاب روی دستگاه شما آمادهٔ دانلود است.

تحویل فوری
پرداخت امن
ضمانت فایل
پشتیبانی

مشخصات کتاب

نویسنده
Quigley, Ellie
سال انتشار
۲۰۰۴
فرمت
PDF
زبان
انگلیسی
تعداد صفحات
۱۵ صفحه
حجم فایل
۵٫۲ مگابایت
شابک
9780131475724، 9786092035502، 9788131741610، 013147572X، 6092035502، 8131741613

دربارهٔ کتاب

Cover......Page 1 Contents......Page 10 Preface......Page 34 Acknowledgments......Page 36 1.1.1 A Little Bit About UNIX......Page 38 1.1.2 Why Linux?......Page 39 1.2 Definition and Function of a Shell......Page 40 1.2.1 The UNIX Shells......Page 41 1.2.2 The Linux Shells......Page 42 1.3 History of the Shell......Page 43 1.3.2 Responsibilities of the Shell......Page 45 1.4.1 Parsing the Command Line......Page 46 1.4.2 Types of Commands......Page 47 1.5 Processes and the Shell......Page 48 1.5.1 What Processes Are Running?......Page 49 1.5.3 Creating Processes......Page 51 1.6.1 Ownership and Permissions......Page 55 1.6.2 The File Creation Mask......Page 56 1.6.3 Changing Permissions and Ownership......Page 57 1.6.5 Variables......Page 60 1.6.6 Redirection and Pipes......Page 61 1.6.7 The Shell and Signals......Page 67 1.7 Executing Commands from Scripts......Page 69 2.2 Sample Scripts: Comparing the Major Shells......Page 70 2.3 The C and TC Shell Syntax and Constructs......Page 71 2.3.1 The C/TC Shell Script......Page 76 2.4 The Bourne Shell Syntax and Constructs......Page 78 2.4.1 The Bourne Shell Script......Page 84 2.5 The Korn Shell Constructs......Page 86 2.5.1 The Korn Shell Script......Page 93 2.6 The Bash Shell Constructs......Page 95 2.6.1 The Bash Shell Script......Page 101 3.1.1 Definition and Example......Page 104 3.1.2 Regular Expression Metacharacters......Page 106 3.2 Combining Regular Expression Metacharacters......Page 112 3.2.1 More Regular Expression Metacharacters......Page 113 4.1.1 The Meaning of grep......Page 118 4.1.2 How grep Works......Page 119 4.1.3 Metacharacters......Page 120 4.1.4 grep and Exit Status......Page 122 4.2 grep Examples with Regular Expressions......Page 123 4.3 grep with Options......Page 128 4.4.1 grep Review......Page 131 4.5 egrep (Extended grep)......Page 132 4.5.1 egrep Examples......Page 133 4.5.2 egrep Review......Page 135 4.6 fgrep (Fixed grep or Fast grep)......Page 136 4.7.1 Basic and Extended Regular Expressions......Page 137 4.8 GNU Basic grep (grep –G) with Regular Expressions......Page 141 4.9 grep –E or egrep (GNU Extended grep)......Page 142 4.9.1 grep –E and egrep Examples......Page 143 4.9.2 Anomalies with Regular and Extended Variants of grep......Page 147 4.11 Recursive grep (rgrep, grep –R)......Page 150 4.12 GNU grep with Options......Page 151 4.13 grep with Options (UNIX and GNU)......Page 153 4.13.1 GNU grep Options Examples......Page 155 LAB 1: grep Exercise......Page 161 5.2 Versions of sed......Page 162 5.4 Regular Expressions......Page 163 5.6 Commands and Options......Page 165 5.6.1 How to Modify a File with sed......Page 167 5.7 Error Messages and Exit Status......Page 168 5.8 Metacharacters......Page 169 5.9 sed Examples......Page 170 5.9.2 Deleting: The d Command......Page 171 5.9.3 Substitution: The s Command......Page 173 5.9.4 Range of Selected Lines: The Comma......Page 176 5.9.6 Reading from Files: The r Command......Page 178 5.9.7 Writing to Files: The w Command......Page 179 5.9.8 Appending: The a Command......Page 180 5.9.9 Inserting: The i Command......Page 181 5.9.11 Next: The n Command......Page 182 5.9.12 Transform: The y Command......Page 183 5.9.13 Quit: The q Command......Page 184 5.9.14 Holding and Getting: The h and g Commands......Page 185 5.10 sed Scripting......Page 188 5.10.1 sed Script Examples......Page 189 5.10.2 sed Review......Page 191 LAB 2: sed Exercise......Page 192 6.1.2 Which awk?......Page 194 6.2.1 Input from Files......Page 195 6.2.2 Input from Commands......Page 196 6.3 How awk Works......Page 197 6.4.1 The print Function......Page 198 6.4.3 The printf Function......Page 200 6.5 awk Commands from Within a File......Page 203 6.6.1 Records......Page 204 6.6.2 Fields......Page 205 6.6.3 Field Separators......Page 206 6.7.1 Patterns......Page 208 6.7.2 Actions......Page 209 6.8 Regular Expressions......Page 210 6.8.2 The match Operator......Page 212 6.9 awk Commands in a Script File......Page 214 6.10.1 Simple Pattern Matching......Page 215 6.10.2 Simple Actions......Page 216 6.10.3 Regular Expressions in Pattern and Action Combinations......Page 219 6.10.4 Input Field Separators......Page 221 6.10.5 awk Scripting......Page 223 LAB 3: awk Exercise......Page 224 6.11.1 Relational and Equality Operators......Page 225 6.11.3 Computation......Page 227 6.11.4 Logical Operators and Compound Patterns......Page 228 6.11.6 A Data Validation Program......Page 229 6.12.1 Equality Testing......Page 231 6.12.2 Relational Operators......Page 232 6.12.3 Logical Operators (&&, ||)......Page 233 6.12.5 Arithmetic Operators......Page 234 6.12.7 Conditional Operator......Page 237 6.12.8 Assignment Operators......Page 238 LAB 4: awk Exercise......Page 239 6.13.2 User-Defined Variables......Page 240 6.13.4 END Patterns......Page 245 6.14.1 Output Redirection......Page 246 6.14.2 Input Redirection (getline)......Page 247 6.15 Pipes......Page 249 6.15.1 Closing Files and Pipes......Page 250 6.16.1 Increment and Decrement Operators......Page 251 6.16.2 Built-In Variables......Page 252 6.16.3 BEGIN Patterns......Page 256 6.16.4 END Patterns......Page 257 6.16.5 awk Script with BEGIN and END......Page 258 6.16.6 The printf Function......Page 260 6.16.7 Redirection and Pipes......Page 261 6.16.8 Opening and Closing a Pipe......Page 262 LAB 5: nawk Exercise......Page 263 6.17.1 if Statements......Page 264 6.17.2 if/else Statements......Page 265 6.17.3 if/else and else if Statements......Page 266 6.18.1 while Loop......Page 267 6.18.3 Loop Control......Page 268 6.19.2 exit Statement......Page 269 6.20.1 Subscripts for Associative Arrays......Page 270 6.20.2 Processing Command Arguments (nawk)......Page 276 6.21.1 String Functions......Page 279 6.22.1 Integer Function......Page 283 6.22.2 Random Number Generator......Page 284 6.23 User-Defined Functions (nawk)......Page 285 6.24 Review......Page 287 LAB 6: nawk Exercise......Page 292 6.25.1 Fixed Fields......Page 293 6.25.2 Multiline Records......Page 295 6.25.3 Generating Form Letters......Page 297 6.25.4 Interaction with the Shell......Page 299 6.26 awk Built-In Functions......Page 301 6.26.1 String Functions......Page 302 6.26.2 Time Functions with gawk......Page 306 6.26.3 Command-Line Arguments......Page 308 6.26.4 Reading Input (getline)......Page 309 6.26.5 Control Functions......Page 310 6.26.6 User-Defined Functions......Page 311 6.26.7 awk/gawk Command-Line Options......Page 312 7.1 Introduction......Page 316 7.2.1 The Initialization Files......Page 317 7.2.2 The Prompts......Page 320 7.2.4 The hash Command......Page 322 7.2.5 The dot Command......Page 323 7.3.1 The Exit Status......Page 324 7.3.3 Conditional Execution of Commands......Page 325 7.3.4 Commands in the Background......Page 326 7.5 Filename Substitution......Page 327 7.5.2 The Question Mark......Page 328 7.5.3 The Square Brackets......Page 329 7.5.4 Escaping Metacharacters......Page 330 7.6.1 Local Variables......Page 331 7.6.2 Environment Variables......Page 333 7.6.3 Listing Set Variables......Page 335 7.6.4 Unsetting Variables......Page 336 7.6.5 Printing the Values of Variables: The echo Command......Page 337 7.6.6 Variable Expansion Modifiers......Page 338 7.6.7 Positional Parameters......Page 340 7.6.8 Other Special Variables......Page 342 7.7 Quoting......Page 343 7.7.1 The Backslash......Page 344 7.7.3 Double Quotes......Page 345 7.8 Command Substitution......Page 346 7.9.1 Defining Functions......Page 347 7.9.2 Listing and Unsetting Functions......Page 348 7.10 Standard I/O and Redirection......Page 349 7.10.1 The exec Command and Redirection......Page 350 7.11 Pipes......Page 353 7.12 The here document and Input......Page 355 7.12.1 Now What?......Page 357 8.1.1 The Steps in Creating a Shell Script......Page 358 8.2 Reading User Input......Page 360 8.3.1 Integer Arithmetic and the expr Command......Page 362 8.4 Positional Parameters and Command-Line Arguments......Page 364 8.4.1 The set Command and Positional Parameters......Page 366 8.4.2 How $* and $@ Differ......Page 368 8.5 Conditional Constructs and Flow Control......Page 370 8.5.1 Testing Exit Status: The test Command......Page 371 8.5.2 The if Command......Page 372 8.5.3 The exit Command and the ? Variable......Page 374 8.5.4 Checking for Null Values......Page 376 8.5.5 The if/else Command......Page 377 8.5.6 The if/elif/else Command......Page 379 8.5.8 The null Command......Page 381 8.5.9 The case Command......Page 383 8.5.10 Creating Menus with the here document and case Command......Page 385 8.6.1 The for Command......Page 386 8.6.2 The $* and $@ Variables in Wordlists......Page 389 8.6.3 The while Command......Page 391 8.6.4 The until Command......Page 394 8.6.5 Looping Control Commands......Page 395 8.6.6 Nested Loops and Loop Control......Page 401 8.6.7 I/O Redirection and Subshells......Page 402 8.6.8 Running Loops in the Background......Page 405 8.6.9 The exec Command and Loops......Page 406 8.6.10 IFS and Loops......Page 407 8.7 Functions......Page 409 8.7.2 Function Arguments and the Return Value......Page 410 8.7.3 Functions and the dot Command......Page 412 8.8 Trapping Signals......Page 415 8.8.1 Resetting Signals......Page 416 8.8.3 Listing Traps......Page 417 8.8.4 Traps in Functions......Page 419 8.8.5 Debugging......Page 420 8.9.1 Processing Command-Line Options with getopts......Page 421 8.9.2 The eval Command and Parsing the Command Line......Page 428 8.10 Shell Invocation Options......Page 429 8.10.1 The set Command and Options......Page 430 8.10.2 Shell Built-In Commands......Page 431 LAB 8: Bourne Shell—Getting Started......Page 432 LAB 10: Redirection......Page 433 LAB 12: Command-Line Arguments......Page 434 LAB 13: Getting User Input......Page 435 LAB 14: Conditional Statements......Page 436 LAB 17: Loops......Page 437 LAB 18: Functions......Page 438 9.1.1 C/TC Shell Startup......Page 440 9.2.1 Initialization Files......Page 441 9.2.2 The Search Path......Page 444 9.2.5 The source Command......Page 445 9.2.6 The Shell Prompts......Page 446 9.3.1 The Exit Status......Page 447 9.3.2 Command Grouping......Page 448 9.3.4 Commands in the Background......Page 449 9.3.5 Command-Line History......Page 450 9.4.1 Listing Aliases......Page 455 9.4.3 Deleting Aliases......Page 456 9.5.1 The pushd and popd Commands......Page 457 9.6.1 The Ampersand and Background Jobs......Page 460 9.6.3 The jobs Command......Page 461 9.6.4 The Foreground and Background Commands......Page 462 9.7 Shell Metacharacters......Page 463 9.8.1 The Asterisk......Page 464 9.8.2 The Question Mark......Page 465 9.8.4 The Curly Braces......Page 466 9.8.6 Tilde Expansion......Page 467 9.8.8 Turning Off Metacharacters with noglob......Page 468 9.9 Redirection and Pipes......Page 469 9.9.2 The here document......Page 470 9.9.3 Redirecting Output......Page 472 9.9.5 Redirecting Output and Error......Page 473 9.9.6 Separating Output and Errors......Page 475 9.9.7 The noclobber Variable......Page 476 9.10 Variables......Page 477 9.10.2 Local Variables......Page 478 9.10.3 Environment Variables......Page 481 9.10.4 Arrays......Page 484 9.10.5 Special Variables......Page 487 9.11 Command Substitution......Page 489 9.11.1 Wordlists and Command Substitution......Page 490 9.12.1 The Backslash......Page 492 9.12.2 Single Quotes......Page 493 9.12.3 Double Quotes......Page 494 9.12.4 The Quoting Game......Page 495 9.13 New Features of the Interactive TC Shell......Page 497 9.13.2 The Shell Prompts......Page 498 9.14.1 The Command Line and Exit Status......Page 501 9.14.2 TC Shell Command-Line History......Page 503 9.14.3 The Built-In Command-Line Editors......Page 511 9.15.1 The autolist Variable......Page 519 9.15.3 The complete Shell Variable......Page 521 9.15.4 Programming Completions......Page 522 9.16 TC Shell Spelling Correction......Page 527 9.17.1 Listing Aliases......Page 528 9.17.2 Creating Aliases......Page 529 9.17.3 Deleting Aliases......Page 530 9.17.5 Special tcsh Aliases......Page 531 9.18.1 The jobs Command and the listjobs Variable......Page 532 9.18.3 Scheduling Jobs......Page 534 9.19.1 The echo Command......Page 536 9.19.2 The printf Command......Page 537 9.19.4 Uppercase and Lowercase Modifiers......Page 539 9.20 TC Shell Built-In Commands......Page 540 9.20.1 Special Built-In T/TC Shell Variables......Page 551 9.20.2 TC Shell Command-Line Switches......Page 557 Lab 20: History......Page 559 Lab 21: Shell Metacharacters......Page 560 Lab 22: Redirection......Page 561 10.1.1 The Steps in Creating a Shell Script......Page 562 10.2.1 The $< Variable......Page 564 10.2.2 Creating a Wordlist from the Input String......Page 565 10.3.1 Arithmetic Operators......Page 566 10.3.2 Floating-Point Arithmetic......Page 567 10.4 Debugging Scripts......Page 568 10.5.1 Positional Parameters and argv......Page 571 10.6 Conditional Constructs and Flow Control......Page 572 10.6.1 Testing Expressions......Page 573 10.6.2 Precedence and Associativity......Page 574 10.6.3 The if Statement......Page 575 10.6.4 Testing and Unset or Null Variables......Page 576 10.6.6 Logical Expressions......Page 577 10.6.8 The if/else if Statement......Page 579 10.6.9 Exit Status and the Status Variable......Page 580 10.6.11 Using an Alias to Create an Error Message......Page 581 10.6.12 Using the Status Variable in a Script......Page 582 10.6.13 Evaluating Commands Within Conditionals......Page 583 10.6.14 The goto......Page 584 10.6.15 File Testing with the C Shell......Page 585 10.6.16 The test Command and File Testing......Page 586 10.6.17 Nesting Conditionals......Page 587 10.6.18 File Testing with the TC Shell......Page 588 10.6.20 Additional TC Shell File-Testing Operators......Page 591 10.6.21 The switch Command......Page 594 10.6.22 The here document and Menus......Page 597 10.7.1 The foreach Loop......Page 598 10.7.2 The while Loop......Page 601 10.7.3 The repeat Command......Page 602 10.7.4 Looping Control Commands......Page 603 10.8 Interrupt Handling......Page 607 10.9 setuid Scripts......Page 608 10.11 Built-In Commands......Page 609 Lab 25: Shell Metacharacters......Page 614 Lab 27: First Script......Page 615 Lab 28: Getting User Input......Page 616 Lab 30: Conditionals and File Testing......Page 617 Lab 32: Loops......Page 618 11.1.1 Startup......Page 620 11.2.1 The Initialization Files......Page 621 11.2.2 The Prompts......Page 626 11.2.4 The dot Command......Page 628 11.3.1 The Order of Processing Commands......Page 629 11.3.2 The Exit Status......Page 630 11.3.4 Conditional Execution of Commands......Page 631 11.3.6 Command-Line History......Page 632 11.3.7 Command-Line Editing......Page 636 11.4 Commenting and Filename Expansion......Page 639 11.5.1 Listing Aliases......Page 641 11.5.3 Deleting Aliases......Page 642 11.6 Job Control......Page 643 11.7 Metacharacters......Page 644 11.8.1 The Asterisk......Page 647 11.8.2 The Question Mark......Page 648 11.8.3 The Square Brackets......Page 649 11.8.5 Tilde and Hyphen Expansion......Page 650 11.8.6 New ksh Metacharacters......Page 651 11.8.7 The noglob Variable......Page 652 11.9.1 Local Variables......Page 653 11.9.2 Environment Variables......Page 655 11.9.3 Listing Set Variables......Page 658 11.9.5 Printing the Values of Variables......Page 661 11.9.6 Escape Sequences......Page 663 11.9.7 Variable Expressions and Expansion Modifiers......Page 664 11.9.8 Variable Expansion of Substrings......Page 667 11.9.9 Variable Attributes: The typeset Command......Page 668 11.9.10 Positional Parameters......Page 670 11.9.11 Other Special Variables......Page 672 11.10.2 Single Quotes......Page 673 11.10.3 Double Quotes......Page 674 11.11 Command Substitution......Page 675 11.12 Functions......Page 676 11.12.1 Defining Functions......Page 677 11.12.2 Functions and Aliases......Page 678 11.12.3 Listing Functions......Page 679 11.13 Standard I/O and Redirection......Page 680 11.13.1 The exec Command and Redirection......Page 682 11.14 Pipes......Page 683 11.14.1 The here document and Redirecting Input......Page 685 11.15.1 The time Command......Page 687 11.15.2 The TMOUT Variable......Page 688 12.1.1 The Steps in Creating a Shell Script......Page 690 12.2 Reading User Input......Page 693 12.2.1 read and File Descriptors......Page 695 12.2.2 Reading Through Files......Page 696 12.3.1 The Integer Type......Page 697 12.3.2 Using Different Bases......Page 698 12.3.4 Arithmetic Operators and the let Command......Page 699 12.4.1 The set Command and Positional Parameters......Page 702 12.5.1 Testing Exit Status and the $? Variable......Page 705 12.5.2 The Old test Command......Page 707 12.5.3 The New test Command......Page 708 12.5.6 File Testing with Flags......Page 710 12.5.7 The if Command......Page 712 12.5.8 Using the Old-Style Bourne test......Page 713 12.5.9 Using the New-Style Korn test......Page 714 12.5.11 The let Command and Testing Numbers......Page 715 12.5.13 The if/elif/else Command......Page 716 12.5.14 The exit Command......Page 718 12.5.15 The null Command......Page 720 12.5.16 The case Command......Page 721 12.6.1 The for Command......Page 723 12.6.3 The while Command......Page 726 12.6.4 The until Command......Page 729 12.6.5 The select Command and Menus......Page 730 12.6.6 Looping Control Commands......Page 734 12.6.7 Nested Loops and Loop Control......Page 738 12.6.8 I/O Redirection and Loops......Page 739 12.6.9 Running Loops in the Background......Page 741 12.6.10 The exec Command and Loops......Page 742 12.6.11 The IFS and Loops......Page 743 12.7 Arrays......Page 744 12.8 Functions......Page 746 12.8.2 Listing and Unsetting Functions......Page 747 12.8.3 Local Variables and the Return Value......Page 748 12.8.4 Exported Functions......Page 749 12.8.5 Function Options and the typeset Command......Page 751 12.9 Trapping Signals......Page 753 12.9.1 Pseudo or Fake Signals......Page 754 12.9.4 Listing Traps......Page 755 12.9.5 Traps and Functions......Page 758 12.10 Coprocesses......Page 759 12.11 Debugging......Page 762 12.12.1 Processing Command-Line Options with getopts......Page 765 12.14 Built-In Commands......Page 772 12.15 Korn Shell Invocation Arguments......Page 777 Lab 33: Korn Shell—Getting Started......Page 778 Lab 34: History......Page 779 Lab 35: Aliases and Functions......Page 780 Lab 37: Tilde Expansion, Quotes, and Command Substitution......Page 781 Lab 38: Redirection......Page 782 Lab 40: Writing the info Shell Script......Page 783 Lab 42: The lookup Script......Page 784 Lab 44: The if/else Construct and the let Command......Page 785 Lab 46: The select Loop......Page 786 Lab 47: Autoloading Functions......Page 788 13.1.1 Versions of bash......Page 790 13.1.2 Startup......Page 791 13.2.1 The Initialization Files......Page 793 13.2.2 Setting bash Options with the Built-In set and shopt Commands......Page 800 13.2.3 The Prompts......Page 805 13.2.4 The Search Path......Page 808 13.2.5 The hash Command......Page 809 13.2.6 The source or dot Command......Page 810 13.3.1 The Order of Processing Commands......Page 811 13.3.2 Built-In Commands and the help Command......Page 812 13.3.3 Changing the Order of Command-Line Processing......Page 813 13.3.4 The Exit Status......Page 814 13.3.7 Conditional Execution of Commands......Page 816 13.3.8 Commands in the Background......Page 817 13.4.1 Job Control Commands and Options......Page 818 13.5.1 Command and Filename Completion......Page 820 13.5.2 History......Page 822 13.5.3 Accessing Commands from the History File......Page 823 13.5.4 Command-Line Editing......Page 830 13.6.2 Creating Aliases......Page 835 13.7.1 The dirs Built-In Command......Page 836 13.7.2 The pushd and popd Commands......Page 837 13.8 Metacharacters (Wildcards)......Page 838 13.9.1 The Asterisk......Page 839 13.9.2 The Question Mark......Page 840 13.9.3 The Square Brackets......Page 841 13.9.4 Brace Expansion......Page 842 13.9.6 Tilde and Hyphen Expansion......Page 843 13.9.7 Controlling Wildcards (Globbing)......Page 844 13.9.8 Extended Filename Globbing (bash 2.x)......Page 845 13.10.3 The declare Built-In......Page 847 13.10.4 Local Variables and Scope......Page 848 13.10.5 Environment Variables......Page 851 13.10.7 Printing the Values of Variables......Page 857 13.10.8 Variable Expansion Modifiers (Parameter Expansion)......Page 860 13.10.9 Variable Expansion of Substrings......Page 864 13.10.10 Positional Parameters......Page 865 13.10.11 Other Special Variables......Page 867 13.11 Quoting......Page 868 13.11.1 The Backslash......Page 869 13.11.2 Single Quotes......Page 870 13.11.3 Double Quotes......Page 871 13.12 Command Substitution......Page 872 13.13 Arithmetic Expansion......Page 874 13.15 Arrays......Page 875 13.16.1 Defining Functions......Page 878 13.17 Standard I/O and Redirection......Page 881 13.17.1 The exec Command and Redirection......Page 883 13.18 Pipes......Page 886 13.18.1 The here document and Redirecting Input......Page 888 13.19 Shell Invocation Options......Page 889 13.19.1 The set Command and Options......Page 890 13.19.2 The shopt Command and Options......Page 892 13.20 Shell Built-In Commands......Page 894 Lab 49: Job Control......Page 897 Lab 51: Shell Metacharacters......Page 898 Lab 53: Variables......Page 899 14.1.1 The Steps in Creating a Shell Script......Page 902 14.2.1 Variables (Review)......Page 904 14.2.2 The read Command......Page 905 14.3.1 Integers (declare and let Commands)......Page 908 14.4.1 Positional Parameters......Page 911 14.4.2 The set Command and Positional Parameters......Page 913 14.5.1 Exit Status......Page 916 14.5.2 The Built-In test and let Commands......Page 917 14.5.3 The if Command......Page 923 14.5.4 The if/else Command......Page 928 14.5.5 The if/elif/else Command......Page 930 14.5.6 File Testing......Page 933 14.5.7 The null Command......Page 935 14.5.8 The case Command......Page 937 14.6.1 The for Command......Page 940 14.6.2 The $* and $@ Variables in Wordlists......Page 943 14.6.3 The while Command......Page 944 14.6.4 The until Command......Page 947 14.6.5 The select Command and Menus......Page 949 14.6.6 Looping Control Commands......Page 954 14.6.7 I/O Redirection and Subshells......Page 960 14.6.8 Running Loops in the Background......Page 962 14.6.9 The IFS and Loops......Page 963 14.7 Functions......Page 964 14.7.2 Exporting Functions......Page 965 14.7.3 Function Arguments and the Return Value......Page 966 14.7.4 Functions and the source (or dot) Command......Page 969 14.8 Trapping Signals......Page 972 14.8.1 Resetting Signals......Page 974 14.8.3 Listing Traps......Page 975 14.8.4 Traps and Functions......Page 977 14.9 Debugging......Page 978 14.10.1 Processing Command-Line Options with getopts......Page 980 14.10.2 The eval Command and Parsing the Command Line......Page 986 14.11.1 Shell Invocation Options......Page 988 14.11.2 The set Command and Options......Page 990 14.11.3 The shopt Command and Options......Page 992 14.12 Shell Built-In Commands......Page 994 Lab 54: bash Shell—First Script......Page 996 Lab 56: Getting User Input......Page 997 Lab 57: Conditional Statements......Page 998 Lab 59: The case Statement......Page 999 Lab 60: Loops......Page 1001 Lab 61: Functions......Page 1002 15.2 Style Issues......Page 1004 15.3 Types of Errors......Page 1005 15.3.2 Naming Conventions......Page 1006 15.3.4 Path Problems......Page 1007 15.3.5 The Shbang Line......Page 1009 15.3.6 Sneaky Aliases......Page 1010 15.4.1 Undefined and Misspelled Variables......Page 1012 15.4.2 Incomplete Programming Statements......Page 1013 15.4.3 Common Error Messages from the Big 5 Shells......Page 1028 15.4.4 Logic Errors and Robustness......Page 1038 15.5.1 Debugging Bourne Shell Scripts......Page 1046 15.5.2 Debugging C/TC Shell Scripts......Page 1048 15.5.3 Debugging Korn Shell Scripts......Page 1051 15.5.4 Debugging Bash Scripts......Page 1053 15.6 Summary......Page 1058 16.2 The Superuser......Page 1060 16.3 Becoming a Superuser with the su Command......Page 1061 16.3.1 Running Scripts As Root......Page 1064 16.3.2 Scripts That Run As Root (setuid Programs)......Page 1066 16.4 Boot Scripts......Page 1067 16.4.1 A Little Terminology......Page 1068 16.4.2 An Example Boot Script—The cron Utility......Page 1072 16.4.3 Writing a Portable Script......Page 1078 16.4.4 User-Specific Initialization Files......Page 1081 16.4.5 System-Wide Initialization Files......Page 1083 16.5 Summary......Page 1090 A: Useful UNIX/Linux Utilities for Shell Programmers......Page 1092 B.1 The Shells Compared......Page 1140 B.3 bash versus sh......Page 1141 A......Page 1150 B......Page 1153 C......Page 1156 D......Page 1161 E......Page 1162 F......Page 1164 G......Page 1166 H......Page 1167 I......Page 1168 K......Page 1169 L......Page 1171 M......Page 1172 N......Page 1173 P......Page 1174 R......Page 1177 S......Page 1179 T......Page 1183 V......Page 1185 W......Page 1186 Z......Page 1187 The world's #1 shell programming book-now fully updated for Linux and more! UNIX Shells by Example is the world's #1 shell programming book, from the world's #1 shell programming instructor: Ellie Quigley. In UNIX Shells by Example, Fourth Edition, Quigley has thoroughly updated her classic and delivers the information today's shell programmers need most-including comprehensive coverage of Linux shell programming with bash! Drawing on 20 years' experience as a shell programming instructor, Quigley guides you through every facet of programming all leading UNIX/Linux shells: bourne, bash, korn, C, and tcsh. Quigley illuminates each concept with up-to-date, classroom-tested code examples designed to help you jump-start your own projects. She also systematically introduces awk, sed, and grep for both UNIX and GNU/Linux . . . making this the only shell programming book you'll ever need! New in this edition: Comprehensive coverage of Linux shell programming with bash Shell Programming QuickStart: makes first-time shell programmers productive in just 15 pages Complete, practical debugging chapter Updated coverage of the latest UNIX and GNU/Linux versions of awk, sed, and grep Shell programming for sysadmins: walks you through key UNIX and Linux system shell scripts Completely updated: Shell programming fundamentals: what shells are, what they do, how they work Choosing the right shell for any application Nearly 50,000 UNIX/Linux sysadmins, developers, and power users have used previous editions of UNIX Shells by Example to become expert shell programmers. With UNIX Shells by Example, Fourth Edition, you can, too-even if you're completely new to shell programming. Then, once you're an expert, you'll turn to this book constantly as the best source for reliable answers, solutions, and code. About the CD-ROM Comprehensive shell programming code library: all source code and data files for this book's hundreds of example programs

قیمت نهایی

۴۹٬۰۰۰ تومان