Hands-On KornShell93 Programming
Home > Computing and Information Technology > Computer programming / software engineering > Programming and scripting languages: general > Hands-On KornShell93 Programming
Hands-On KornShell93 Programming

Hands-On KornShell93 Programming

|
     0     
5
4
3
2
1




Out of Stock


Notify me when this book is in stock
About the Book

Over the years, KornShell has evolved into a full-featured, powerful shell language. Familiarity with KornShell enables system and network professionals to extend the user environment and automate complex system-administration tasks for huge productivity gains. Bourne and C shell programmers will appreciate KornShell's superior string handling, stronger data typing, and broader capabilities. Hands-On KornShell93 Programming is a self-paced tutorial that introduces you to the essentials of KornShell programming. Based almost entirely on short, focused examples that demonstrate central concepts and effective programming techniques, it will quickly bring you up to speed. The book reflects the newest version of KornShell, KSH93. It also provides coverage of significant developments, such as CGI programming with KornShell, and offers an in-depth look at KornShell string handling. Humorously written, the book makes it easy to learn KornShell essentials, including data types, math, pattern matching, conditions, loops, menus, command-line arguments, functions, start-up scripts, I/O, strings, variables, background processes, and CGI scripts.Highlighted "Beware" sections will warn you of potential pitfalls and keep you on the track to learning effective KornShell programming. 020131018XB04062001

