Top list




Products   » English Books » Computer & Internet » Product

Linux Shell Scripting with Bash by Ken Burtch

Linux Shell Scripting with Bash by Ken Burtch

Linux Shell Scripting

Linux Shell Scripting with Bash by Ken Burtch

Title:

Linux Shell Scripting with Bash

A comprehensive guide and reference for Linux users and administrators

Author:

Ken Burtch

Language:

English

Format

Print

ISBN-10:

0672326426

ISBN-13:

978-0672326424

Publisher:

Sams Publishing

Subject:

Shell/Linux Programming

Place of publication:

USA

Year Published:

2004

Edition:

First

Binding:

Paperback

Pages:

432

Dimensions (mm):

230 x 180 x 25 mm (9.1 x 7.1 x 1 inches)

Shipping Weight (g):

700 g (1.5 pounds)

Price (SEK):

130

Description:

A comprehensive guide and reference for Linux users and administrators

The only book available that covers the powerful Bash shell and associated tools that are essential to any Linux programming professional.

According to IDC, over 170,000 new servers were shipped in the first quarter of 2003. That also means that there were potentially more than 170,000 people like you charged with administering these systems without the proper knowledge or training to do so. Linux Shell Scripting with Bash will help you learn to not only get your system up and running quickly by employing the Bash shell, but it will also show you professional scripting solutions through the use of structured programming and standard Linux development tools. The book focuses on the Linux environment, which the shell relies on to function, and the robust Linux tool set, making this book ideal for learning shell scripting. Real-world scripts are included that are readable, extendable and easy to debug. This book is an asset to any Linux user.

What About Bash Scripting?

This book doesn't require much experience to get started; the reader must only be able to log into a Linux account and know how to edit a file. Burtch takes us from the simple to the sublime. His Bash scripting dissertation starts with files, file systems, directories, etc. in Chapter 1 and ends with local variables and shell functions in Chapter 14. The author's explanations are cognizant and extensive. He doesn't cover script basics until Chapter 4, and the while, if, and case statements aren't introduced until Chapter 7.

At the end of each chapter, the author includes a reference section summarizing the commands presented in that particular chapter. For the beginner, the reference section should reinforce learning, but it's not a replacement for the MAN pages.

What Can You Do with the Shell?

The balance of the book presents examples of what you can do with the shell. The author describes controlling source code with CVS (Concurrent Version System), creating MAN pages, and creating shell archives. Burtch also teaches how to write scripts that use the CGI (Common Gateway Interface) and the PostgreSQL and MySQL databases. He even shows us how to call Bash shell scripts from a "C" program.

Contents:

1. The Linux Environment.

The Origin of Linux. Files and File Systems. Directories. Inodes and Links. Pipe and Socket Files. Device Files.

7

2. Operating the Shell.

Bash Keywords. Command Basics. Command-Line Editing. Variable Assignments and Displaying Messages. Multiple Commands. Command History. Directory Commands. Specialized Navigation and History. The Colon Command. Reference Section.

13

3. Files, Users, and Shell Customization.

Listing Files. printf Command. Getting Help. Fixing the Display. Working with Files. Working with People. Shell Aliases. The Bash Hash Table. Customizing Your Prompt. Long Command Lines. Customizing Command-Line Editing. Your Session Profile. Reference Section.

27

4. Script Basics.

Creating a Script. Creating a Well-Behaved Script. The Header. Global Declarations. Sanity Checks. The Main Script. Cleanup. Stopping a Script. Reading Keyboard Input. Basic Redirection. Standard Output, Error, and Input. Built-In Versus Linux Commands. The Set and Shopt Commands. Reference Section.

51

5. Variables.

Variable Basics. Predefined Variables. The Effect of Quotations. Variable Attributes. Arrays. Exporting Variables and the Linux Environment. The eval Command. story.bash: A Story Generator. Reference Section.

67

6. Expressions.

Expansions. The Basic if Command. File Expressions. Multiple Tests. Strings. Arithmetic Expressions. Logical Expressions. Relational Operations. Bitwise Operations. Self-Referential Operations. Other let Features. temperature.bash: Converting Fahrenheit to Celsius. Arithmetic Tests. Pattern Recognition. Globbing Options. Filename Brace Expansion ( {..} ). Dollar Sign Substitutions. Arithmetic Expression Substitution ( ((..)) ). mixer.bash: HTML Color Mixer. Reference Section.

87

7. Compound Commands.

Command Status Codes. if Command. case Command. while Loop. until Loop. for Loops. Embedded let ( ((..)) ). Grouping Commands ( {..} ). report.bash: Report Formatter.

115

8. Debugging and Version Control.

Shell Debugging Features. Debug Traps. Version Control (CVS). Creating Transcripts. Watching Running Scripts. Timing Execution with Time. Creating Man Pages. Source Code Patches. Shell Archives. Reference Section.

125

9. Parameters and Subshells.

Positional Parameters. The getopts Command. The getopt Command. Subshells. Reference Section.

145

10. Job Control and Signals.

Job Control. Signals. The suspend Command. Traps. Exit Handlers. The killall Command. Being Nice. Process Status. Reference Section.

157

11. Text File Basics.

Working with Pathnames. File Truncation. Identifying Files. Creating and Deleting Files. Moving and Copying Files. More Information about Files. Transferring Files

169

12. Text File Processing

207

13. Console Scripting

233

14. Functions and Script Execution

249

15. Shell Security

267

16. Network Programming

281

17. Data Structures and Databases

301

18. Final Topics

319

A A Complete Example

B Summary of Bash Built-In Commands

C Bash Options

D Error Codes

E Signals

F ASCII Table

337

355

357

361

365

367

Glossary

371

Index

375

About the Author:

Ken Burtch graduated with a Computer Science first class honors degree from Brock University in St. Catharines, Canada and did his Masters work at Queen's University in Kingston, Canada. He has been using Linux since version 0.97, at a time before Linux was popular. He is the founder of PegaSoft Canada (http://www.pegasoft.ca), an association that promotes Linux advocacy, education, and development in southern Ontario. He has worked with a number of companies, including Mackenzie Financial Corporation, one of Canada's largest mutual fund companies. Ken is an active member of the Writers' Circle of Durham Region and his award-winning short story, "Distance," was recently published in the Signatures anthology.


Partno: Description: Price: Qty:
112043 Linux Shell Scripting with Bash by Ken Burtch 138,00 SEK/st

Back

right