Linux Command Line and Shell Scripting Bible
close menu
Bookswagon
search
My Account
Book 1
Book 2
Book 3
Book 1
Book 2
Book 3
Book 1
Book 2
Book 3
Book 1
Book 2
Book 3
Home > Computing and Information Technology Books > Operating systems > Open source and other operating systems > Linux > Linux Command Line and Shell Scripting Bible: (Bible)
Linux Command Line and Shell Scripting Bible: (Bible)

Linux Command Line and Shell Scripting Bible: (Bible)


     0     
5
4
3
2
1



Out of Stock


Notify me when this book is in stock
X
About the Book

Talk directly to your system for a faster workflow with automation capability

Linux Command Line and Shell Scripting Bible is your essential Linux guide. With detailed instruction and abundant examples, this book teaches you how to bypass the graphical interface and communicate directly with your computer, saving time and expanding capability. This third edition incorporates thirty pages of new functional examples that are fully updated to align with the latest Linux features. Beginning with command line fundamentals, the book moves into shell scripting and shows you the practical application of commands in automating frequently performed functions. This guide includes useful tutorials, and a desk reference value of numerous examples.

The Linux command line allows you to type specific shell commands directly into the system to manipulate files and query system resources. Command line statements can be combined into short programs called shell scripts, a practice increasing in popularity due to its usefulness in automation. This book is a complete guide providing detailed instruction and expert advice working within this aspect of Linux.

  • Write simple script utilities to automate tasks
  • Understand the shell, and create shell scripts
  • Produce database, e-mail, and web scripts
  • Study scripting examples ranging from basic to advanced

Whether used as a tutorial or as a quick reference, this book contains information that every Linux user should know. Why not learn to use the system to its utmost capability? Linux is a robust system with tremendous potential, and Linux Command Line and Shell Scripting Bible opens the door to new possibilities.



Table of Contents:
Introduction xxxi

Part I: The Linux Command Line 1

Chapter 1: Starting with Linux Shells 3

What Is Linux? 3

Looking into the Linux kernel 4

The GNU utilities 9

The Linux desktop environment 11

Linux Distributions 17

Summary 21

Chapter 2: Getting to the Shell 23

Reaching the Command Line 23

Accessing CLI via a Linux Console Terminal 25

Accessing CLI via Graphical Terminal Emulation 28

Using the GNOME Terminal Emulator 29

Using the Konsole Terminal Emulator 35

Using the xterm Terminal Emulator 41

Summary 44

Chapter 3: Basic bash Shell Commands 47

Starting the Shell 47

Using the Shell Prompt 48

Interacting with the bash Manual 49

Navigating the Filesystem 52

Listing Files and Directories 59

Handling Files 64

Managing Directories 73

Viewing File Contents 77

Viewing parts of a file 81

Summary 83

Chapter 4: More bash Shell Commands 85

Monitoring Programs 85

Monitoring Disk Space 96

Working with Data Files 102

Summary 111

Chapter 5: Understanding the Shell 113

Exploring Shell Types 113

Exploring Parent and Child Shell Relationships 115

Understanding Shell Built-In Commands 125

Summary 132

Chapter 6: Using Linux Environment Variables 135

Exploring Environment Variables 135

Setting User-Defined Variables 138

Removing Environment Variables 142

Uncovering Default Shell Environment Variables 143

Setting the PATH Environment Variable 148

Locating System Environment Variables 150

Learning about Variable Arrays 158

Summary 159

Chapter 7: Understanding Linux File Permissions 161

Linux Security 161

Using Linux Groups 172

Decoding File Permissions 175

Changing Security Settings 179

Sharing Files 182

Summary 184

Chapter 8: Managing Filesystems 187

Exploring Linux Filesystems 187

Understanding the copy-on-write filesystems 192

Working with Filesystems 192

Managing Logical Volumes 200

Summary 210

Chapter 9: Installing Software 211

Package Management Primer 211

The Debian-Based Systems 212

The Red Hat–Based Systems 221

Installing from Source Code 228

Summary 232

Chapter 10: Working with Editors 233

Visiting the vim Editor 233

Navigating the nano Editor 240

Exploring the emacs Editor 242

Exploring the KDE Family of Editors 251

Exploring the GNOME Editor 260

Summary 265

Part II: Shell Scripting Basics 267

Chapter 11: Basic Script Building 269

Using Multiple Commands 269

Creating a Script File 270

Displaying Messages 272

Using Variables 274

Redirecting Input and Output 279

Pipes 281

Performing Math 285

Exiting the Script 292

Summary 295

Chapter 12: Using Structured Commands 297

Working with the if-then Statement 297

Exploring the if-then-else Statement 300

Nesting ifs 301

Trying the test Command 304

Considering Compound Testing 324

Working with Advanced if-then Features 325