Table of Contents:
List of Tables. List of Figures. Preface … That No One Will Ever Read. Author's Note Regarding the ksh93 Edition. 1. Before Writing Your First KornShell Scripts. 2. Getting Started. What Shell Is Executing My Script? Operating System Commands in a Shell Script. BEWARE: Are You Allowed to Execute This Script? Commenting Your Code. BEWARE: Picking a Bad Name for Your Script. The Usage Line. Simple Output. Variables. BEWARE: Variable Names Are Case Sensitive. Simple Input. Obtaining the Value of a Variable. BEWARE: The Dollar Sign in Read Statements. Newlines, Semicolons, White Space, and Columns. BEWARE: Confusing + and -. Assigning a Value to a Variable. BEWARE: Common Mistakes When Assigning Variables. Finding Your Mistakes. Can I Quote You on That? 3. Data Types. If You're New to Programming … . If You're an Experienced Programmer … . Declaring Strings. Declaring Integers. Binary, Octal, Hex, and So On. Declaring Floats. Declaring Constants. Declaring nameref Variables. Declaring Arrays. Declaring Arrays with set -A. Printing Array Values. BEWARE: Common Array Mistakes. Declaring Associative Arrays. Probing Arrays. Declaring Structures Part I. Declaring Structures Part II. Arrays of Structures. 4. Math. If You're New to Programming … . If You're an Experienced Programmer … . Double Parentheses. Integer Addition, Subtraction, and Multiplication. Integer Division. Floating-Point Math. Mixing Floating-Point and Integer Math. Grouping Mathematical Operations. BEWARE: Common Mistakes in Math Operations. Mathematical Assignment Operators. The Triggy Stuff. BEWARE: Math Functions Inside Double Parentheses. A Practical Math Example. Math Operator Summary. 5. Pattern Matching. If You're New to Programming … . If You're an Experienced Programmer … . For Everyone. The ? Wildcard. The [char1char2...charN] Wildcard. Character Classes. The * Wildcard. BEWARE: Matching Filenames. The ?(pattern1|pattern2... |patternN) Wildcard. BEWARE: White Space within Patterns. The @(pattern1|pattern2... |patternN) Wildcard. The *(pattern1|pattern2... |patternN) Wildcard. The +(pattern1|pattern2... |patternN) Wildcard. The !(subpattern1|subpattern2... |subpatternN) Wildcard. Matching Subpatterns with \d. Simple Commands Containing Patterns. Wildcard Summary. 6. Conditions. If You're New to Programming … . If You're an Experienced Programmer … . Tests on Numbers and Strings. Comparing Numbers with if. BEWARE: Common Mistakes Using if with Numbers. Comparing Numbers with the ? : Operator. BEWARE: Common Mistakes in ? :. Compound Statements. else and elif. Comparing Strings with if. Comparing Alphabetical Order with < and >. Comparing a String to a Pattern with if. BEWARE: Common Mistakes Comparing Strings. Boolean AND, Boolean OR. The case Statement. Unexpected Values in a Case Statement. Wildcards in a Case Statement. Multiple Patterns in a Case Statement. BEWARE: Common Mistakes in Case. Tests on Files, Directories, and the Like. BEWARE: No Filename Expansion Inside [[ ]]. What Kind of Object Is This? Boolean NOT. How Is This Object Protected? Comparing the Time of Last Modification. Mixing Tests. 7. Loops. If You're New to Programming … . If You're an Experienced Programmer … . Simple While, Until, and for Loops. Using While to Average Five Floats. BEWARE: While Loop Not Guaranteed to Iterate. Using a C-Style for Loop to Average Five Floats. Using Break to Leave a Loop. Using Continue to Skip Part of One Loop Iteration. Using : to Create an Always True Loop. BEWARE: The Nature of Truth. Lists in for Loops. A List of Filenames in a for Loop. Patterns in a for Loop. Searching for Objects in Subdirectories. BEWARE: Nonexistent Patterns. A Loop within a Loop. The break Statement within a Nested Loop. 8. Creating Menus. A Simple Select Example. A select with a Case. Unexpected User Input. Gracefully Exiting from Menus. Repeating the Menu Selections. Wildcards in Menu Entries. Wildcards in case Statements. A Practical select Example. Menus Inside of Menus (Submenus). 9. Command Line Arguments and Positional Parameters. If You're New to Programming … . If You're an Experienced Programmer … . Command Line Arguments. Counting the Number of Command Line Arguments. Giving the User a Choice of How to Enter Arguments. BEWARE: Can't Put Positional Parameters to Left of =. Default Values of Positional Parameters. Processing Positional Parameters with shift. Processing Positional Parameters with $* and $@. “$*” versus “$@” Part 1. “$*” versus “$@” Part 2. Using the set Statement to Assign Positional Parameters. Processing Simple Switches with getopts. What If the User Enters an Invalid Switch? On and Off Switches. Processing Switch Arguments. Processing Missing Switch Arguments. A Command Line Containing More Than Just Switches. BEWARE: The Colon of getopts. Positional Parameters Syntax Overview. 10. Functions. If You're New to Programming … . If You're an Experienced Programmer … . BEWARE: Two Kinds of Functions. A Disorganized Script Without Functions. The Same Script Organized into Functions. Simple Function with One Argument. BEWARE: When $1 Isn't the First Command Line Argument. A Function with Multiple Arguments. A Script That Calls Another Script. Two Ways to Return Values. Returning a Value from a Function with return. BEWARE: $? Doesn't Stick Around Long. Using $(...) to Return Values from a Function. Local Variables versus Global Variables. BEWARE: Global and Local Variables with the Same Name. Passing Arrays as Function Arguments: Call-by-Reference. Sorting Arrays Using Call-by-Value. Discipline Functions Overview. Using a .set Discipline Function to Monitor a Variable. BEWARE: Data Type Declarations and Discipline Functions. Using a .set Discipline Function to Constrain a Value. Recursive Functions. Autoloaded Functions. BEWARE: Tricky Loading Rules. Extending the KornShell by Writing C Functions. Practical Example: The Game of moo. 11. Start-Up Scripts and Environments. Start-Up Scripts. Environments. Dot Scripts. Aliases. Example of a $HOME/.profile Start-Up Script. Example of an Environment (ENV) Script. 12. Input and Output. If You're New to Programming … . If You're an Experienced Programmer … . read, REPLY, and Prompts. Reading Three Values. Ignoring Extraneous Input. Reading Values Having Different Data Types. Rushing Users to Supply Input. The IFS Variable. Input Longer Than One Line. BEWARE: Put Nothing After the Backslash. Using a Loop to Process Input. Reading Text out of a File with <. Putting < within a Statement. BEWARE: Common Input Mistakes. Up Close and Personal with the print Statement. BEWARE: Bad Options in print Statement. BEWARE: Wildcards within Strings. Getting Fancy Output with the printf Statement. BEWARE: print and printf Handle Newlines Differently. Redirecting Standard Output with >. BEWARE: “But It Was Right There a Second Ago!” Appending with >>. Mixing < and >. Pipes. Streams. Redirecting Standard Error. BEWARE: Redirecting Standard Output and Standard Error to Same File. Opening Files with exec. Using exec to Do I/O on Multiple Files. Closing Streams. Using $(...) to Assign the Output of a Command to a Variable. Here Documents. 13. Manipulating Strings. If You're New to Programming … . If You're an Experienced Programmer … . Uppercase and Lowercase. Left Justification. Concatenating Strings. Reading an Entire File into One String Variable. Search and Replace Overview. Search and Replace Practical Example. Isolating a Portion of a String. Removing the Leftmost Characters in a String with #. Removing the Rightmost Characters in a String with %. An Application of %. # versus ##. % versus %%. Using # on Numbers. Deleting a Substring from the Middle of a String. Pruning Branches from Pathnames. Matching Multiple Strings on the Same Line. Finding the Length of a String. Parsing Strings into Words. Parsing Strings into Characters. Specifying Default Values. Parsing PATH. Practical Application: Extracting Comments From C Source Code. String Manipulation Summary. 14. KornShell Reserved Variables. If You're New to Programming … . If You're an Experienced Programmer … . .sh.edchar, .sh.edcol, .sh.edmode, .sh.edtext. .sh.name, .sh.subscript, and .sh.value. .sh.version. ENV. FIGNORE. $?-Error Status. HISTFILE, HISTSIZE, HISTEDIT, HISTCMD, and FCEDIT -History File. IFS-Parsing Lines into Tokens. LANG, LC_ALL, LC_COLLATE, LC_TYPE, and LC_NUMERIC. LINENO-Current Line Number. MAIL, MAILPATH, and MAILCHECK-Electronic Mail. OPTARG and OPTIND-Values Associated with getopts. PATH, CDPATH, and FPATH-Search Directories. PS1, PS2, PS3, and PS4-Prompts. BEWARE: Common Mistakes in Setting Prompts. HOME, PWD, and OLDPWD-Login, Current, and Previous Directories. RANDOM-Random Integer Generator. REPLY, -, and _-Miscellaneous Input Repository. SECONDS-Elapsed Time. SHELL. TERM, COLUMN, LINES-Terminal Characteristics. TMOUT-Time Out an Unused KornShell. VISUAL and EDITOR-Command Line Text Editors. $$, $!, and PPID-Process ID. 15. Foreground, Background, and Signaling. Background and Foreground. Signaling. How to Send a Signal to a Script. Writing Scripts That Respond to Signals. Catching Signals. A Trap That Calls Another Script. Trapping Whenever a Script Exits. Trapping Whenever Error Status Becomes Nonzero. Writing Your Own Debugger. Trapping KEYBD Signals. 16. Command Line Editing and the History File. What Is Command Line Editing? What Is a History File? Listing Previous Commands. Re-Executing Previous Commands. BEWARE: Can't Use r on Multiple Commands. Editing Previous Commands, Then Executing Them. The Thing You're Going to Do Anyway. Pathname Completion. Command Completion. 17. Writing CGI Scripts. If You're New to CGI Programming … . If You're an Experienced CGI Programmer … . Forms. Text Boxes and Password Boxes. Checkboxes. Radio Buttons. Getting Started Writing CGI Programs. BEWARE: If Your CGI Script Doesn't Work. A CGI Script Containing More Than Just print Statements. File I/O from CGI Scripts. BEWARE: File Permissions. Analyzing Form Input: The Get and Post Methods. The Get Method. Get Method: Multiple Input Values. The Post Method. Handling Special Characters. Environment Variables Passed by the Web Server. Browserless Browsing. BEWARE: Moral Concerns. Browserless Browsing for GIFs. BEWARE: When Browserless Browsing Fails. Appendix A: Statement and Alias Quick Reference. Appendix B: Just Enough HTML. Essential HTML Tags. Headings. Lists. Character Tags. Hyperlinks. Images. Bibliography. Index. 020131018XT04062001


Best Sellers


Product Details
  • ISBN-13: 9780201310184
  • Publisher: Pearson Education Limited
  • Publisher Imprint: Addison Wesley
  • Height: 188 mm
  • No of Pages: 472
  • Spine Width: 21 mm
  • Width: 234 mm
  • ISBN-10: 020131018X
  • Publisher Date: 05 Jan 1999
  • Binding: Paperback
  • Language: English
  • Returnable: N
  • Weight: 762 gr


Similar Products

Add Photo
Add Photo

Customer Reviews

REVIEWS      0     
Click Here To Be The First to Review this Product
Hands-On KornShell93 Programming
Pearson Education Limited -
Hands-On KornShell93 Programming
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.

Hands-On KornShell93 Programming

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

    New Arrivals

    Inspired by your browsing history


    Your review has been submitted!

    You've already reviewed this product!