Richard Blum9780470251287, 9780470386002, 047025128X
Table of contents :
Command Line and Shell Scripting Bible……Page 0
About the Author……Page 9
Credits……Page 10
Contents at a Glance……Page 12
Contents……Page 14
Acknowledgments……Page 28
How This Book Is Organized……Page 30
Where to Go from Here……Page 33
Part I: The Linux Command Line……Page 34
What Is Linux?……Page 36
Linux Distributions……Page 53
Summary……Page 57
Terminal Emulation……Page 58
The terminfo Database……Page 64
The Linux Console……Page 68
The xterm Terminal……Page 69
The Konsole Terminal……Page 78
The GNOME Terminal……Page 85
Summary……Page 91
Starting the Shell……Page 92
The Shell Prompt……Page 93
The bash Manual……Page 96
Filesystem Navigation……Page 97
File and Directory Listing……Page 102
File Handling……Page 108
Directory Handling……Page 115
Viewing File Contents……Page 116
Summary……Page 123
Monitoring Programs……Page 124
Monitoring Disk Space……Page 137
Working with Data Files……Page 143
Summary……Page 154
What Are Environment Variables?……Page 156
Setting Environment Variables……Page 160
Removing Environment Variables……Page 162
Default Shell Environment Variables……Page 163
Setting the PATH Environment Variable……Page 167
Locating System Environment Variables……Page 168
Variable Arrays……Page 175
Using Command Aliases……Page 176
Summary……Page 177
Linux Security……Page 180
Using Linux Groups……Page 190
Decoding File Permissions……Page 193
Changing Security Settings……Page 196
Sharing Files……Page 199
Summary……Page 201
The vim Editor……Page 204
The emacs Editor……Page 209
The KDE Family of Editors……Page 216
The GNOME Editor……Page 224
Summary……Page 230
Part II: Shell Scripting Basics……Page 232
Using Multiple Commands……Page 234
Creating a Script File……Page 235
Displaying Messages……Page 237
Using Variables……Page 239
Redirecting Input and Output……Page 243
Pipes……Page 246
Performing Math……Page 249
Exiting the Script……Page 256
Summary……Page 259
Working with the if-then Statement……Page 262
Nesting ifs……Page 265
The test Command……Page 266
Compound Condition Testing……Page 282
Advanced if-then Features……Page 283
The case Command……Page 285
Summary……Page 286
The for Command……Page 288
The C-Style for Command……Page 297
The while Command……Page 299
The until Command……Page 302
Nesting Loops……Page 304
Looping on File Data……Page 306
Controlling the Loop……Page 307
Processing the Output of a Loop……Page 314
Summary……Page 315
Command Line Parameters……Page 318
Special Parameter Variables……Page 323
Being Shifty……Page 326
Working With Options……Page 328
Standardizing Options……Page 337
Getting User Input……Page 338
Summary……Page 343
Understanding Input and Output……Page 346
Redirecting Output in Scripts……Page 351
Redirecting Input in Scripts……Page 353
Creating Your Own Redirection……Page 354
Listing Open File Descriptors……Page 359
Using Temporary Files……Page 361
Logging Messages……Page 365
Summary……Page 366
Handling Signals……Page 368
Running Scripts in Background Mode……Page 374
Running Scripts without a Console……Page 376
Job Control……Page 377
Being Nice……Page 381
Running Like Clockwork……Page 382
Start At the Beginning……Page 388
Summary……Page 391
Part III: Advanced Shell Scripting……Page 394
Basic Script Functions……Page 396
Returning a Value……Page 399
Using Variables in Functions……Page 402
Array Variables and Functions……Page 408
Function Recursion……Page 410
Creating a Library……Page 412
Using Functions on the Command Line……Page 414
Summary……Page 417
Creating Text Menus……Page 418
Adding Color……Page 424
Doing Windows……Page 430
Getting Graphic……Page 442
Summary……Page 450
Text Manipulation……Page 452
The sed Editor Basics……Page 463
Summary……Page 478
What Are Regular Expressions?……Page 480
Defining BRE Patterns……Page 482
Extended Regular Expressions……Page 494
Regular Expressions in Action……Page 499
Summary……Page 504
Multiline Commands……Page 506
The Hold Space……Page 512
Negating a Command……Page 514
Changing the Flow……Page 517
Pattern Replacement……Page 520
Using sed in Scripts……Page 522
Creating sed Utilities……Page 524
Summary……Page 532
Using Variables……Page 534
Working with Arrays……Page 543
Using Patterns……Page 545
Structured Commands……Page 547
Formatted Printing……Page 552
Built-in Functions……Page 555
User-Defined Functions……Page 560
Summary……Page 562
Part IV: Alternative Linux Shells……Page 564
What Is the ash Shell?……Page 566
The Original ash Shell……Page 567
The dash Shell……Page 573
Scripting in dash……Page 582
Summary……Page 588
What Is the tcsh Shell?……Page 590
The tcsh Shell Components……Page 591
Scripting in tcsh……Page 610
Summary……Page 617
The Korn Shell History……Page 620
The Parts of the ksh93 Shell……Page 621
Scripting in the ksh93 Shell……Page 635
Summary……Page 642
History of the zsh Shell……Page 644
Parts of the zsh Shell……Page 645
Scripting with zsh……Page 664
Summary……Page 669
Part V: Advanced Topics……Page 670
The MySQL Database……Page 672
The PostgreSQL Database……Page 684
Working with Tables……Page 692
Using the Database in Your Scripts……Page 697
Summary……Page 704
The Lynx Program……Page 706
The cURL Program……Page 720
Networking with zsh……Page 727
Summary……Page 732
The Basics of Linux E-Mail……Page 734
Setting Up Your Server……Page 741
Sending a Message with Mailx……Page 750
The Mutt Program……Page 753
Summary……Page 756
Monitoring System Statistics……Page 758
Performing Backups……Page 772
Summary……Page 779
Bash Commands……Page 782
Environment Variables……Page 786
The sed Editor……Page 792
The gawk program……Page 797
Variables……Page 804
Structured Commands……Page 806
Mathematical Operations……Page 808
Index……Page 810
Reviews
There are no reviews yet.