Mastering Unix Shell Scripting: BASH, KORN Shell, and KORN 93 Shell Scripting for Programmers, System Administrators and UNIX Guru’s, Second Edition | by Randall K. Michael | ISBN: 9780470183014. IT Books.
Mastering Unix Shell Scripting: BASH, KORN Shell, and KORN 93 Shell Scripting for Programmers, System Administrators and UNIX Guru’s, Second Edition
by Randall K. Michael
ISBN:9780470183014
Guiding you through every detail of writing shell scripts to automate specific tasks, this book will help you build tools that monitor for specific system events and situations, and gain the skills to solve real-world system administration problems.
Get this PDF EBook by clicking below:![]() |
Mastering Unix Shell Scripting—BASH, KORN Shell, and KORN 93 Shell Scripting for Programmers, System Administrators and UNIX Guru’s, Second Edition
Introduction
Overview
Overview of the Book and Technology
How This Book Is Organized
Who Should Read this Book
Tools You Will Need
What’s on the Web Site
Summary
Part I – The Basics of Shell Scripting
Chapter 1 – Scripting Quick Start and Review
Case Sensitivity
UNIX Special Characters
Shells
Shell Scripts
Functions
Running a Shell Script
Comments and Style in Shell Scripts
Control Structures
Using break, continue, exit, and return
Here Document
Shell Script Commands
Symbol Commands
Variables
Command-Line Arguments
shift Command
Special Parameters $* and $@
Double Quotes, Forward Tics, and Back Tics
Using awk on Solaris
Using the echo Command Correctly
Math in a Shell Script
Built-In Mathematical Functions
File Permissions, suid and sgid Programs
Running Commands on a Remote Host
Setting Traps
User-Information Commands
ps Command
Communicating with Users
Uppercase or Lowercase Text for Easy Testing
Check the Return Code
Time-Based Script Execution
Output Control
Catching a Delayed Command Output
Fastest Ways to Process a File Line-by-Line
Using Command Output in a Loop
Mail Notification Techniques
Creating a Progress Indicator
Working with Record Files
Creating a Pseudo-Random Number
Checking for Stale Disk Partitions in AIX
Automated Host Pinging
Highlighting Specific Text in a File
Keeping the Printers Printing
Automated FTP File Transfer
Using rsync to Replicate Data
Capturing a List of Files Larger than $MEG
Capturing a User’s Keystrokes
Using the bc Utility for Floating-Point Math
Number Base Conversions
Create a Menu with the select Command
Removing Repeated Lines in a File
Removing Blank Lines from a File
Testing for a Null Variable
Directly Access the Value of the Last Positional Parameter, $#
Remove the Column Headings in a Command Output
Arrays
Testing a String
Summary
Chapter 2 – 24 Ways to Process a File Line-by-Line
Command Syntax
24 Methods to Parse a File Line-by-Line
Timing Each Method
What about Using Command Input Instead of File Input?
Summary
Lab Assignments
Chapter 3 – Automated Event Notification
Basics of Automating Event Notification
Problems with Outbound Mail
Dial-Out Modem Software
SNMP Traps
Summary
Lab Assignments
Chapter 4 – Progress Indicators Using a Series of Dots, a Rotating Line, or Elapsed Time
Overview
Indicating Progress with a Series of Dots
Indicating Progress with a Rotating Line
Indicating Progress with Elapsed Time
Combining Feedback Methods
Other Options to Consider
Summary
Lab Assignments
Part II – Scripts for Programmers, Testers, and Analysts
Chapter 5 – Working with Record Files
What Is a Record File?
Processing the Record Files
Tasks for Records and Record Files
The Merge Process
Putting It All Together
Other Things to Consider
Summary
Lab Assignments
Chapter 6 – Automated FTP Stuff
Syntax
Automating File Transfers and Remote Directorys
What about Encryption?
Other Things to Consider
Summary
Lab Assignments
Chapter 7 – Using rsync to Efficiently Replicate Data
Syntax
Generic rsync Shell Script
Replicating Multiple Directories with rsync
Replicating Multiple Filesystems with rsync
Replicating an Oracle Database with rsync
rsync Copy Shell Script
Summary
Lab Assignments
Chapter 8 – Automating Interactive Programs with Expect and Autoexpect
Downloading and Installing Expect
The Basics of Talking to an Interactive Script or Program
Using autoexpect to Automatically Create an Expect Script
Working with Variables
What about Conditional Tests?
Using Expect Scripts with Sun Blade Chassis and JumpStart
Summary
Lab Assignments
Chapter 9 – Finding Large Files and Files of a Specific Type
Overview
Syntax
Remember That File and Directory Permissions Thing
Don’t Be Shocked by the Size of the Files
Creating the Script
Other Options to Consider
Summary
Lab Assignments
Chapter 10 – Process Monitoring and Enabling Pre-Processing, Startup, and Post-Processing Events
Overview
Syntax
Monitoring for a Process to Start
Monitoring for a Process to End
Monitor and Log as a Process Starts and Stops
Timed Execution for Process Monitoring, Showing Each PID, and Timestamp with Event and Timing Capability
Other Options to Consider
Summary
Lab Assignments
Chapter 11 – Pseudo-Random Number and Data Generation
What Makes a Random Number?
The Methods
Shell Script to Create Pseudo-Random Numbers
Creating Unique Filenames
Creating a File Filled with Random Characters
Other Things to Consider
Summary
Lab Assignments
Chapter 12 – Creating Pseudo-Random Passwords
Randomness
Creating Pseudo-Random Passwords
Syntax
Building the Password-Creation Script
Other Options to Consider
Summary
Lab Assignments
Chapter 13 – Floating-Point Math and the bc Utility
Syntax
Creating Some Shell Scripts Using bc
Other Options to Consider
Summary
Lab Assignments
Chapter 14 – Number Base Conversions
Syntax
Scripting the Solution
An Easy, Interactive Script to Convert Between Bases
Using the bc Utility for Number Base Conversions
Other Options to Consider
Summary
Lab Assignments
Chapter 15 – hgrep: Highlighted grep Script
Overview
Reverse Video Control
Building the hgrep.bash Shell Script
Other Options to Consider
Summary
Lab Assignments
Chapter 16 – Monitoring Processes and Applications
Monitoring Local Processes
Remote Monitoring with Secure Shell and Remote Shell
What about Waiting for Something to Complete Executing?
Other Things to Consider
Summary
Lab Assignments
Part III – Scripts for Systems Administrators
Chapter 17 – Filesystem Monitoring
Syntax
Adding Exceptions Capability to Monitoring
Using the MB-of-Free-Space Method
Using MB of Free Space with Exceptions
Percentage Used—MB Free and Large Filesystems
Running Filesystem Scripts on AIX, Linux, HP-UX, OpenBSD, and Solaris
Other Options to Consider
Summary
Lab Assignments
Chapter 18 – Monitoring Paging and Swap Space
Overview
Syntax
Creating the Shell Scripts
Other Options to Consider
Summary
Lab Assignments
Chapter 19 – Monitoring System Load
Overview
Installing the System-Statistics Programs in Linux
Syntax
Scripting the Solutions
Other Options to Consider
Summary
Lab Assignments
Chapter 20 – Monitoring for Stale Disk Partitions (AIX-Specific)
Overview
AIX Logical Volume Manager (LVM)
The Commands and Methods
Other Options to Consider
Summary
Lab Assignment
Chapter 21 – Turning On/Off SSA Identification Lights
Syntax
The Scripting Process
Other Things to Consider
Summary
Lab Assignment
Chapter 22 – Automated Hosts Pinging with Notification of Failure
Syntax
Creating the Shell Script
Other Options to Consider
Summary
Lab Assignments
Chapter 23 – Creating a System-Configuration Snapshot
Overview
Syntax
Creating the Shell Script
Other Options to Consider
Summary
Lab Assignment
Chapter 24 – Compiling, Installing, Configuring, and Using sudo
The Need for sudo
Configuring sudo on Solaris
Downloading and Compiling sudo
Compiling sudo
Configuring sudo
Using sudo
Using sudo in a Shell Script
Logging to the syslog with sudo
The sudo Log File
Summary
Lab Assignments
Chapter 25 – Print-Queue Hell: Keeping the Printers Printing
System V versus BSD versus CUPS Printer Systems
Putting It All Together
Other Options to Consider
Summary
Lab Assignments
Chapter 26 – Those Pesky Sarbanes-Oxley (SOX) Audits
What to Expect
How to Work with the Auditors
What the Auditors Want to See
Some Handy Commands
Using the dirname and basename Commands
Other Things to Consider
Summary
Lab Assignments
Chapter 27 – Using Dirvish with rsync to Create Snapshot-Type Backups
Overview
How Does Dirvish Work?
Configuring Dirvish
Performing a Full System Backup
Using Dirvish on the Command Line
A Menu-Interface Shell Script to Control Dirvish
Putting It All Together
Using the dirvish_ctrl Shell Script
Other Things to Consider
Summary
Lab Assignments
Chapter 28 – Monitoring and Auditing User Keystrokes
Syntax
Scripting the Solution
Other Options to Consider
Summary
Lab Assignments
A Closing Note from the Author
Appendix A – What’s on the Web Site
Shell Scripts
Functions
For 1000+ more Computer EBooks & Operating Systems Books, click below:



Related posts:
- Jump into JMP Scripting | by Wendy Murphrey and Rosemary Lucas | 2009 | ISBN: 9781599946580. Discount Computer Bookwares. Essential Scripting Language for IT Professionals. Free Downloads for Books Purchase.
- Programming Language Pragmatics, Third Edition | by Michael L. Scott | 2009 | ISBN: 9780123745149. Core Issues in Programming Language Design. Functional Languages. Logic Languages. Prolog Logic Programming. Concurrent Programming Fundamentals. Scripting Languages. How to Build a Runnable Program.
- Windows PowerShell 2.0 Best Practices | by Ed Wilson | 2010 | ISBN: 9780735626461. How to Avoid Scripting Pitfalls. How to Configure the Script Environment. Using the Set-PSDebug cmdlet to Troubleshoot Scripts.
- Merge Ahead: Mastering the Five Enduring Trends of Artful M&A | by Gerald Adolph, Justin Pettit and Michael Sisk | 2009 | ISBN: 9780071508322. Private Equity and Sovereign Wealth. Crafting the Successful Merger & Acquisitons Deal. A Global Role for Financial Buyers
- Grow from Within: Mastering Corporate Entrepreneurship and Innovation | by Robert Wolcott and Michael Lippitz | 2010 | ISBN: 9780071598323. Four Models of Corporate Entrepreneurship. Corporate Entrepreneurship Program Leadership. How to Develop Innovative Concepts
- Marketing Through Search Optimization: How People Search and How to Be Found on the Web | by Alex Michael and Ben Salter | ISBN: 9780750683470. SEO Books. SEM Books. Search Engine Optimization. Building Links to Improve Your Search Engine Ranking.
- Managing Across Cultures: The Seven Keys to Doing Business with a Global Mindset | by Charlene M. Solomon and Michael S. Schell | 2009 | ISBN: 9780071605854. Cultural Management Books. How to Develop Your Cultural Skills
- Architecting Secure Software Systems | by Asoke K. Talukder and Manish Chaitanya | 2009 | ISBN: 9781420087840. How to Construct Secured and Safe C/UNIX Programs. How to Construct Secured Web Services. ASP.NET Security. Java Security.
- Designing Successful e-Learning: Forget What You Know about Instructional Design and Do Something Interesting, Michael Allen’s e-Learning Library | by Michael W. Allen | ISBN: 9780787982997. Education versus Training. Characteristics of Successful Instructional Designs.
- Ready, Fire, Aim: Zero to $100 Million in No Time Flat | by Michael Masterson | ISBN: 9780470182024. Money Guide Book. Investment Books. Entrepreneur Problems, Challenges, and Opportunities.
- The CSSLP Prep Guide: Mastering the Certified Secure Software Lifecycle Professional | by Ronald L. Krutz and Alexander J. Fry | 2009 | ISBN: 9780470461907. Software Engineering Books. Security Design Principles. Software Development Methodologies. Standards for Software Quality Assurance
- A Guide to Financial Reporting: Business Combinations with SFAS 141 R, 157, and 160 | by Michael J. Mard, Steven D. Hyden and Edward W. Trott | 2009 | ISBN: 9780470497555. Finance Books. Valuation of Intangible Assets
- Materials Selection in Mechanical Design, Third Edition | by Michael F. Ashby | ISBN: 9780750661683. Materials Science Books. Engineering Materials. Material Property Charts. Designing Hybrid Materials
- The Handbook of High Performance Virtual Teams: A Toolkit for Collaborating Across Boundaries | by Jill Nemiro, Michael Beyerlein, Lori Bradley and Susan Beyerlein (eds) | ISBN: 9780470176429. Performance Management Books.
- Computer and Information Security Handbook | by John R. Vacca (ed) | 2009 | ISBN: 9780123743541. System and Network Security. TEN STEPS TO BUILDING A SECURE ORGANIZATION. Unix and Linux Security. Internet Security. Information Technology Security Management. Security Management Systems. Computer Forensics
- Performance Management Books. Developing Exemplary Performance One Person at a Time | by Michael Sabbag | 2009 | ISBN: 9780891062493. Principles of the Exemplary Performance Model. Tools to Develop an Expandable Strength
- Toyota Culture: The Heart and Soul of the Toyota Way | by Jeffrey K. Liker, Michael Hoseus,The Center for Quality People and Organizations | ISBN: 9780071492171. HR Management Books. The Challenges of Changing Organizational Culture. The Human Systems Model. Workforce Management
- Classical Mechanics | by J. Michael Finn | ISBN: 9781934015322. Mechanical Engineering Books. Newtonian Particle Mechanics. Central Force Motion. Rotational Geometry and Kinematics. RELATIVISTIC PARTICLE DYNAMICS. Lagrangian and Hamiltonian Dynamics
- A Beginner’s Guide to Charting Financial Markets: A Practical Introduction to Technical Analysis for Investors | by Michael Kahn | ISBN: 9781905641215. Investment Books. Investor Guide to Financial Analysis. How to Read A Financial Chart. Styles of Market Analysis
- Health Insurance | by Michael A. Morrisey | ISBN: 9781567932829. Insurance Books. Insurance Providers. Long-Term Care Insurance. Private Health Care Insurance. Consumer-Driven Health Plans. Hospital Insurance Coverage. Prescription Drug Coverage
- Practical Poser 8: The Official Guide | by Richard Schrand | 2011 | ISBN: 9781584506973. Mastering Lights and Shadows. How to Create Custom Faces. How to Create Custom Morphs. UVMapper Professional. Animation Techniques.
- Cubase 5 Power!: The Comprehensive Guide | by Robert Guérin and Michael Miller | 2010 | ISBN: 9781435455115. Digital Audio Recording. Setting Up a MIDI or Instrument Track. Virtual MIDI Keyboard. Converting MIDI to Audio Track.
- Glow: How You Can Radiate Energy, Innovation, and Success | by Lynda Gratton | 2009 | ISBN: 9781576757680. Create A Cooperative Mindset. Mastering The art of great Conversation.
- Game Programming with Silverlight | by Michael Snow | 2010 | ISBN: 9781598639063. How to Create a Silverlight Application Project. Silverlight Game Tips and Tricks. Silverlight’s Tools.
- Mastering the Complex Sale: How to Compete and Win When the Stakes are High!, Second Edition | by Jeff Thull | 2010 | ISBN: 9780470533116. How to Build a Value-Driven Sales Organization. Four Phases of Diagnostic Business Development
- Delivering Project Excellence with the Statement of Work, Second Edition | by Michael G. Martin | 2010 | ISBN: 9781567262575. Building The Work Breakdown Structure. How to Develop The SOW Framework.
- How to Be an Even Better Manager: A Complete A–Z of Proven Techniques & Essential Skills, Seventh Edition | by Michael Armstrong | ISBN: 9780749451639. DEVELOPING MANAGERIAL EFFECTIVENESS. How to Develop People. How to Manage Strategically.
- Scene of the Cybercrime, Second Edition | by Debra Littlejohn Shinder and Michael Cross | ISBN: 9781597492768. How to Combat Phreakers, Hackers, and Crackers. How to Collect and Preserve Digital Evidence. Computer Forensic Software and Hardware. Cybercrime Prevention Techniques.
- Mastering the Instructional Design Process: A Systematic Approach, Fourth Edition | by William J. Rothwell and H.C. Kazanas | ISBN: 9780787996468. How to Choose Instructional Strategy and Tactics. How to Design the Instructional Management System
- Financial Management of Health Care Organizations: An Introduction to Fundamental Tools, Concepts and Applications, Third Edition | by William N. Zelman, Michael J. McCue and Noah D. Glick | 2009 | ISBN: 9780470497524.
- Mastering Financial Accounting Essentials: The Critical Nuts and Bolts | by Stuart A. McCrary | 2010 | ISBN: 9780470393321. ACCRUAL BASIS ACCOUNTING. Financial Statement Analysis. AN INTUITIVE WAY TO TRACK CASH.
- Mastering Communication at Work: How to Lead, Manage, and Influence | by Ethan F. Becker and Jon Wortmann | ISBN: 9780071625029. Speak to Motivate. How to Give Effective Direct Criticism. Methods of Developing Effective Communicators
- Ciso Soft Skills: Securing Organizations Impaired by Employee Politics, Apathy, and Intolerant Perspectives | by Ron Collette, Michael Gentile and Skye Gentile | 2009 | ISBN: 9781420089103. True Security Model. Security Consultant Guide.
- The Marketing Accountability Imperative: Driving Superior Returns on Marketing Investments | by Michael Dunn and Chris Halsall | 2009 | ISBN: 9780787998325. SIX CRITICAL VALUE LEVERS FOR IMPROVING MARKETING PERFORMANCE.
- Human Capital Management: Achieving Added Value through People | by Angela Baron and Michael Armstrong | ISBN: 9780749453848. HUMAN CAPITAL ADVANTAGE AND RESOURCE-BASED STRATEGY. HCM Toolkit. HCM SKILLS OF HR SPECIALISTS
- The Little Black Book of Project Management, Third Edition | by Michael C. Thomsett | 2010 | ISBN: 9780814415290. Best Project Management Software. The Successful Project Manager. Business Process Management (BPM). Attributes of Project Leadership. Automated Project Management Systems
- Winning with Futures: The Smart Way to Recognize Opportunities, Calculate Risk, and Maximize Profits | by Michael C. Thomsett | 2009 | ISBN: 9780814409879. Futures Contracts on Energy. Interest Rate Futures. Currency Futures. Index Futures.
- Mastering Corporate Finance Essentials: The Critical Quantitative Methods and Tools in Finance | by Stuart A. McCrary | 2010 | ISBN: 9780470393338. Time Value of Money Toolbox. Statistics for Finance. CAPITAL ASSET PRICING MODEL. Capital Budgeting Tools
- Advances in Multiuser Detection | by Michael L. Honig (ed) | 2009 | ISBN: 9780471779711. Interference Avoidance for CDMA Systems. Joint Detection for Multi-Antenna Channels. STATISTICAL PHYSICS AND THE REPLICA METHOD.
- Seven Steps to Mastering Business Analysis | by Barbara A. Carkenord | 2009 | ISBN: 9781604270075. BUSINESS ANALYSIS CERTIFICATION. IIBA BABOK. Business Analysts Resources Guide. TIPS FOR LEARNING YOUR BUSINESS. New Analysis Techniques.
Comments
One Comment on Mastering Unix Shell Scripting: BASH, KORN Shell, and KORN 93 Shell Scripting for Programmers, System Administrators and UNIX Guru’s, Second Edition | by Randall K. Michael | ISBN: 9780470183014. IT Books.
-
Mastering Unix Shell Scripting: BASH, KORN Shell, and KORN 93 … Scripts Rss on
Sun, 22nd Nov 2009 4:54 am
[...] the original here: Mastering Unix Shell Scripting: BASH, KORN Shell, and KORN 93 … By admin | category: scripting | tags: bash, korn, mastering-unix, programmers, scripting, [...]
Tell me what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!
You must be logged in to post a comment.