Considering the case Command 327

Summary 329

Chapter 13: More Structured Commands 331

The for Command 331

The C-Style for Command 341

The while Command 343

The until Command 346

Nesting Loops 347

Looping on File Data 350

Controlling the Loop 351

Processing the Output of a Loop 358

Practical Examples 359

Summary 362

Chapter 14: Handling User Input 365

Passing Parameters 365

Using Special Parameter Variables 371

Being Shifty 375

Working with Options 376

Standardizing Options 387

Getting User Input 388

Summary 392

Chapter 15: Presenting Data 395

Understanding Input and Output 395

Redirecting Output in Scripts 400

Redirecting Input in Scripts 402

Creating Your Own Redirection 403

Listing Open File Descriptors 408

Suppressing Command Output 410

Using Temporary Files 411

Logging Messages 414

Practical Example 416

Summary 418

Chapter 16: Script Control 419

Handling Signals 419

Running Scripts in Background Mode 427

Running Scripts without a Hang-Up 430

Controlling the Job 432

Being Nice 436

Running Like Clockwork 438

Summary 446

Part III: Advanced Shell Scripting 447

Chapter 17: Creating Functions 449

Basic Script Functions 449

Returning a Value 453

Using Variables in Functions 456

Array Variables and Functions 461

Function Recursion 464

Following a Practical Example 470

Summary 474

Chapter 18: Writing Scripts for Graphical Desktops 477

Creating Text Menus 477

Doing Windows 484

Getting Graphic 496

Summary 504

Chapter 19: Introducing sed and gawk 505

Manipulating Text 505

Getting to know the sed editor 505

Getting to know the gawk program 509

Commanding at the sed Editor Basics 516

Using addresses 518

Deleting lines 521

Inserting and appending text 523

Changing lines 525

Transforming characters 527

Printing revisited 527

Using files with sed 530

Summary 533

Chapter 20: Regular Expressions 535

What Are Regular Expressions? 535

Defining BRE Patterns 537

Plain text 537

Special characters 539

Anchor characters 540

Extended Regular Expressions 549

Regular Expressions in Action 554

Summary 560

Chapter 21: Advanced sed 561

Looking at Multiline Commands 561

Holding Space 567

Negating a Command 569

Changing the Flow 572

Replacing via a Pattern 575

Placing sed Commands in Scripts 577

Creating sed Utilities 579

Summary 588

Chapter 22: Advanced gawk 591

Using Variables 591

Working with Arrays 600

Using Patterns 602

Structured Commands 605

Formatted Printing 610

Built-In Functions 613

User-Defined Functions 617

Working through a Practical Example 620

Summary 621

Chapter 23: Working with Alternative Shells 623

What Is the dash Shell? 623

The dash Shell Features 624

The dash command line parameters 624

The dash environment variables 625

The dash built-in commands 628

Scripting in dash 629

Creating dash scripts 629

Things that don’t work 629

The zsh Shell 632

Parts of the zsh Shell 632

Shell options 632

Built-in commands 633

Scripting with zsh 638

Mathematical operations 639

Structured commands 640

Functions 641

Summary 642

Part IV: Creating Practical Scripts 643

Chapter 24 Writing Simple Script Utilities 645

Performing Archives 645

Archiving data files 645

Managing User Accounts 656

Obtaining the required functions 657

Creating the script 665

Running the script 671

Monitoring Disk Space 673

Obtaining the required functions 673

Creating the script 676

Running the script 677

Summary 678

Chapter 25: Producing Scripts for Database, Web, and E-Mail 681

Using a MySQL Database 681

Using MySQL 682

Using the database in your scripts 692

Using the Web 697

Installing Lynx 698

The lynx command line 699

The Lynx configuration file 700

Capturing data from Lynx 701

Using E-Mail 704

Summary 708

Chapter 26: Creating Fun Little Shell Scripts 709

Sending a Message 709

Understanding the required functions 709

Creating the script 712

Obtaining a Quote 720

Understanding the required functions 720

Creating the script 724

Generating an Excuse 731

Understanding the required functions 732

Creating the script 735

Summary 737

Appendix A: Quick Guide to bash Commands 739

Appendix B: Quick Guide to sed and gawk 751

Index 763



About the Author :

Richard Blum, LPIC-1, is a 20-year IT industry veteran, as both systems and network administrator for UNIX, Linux, Novell, and Microsoft servers. Rich is widely published on Linux and open source software, and is an online Linux instructor for universities nationwide.

Christine Bresnahan, LPIC-1, started working with computers more than 25 years ago in the IT industry as a system administrator. Christine is an Adjunct Professor at Ivy Tech Community College. She teaches Linux Essentials, LPIC-1/CompTIA Linux+ certification, and Python programming classes. Christine produces educational material for use in the college classroom as well as book education resources.



