Editor's Note: This article is the first part of a two-part series about how to begin writing scripts in the Windows NT shell scripting language. This installment looks at how you go from having an idea for a script to determining that script's requirements and writing the pseudocode. The second installment will cover how to transform the pseudocode into a script and how to test the script.
What's the best way to get started in Windows NT shell scripting? I have four recommendations:
- Read Tim Hill's book Windows NT Shell Scripting (Macmillan Technical Publishing, 1998). This book is the best printed resource for learning NT shell scripting syntax.
- Find a mentor. Mentors are a great resource for reviewing your code for logic errors and debugging problematic code.
- Review and modify code that other scriptwriters have written. Dissecting other scriptwriters' code can help you see how they've accomplished certain tasks. You can then leverage their ideas to automate your system administration tasks.
- Master three NT shell commands (Findstr, For, and If) and the command-line utilities in the Microsoft Windows NT Server 4.0 Resource Kit. Most NT shell scripts use these tools to capture and manipulate data.
To help you master the Findstr, For, and If commands and one resource kit utility, I'll show you how to create a script that uses these tools. This exercise will not only teach you how the tools work but also give you a script that you can use in your NT system. . . .
kpearce February 05, 2007 (Article Rating: