Microsoft Windows Shell Script Programming for the Absolute Beginner

by
Edition: CD
Format: Paperback
Pub. Date: 2003-10-16
Publisher(s): Cengage Learning Ptr
  • Free Shipping Icon

    Free Shipping On Orders Over $35

    Your order must be $35 or more to qualify for free economy shipping. Marketplace items, eBooks and apparel do not qualify towards the $35 purchase minimum.

List Price: $29.99

Rent Book

Select for Price
There was a problem. Please try again later.

New Book

We're Sorry
Sold Out

Used Book

We're Sorry
Sold Out

eBook

We're Sorry
Not Available

How Marketplace Works:

  • This item is offered by an independent seller and not shipped from our warehouse
  • Item details like edition and cover design may differ from our description; see seller's comments before ordering.
  • Sellers much confirm and ship within two business days; otherwise, the order will be cancelled and refunded.
  • Marketplace purchases cannot be returned to eCampus.com. Contact the seller directly for inquiries; if no response within two days, contact customer service.
  • Additional shipping costs apply to Marketplace purchases. Review shipping costs at checkout.

Summary

If you are new to programming with Windows Shell Script and are looking for a solid introduction, this is the book for you. Developed by computer science instructors, books in the for the absolute beginner? series teach the principles of programming through simple game creation. You will acquire the skills that you need for more practical Shell Script programming applications, and you will learn how these skills can be put to use in real-world scenarios. Best of all, by the time you finish this book you will be able to apply the basic principles you?ve learned to the next programming language you tackle. With the instructions in this book, you?ll learn to: * Store and retrieve information in variables * Apply conditional logic and create conditional logic tests * Improve script organization with procedures * Debug your scripts and handle errors * Create loops to process collections of data

Author Biography

Jerry Lee Ford, Jr. is a Microsoft Certified Systems Engineer with over 15 years of experience in information technology

Table of Contents

Introduction xvii
CHAPTER 1 Introducing Windows Shell Scripting 1(24)
Project Preview: The Knock Knock Joke
2(2)
Overview of Windows Shell Scripting
4(3)
What Can Shell Scripts Do?
6(1)
Supported Microsoft Operating Systems
7(1)
Alternatives to Windows Shell Scripting
7(3)
The Windows Script Host
7(3)
Third-Party Scripting Languages
10(1)
Understanding the Windows Shell
10(3)
Assembling Your First Windows Shell Script
13(2)
Creating a Scripting Environment
15(2)
Back to the Knock Knock Joke
17(7)
Designing the Game
17(5)
The Final Result
22(2)
Summary
24(1)
CHAPTER 2 Interacting with the Windows Shell 25(32)
Project Preview: The Unpredictable Command Prompt
26(1)
Command Shell Command Syntax
27(2)
Starting Windows Shell Sessions
29(5)
Working with the CMD Command
30(2)
Working with the START Command
32(2)
Internal vs. External Commands
34(10)
How Windows Locates Commands
35(1)
Using the PATH Command
36(3)
Other Useful Windows Commands
39(5)
Customizing the Windows Command Console
44(4)
Customization Options
44(4)
Back to the Unpredictable Command Prompt
48(7)
Designing the Game
48(5)
The Final Result
53(2)
Summary
55(2)
CHAPTER 3 Windows Shell Scripting Basics 57(30)
Project Preview: The Fortune Teller Game
58(1)
More Scripting Basics
59(4)
Documenting Your Scripts with Comments
60(1)
Creating a Script Template
61(2)
Mastering Command Redirection
63(6)
Examining Data Input and Output
64(1)
Using One Command's Output as Another Command's Input
65(1)
Generating Reports
66(2)
Creating Error Logs
68(1)
Conditional Command Execution
69(1)
Chaining Two Commands Together
69(1)
Setting Up Conditional Command Execution
69(1)
Grouping Commands
70(1)
Back to the Fortune Teller Game
70(15)
Designing the Game
71(1)
Establishing the Execution Environment
71(1)
Creating a Welcome Screen
72(1)
Building the Story Line
73(1)
Collecting the Player's Question
74(3)
Creating an Exit Process
77(1)
Generating Random Answers
77(1)
Displaying the Fortune Teller's Prediction
78(1)
Replaying the Game
79(1)
The Final Result
79(6)
Summary
85(2)
CHAPTER 4 Storing and Retrieving Information in Variables 87(36)
Project Preview: The Story of Buzz the Wonder Dog
88(2)
Passing Data to Scripts at Execution Time
90(3)
Handling Large Numbers of Arguments
92(1)
Handling Arguments That Include Blank Spaces
93(1)
Working with Variables
93(12)
Accessing Environment Variables
94(4)
Creating, Modifying, and Deleting Script Variables
98(7)
Back to "The Story of Buzz the Wonder Dog"
105(17)
Designing the Game
105(1)
Configuring the Windows Command Console
105(1)
Building the Welcome Screen
106(1)
Providing the Reader with Instructions
107(1)
Collecting Key Story Elements from the Reader
108(1)
Using Variable Substitution to Write the Story
109(2)
The Final Result
111(11)
Summary
122(1)
CHAPTER 5 Applying Conditional Logic 123(32)
Project Preview: The Guess a Number Game
124(2)
Applying Conditional Logic to Control Script Execution
126(13)
Working with the IF Statement
126(3)
Providing for an Alternative Course of Action
129(1)
Determining Whether a Variable Already Exists
129(1)
Keeping an Eye Out for Errors
130(2)
Checking the Windows Shell Version
132(1)
Looking for Files and Folders
133(3)
Reversing the Logic of Conditional Tests
136(3)
Building Multi-Line IF Statements
139(1)
Creating Advanced Conditional Logic Tests
140(2)
Performing Different Kinds of Comparisons
142(1)
Back to the Guess a Number Game
143(11)
Designing the Game
143(6)
The Final Result
149(5)
Summary
154(1)
CHAPTER 6 Creating Loops to Process Collections of Data 155(46)
Project Preview: The Six-Million-Dollar Quiz
156(2)
Creating Loops
158(16)
Looping Through String Contents
160(2)
Looping Through Command Output
162(2)
Processing Collections of Files
164(2)
Processing Collections of Folders
166(3)
Reading Text Files
169(3)
Iterating a Specified Number of Times
172(2)
Back to the Six-Million-Dollar Quiz
174(26)
Using Pseudo Code
174(1)
Designing the Game
175(9)
The Final Result
184(16)
Summary
200(1)
CHAPTER 7 Creating Procedures and Subroutines 201(40)
Project Preview: The Rock, Paper, Scissors Game
202(2)
Reorganizing Your Windows Shell Scripts
204(4)
Understanding Labels
204(1)
Defining Subroutines
204(4)
Improving Script Organization with Procedures
208(10)
Setting Up Internal Procedures
208(4)
Creating External Procedures
212(4)
Using Procedures to Localize Variable Access
216(1)
Tunneling Data Out of Your Procedures
217(1)
Back to the Rock, Paper, Scissors Game
218(21)
Using a Flowchart as a Script Development Tool
218(3)
Translating Flowchart Design into Script Requirements
221(9)
The Final Result
230(9)
Summary
239(2)
CHAPTER 8 Debugging and Error Handling 241(56)
Project Preview: The Tic-Tac-Toe Game
242(2)
Understanding Windows Shell Script Errors
244(2)
Syntax Errors
245(1)
Run-Time Errors
245(1)
Logical Errors
246(1)
Examining Windows Shell Script Error Messages
246(4)
Common Syntax Errors
246(3)
A Typical Run-Time Error
249(1)
A Typical Logical Error
249(1)
Examining Different Ways of Dealing with Errors
250(9)
Educating Your Users
250(1)
Tracing Logic Flow within Scripts
251(3)
Command Error Checking
254(2)
Logging Error Messages
256(1)
Displaying Error Messages
257(2)
Creating Scripts That Return a Custom Exit Code
259(1)
Other Things to Look Out For
260(4)
Insufficient Authority
261(1)
Dealing with Scripts That Are Difficult to Read and Understand
261(1)
Working with Windows Commands
262(1)
Managing Arguments and Variables
262(1)
Handling Files and Folders
263(1)
Taking Precautions with Loops
263(1)
Keeping Procedures Straight
264(1)
Back to the Tic-Tac-Toe Game
264(30)
Designing the Game
264(16)
The Final Result
280(14)
Summary
294(3)
APPENDIX A Windows Shell Scripting Administrative Scripts 297(44)
Working with Network Drives
298(7)
Account Administration
305(7)
Disk Defragmentation
312(3)
Scheduling Script Execution
315(9)
The AT Command
315(5)
The Scheduled Task Wizard
320(1)
Starting the Task Scheduler Service
321(1)
Running the Scheduled Task Wizard
321(3)
Creating a Chat Script
324(6)
Adding a Graphical Interface
330(4)
Working with Third-Party Applications
334(7)
APPENDIX B What's on the CD-ROM? 341(8)
Windows Shell Scripting Examples
342(1)
Shell Scripting Editors
343(6)
JGsoft EditPad Lite
344(1)
JGsoft EditPad Pro
345(4)
APPENDIX C What Newt? 349(6)
Recommended Reading
350(1)
Locating Internet Resources
351(4)
Glossary 355(10)
Index 365

An electronic version of this book is available through VitalSource.

This book is viewable on PC, Mac, iPhone, iPad, iPod Touch, and most smartphones.

By purchasing, you will be able to view this book online, as well as download it, for the chosen number of days.

Digital License

You are licensing a digital product for a set duration. Durations are set forth in the product description, with "Lifetime" typically meaning five (5) years of online access and permanent download to a supported device. All licenses are non-transferable.

More details can be found here.

A downloadable version of this book is available through the eCampus Reader or compatible Adobe readers.

Applications are available on iOS, Android, PC, Mac, and Windows Mobile platforms.

Please view the compatibility matrix prior to purchase.