Review :
“Comprehensive guide full of useful insight into the what, why, how, and when of scripting.” (MagPi, February 2016)


Best Sellers


Product Details
  • ISBN-13: 9781118984192
  • Publisher: John Wiley & Sons Inc
  • Publisher Imprint: John Wiley & Sons Inc
  • Edition: Revised edition
  • No of Pages: 816
  • ISBN-10: 1118984196
  • Publisher Date: 06 Jan 2015
  • Binding: Digital (delivered electronically)
  • Language: English
  • Series Title: Bible


Similar Products

Add Photo
Add Photo

Customer Reviews

REVIEWS      0     
Click Here To Be The First to Review this Product
Linux Command Line and Shell Scripting Bible: (Bible)
John Wiley & Sons Inc -
Linux Command Line and Shell Scripting Bible: (Bible)
Writing guidlines
We want to publish your review, so please:
  • keep your review on the product. Review's that defame author's character will be rejected.
  • Keep your review focused on the product.
  • Avoid writing about customer service. contact us instead if you have issue requiring immediate attention.
  • Refrain from mentioning competitors or the specific price you paid for the product.
  • Do not include any personally identifiable information, such as full names.

Linux Command Line and Shell Scripting Bible: (Bible)

Required fields are marked with *

Review Title*
Review
    Add Photo Add up to 6 photos
    Would you recommend this product to a friend?
    Tag this Book Read more
    Does your review contain spoilers?
    What type of reader best describes you?
    I agree to the terms & conditions
    You may receive emails regarding this submission. Any emails will include the ability to opt-out of future communications.

    CUSTOMER RATINGS AND REVIEWS AND QUESTIONS AND ANSWERS TERMS OF USE

    These Terms of Use govern your conduct associated with the Customer Ratings and Reviews and/or Questions and Answers service offered by Bookswagon (the "CRR Service").


    By submitting any content to Bookswagon, you guarantee that:
    • You are the sole author and owner of the intellectual property rights in the content;
    • All "moral rights" that you may have in such content have been voluntarily waived by you;
    • All content that you post is accurate;
    • You are at least 13 years old;
    • Use of the content you supply does not violate these Terms of Use and will not cause injury to any person or entity.
    You further agree that you may not submit any content:
    • That is known by you to be false, inaccurate or misleading;
    • That infringes any third party's copyright, patent, trademark, trade secret or other proprietary rights or rights of publicity or privacy;
    • That violates any law, statute, ordinance or regulation (including, but not limited to, those governing, consumer protection, unfair competition, anti-discrimination or false advertising);
    • That is, or may reasonably be considered to be, defamatory, libelous, hateful, racially or religiously biased or offensive, unlawfully threatening or unlawfully harassing to any individual, partnership or corporation;
    • For which you were compensated or granted any consideration by any unapproved third party;
    • That includes any information that references other websites, addresses, email addresses, contact information or phone numbers;
    • That contains any computer viruses, worms or other potentially damaging computer programs or files.
    You agree to indemnify and hold Bookswagon (and its officers, directors, agents, subsidiaries, joint ventures, employees and third-party service providers, including but not limited to Bazaarvoice, Inc.), harmless from all claims, demands, and damages (actual and consequential) of every kind and nature, known and unknown including reasonable attorneys' fees, arising out of a breach of your representations and warranties set forth above, or your violation of any law or the rights of a third party.


    For any content that you submit, you grant Bookswagon a perpetual, irrevocable, royalty-free, transferable right and license to use, copy, modify, delete in its entirety, adapt, publish, translate, create derivative works from and/or sell, transfer, and/or distribute such content and/or incorporate such content into any form, medium or technology throughout the world without compensation to you. Additionally,  Bookswagon may transfer or share any personal information that you submit with its third-party service providers, including but not limited to Bazaarvoice, Inc. in accordance with  Privacy Policy


    All content that you submit may be used at Bookswagon's sole discretion. Bookswagon reserves the right to change, condense, withhold publication, remove or delete any content on Bookswagon's website that Bookswagon deems, in its sole discretion, to violate the content guidelines or any other provision of these Terms of Use.  Bookswagon does not guarantee that you will have any recourse through Bookswagon to edit or delete any content you have submitted. Ratings and written comments are generally posted within two to four business days. However, Bookswagon reserves the right to remove or to refuse to post any submission to the extent authorized by law. You acknowledge that you, not Bookswagon, are responsible for the contents of your submission. None of the content that you submit shall be subject to any obligation of confidence on the part of Bookswagon, its agents, subsidiaries, affiliates, partners or third party service providers (including but not limited to Bazaarvoice, Inc.)and their respective directors, officers and employees.

    Accept


    Inspired by your browsing history


    Your review has been submitted!

    You've already reviewed this product!